-

AppleScript

提供:Hidezumi's Mediawiki
2022年1月2日 (日) 06:51時点におけるHidezumi (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

Wi-Fi接続

tell application "System Events"
 tell process "SystemUIServer"
  tell menu bar 1
   tell menu bar item 6
   click
   delay 2
    tell menu 1
    set myList to every UI element whose name contains "PQI Air card II"
    set number_of_items to count (myList)
    if (number_of_items = 0) then
     click "[name of original wi-fi]"
    else
     click menu item "PQI Air card II"
     delay 5
     tell application "Finder"
							
      activate "Finder"
      mount volume "ftp://192.168.1.1"
      delay 5
      open ("Volumes/192.168.1.1/sd/DCIM" as POSIX file)
     end tell
    end if
   end tell
  end tell
 end tell
 end tell
end tell