osx - AppleScript can not activate Finder -
i used applescript in osx app activate finder , open smb share folder smb url.
set clipboard "smb://192.168.99.99" tell application "finder" activate end tell delay 0.5 tell application "system events" keystroke "k" using command down end tell delay 0.2 tell application "system events" keystroke "v" using command down keystroke return end tell
it works well, not work on 1 of clients' mac. finder doesn't activate, finder menu bar on top of screen shows.
i tried use script editor on mac execute same script, still, finder doesn't activate.
so far, occurred on client's mac. mac running 10.10, upgraded 10.11 still out of luck.
anyone has idea happened? there way can 'disable' applescript?
instead of trying simulate finder keyboard events, there specific reason why not using instruction "open location" ?
the script bellow opens smb shared volume :
set myaddress "smb://192.168.99.99" open location myaddress
of course, system may ask login/password if not yet set in keychain.
Comments
Post a Comment