Jump to content

dirk

Member
  • Posts

    5
  • Joined

  • Last visited

  • Days Won

    1

dirk last won the day on October 22 2013

dirk had the most liked content!

dirk's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. Nice, here a script for the hotspot connection. You have to change the device name and translate the strings. on alfred_script(q) set device to "iPhone" set waiting to 10 activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" set btMenu to (menu bar item 1 of menu bar 1 where description contains "WLAN") tell btMenu click set thisTime to current date set dropDeadTime to thisTime + waiting repeat if exists menu item ("Verbindung zu „" & device & "“ trennen") of menu 1 then click menu item ("Verbindung zu „" & device & "“ trennen") of menu 1 exit repeat else if exists menu item device of menu 1 then click menu item device of menu 1 exit repeat else if (current date) > dropDeadTime then display alert "Hotspot „" & device & "“ nicht gefunden!" exit repeat end if delay 0.5 end repeat end tell end tell end tell end alfred_script
  2. Nice Idea, I have modified the script, so that multiple selections are working: on alfred_script(q) tell application "Finder" set source to selection end tell if (count of source) is greater than 1 then set fileList to every item of source repeat with source in fileList doMove(source, q) end repeat else doMove(source, q) end if end alfred_script on doMove(source, destination) set source to (POSIX path of (the source as alias)) set destination to POSIX path of destination do shell script "mv" & space & quoted form of POSIX path of source & space & quoted form of POSIX path of destination end doMove
  3. @dpyy: I had the same problem and I have rebuild the com.apple.LaunchServices.plist file (delete and restart the mac). After this I had to re-set some settings, but it works.
  4. Nice! Tip: I have added: tell its window "iTunes" set isVisible to get visible end tell 
… tell its window "iTunes" set visible to isVisible end tell at the begin & end of the else block to restore the iTunes window state.
  5. or switch: activate application "Mail" tell application "System Events" tell process "Mail" if title of window 1 does not contain "Inbox" then if value of attribute "AXFocused" of text field 1 of front window is true then set value of attribute "AXFocused" of UI element 1 of scroll area 4 of front window to true else set value of attribute "AXFocused" of text field 1 of front window to true end if end if end tell end tell
×
×
  • Create New...