AppleScript名:Appleのハードウェアのアイコン名を一覧から選択して返す |
— Created 2017-07-29 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aRes to chooseHardwareModel() of me on chooseHardwareModel() set sRes to (do shell script "ls " & (quoted form of "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/") & "com.apple.*.icns") set aList to paragraphs of sRes set aaList to choose from list aList if aaList = false then return set aPath to first item of aaList set aStr to ((current application’s NSString’s stringWithString:aPath)’s lastPathComponent()’s stringByDeletingPathExtension()) as string return aStr end chooseHardwareModel |
More from my site
(Visited 24 times, 1 visits today)