osx - How to a file uploading using Automator in apple script? -
i’m new automator. i’m trying achieve.
i have code uploading file in safari using applescript ( upload file myfile
points to):
on run argv set myfile item 1 of argv activate application "safari" tell application "system events" tell process "safari" keystroke "g" using {command down, shift down} delay 2 key code 51 delay 2 keystroke myfile delay 30 key code 52 delay 10 key code 52 delay 5 end tell end run
this applescript been called java , works fine.
this working totally fine. want put in automator service, safari has directly access applescripts, rather java doing it. have 2 questions:
- many safari running , calling service. safari needs give file uploading process needs figured out. possible automator find process id of application called ?
- if so, how shall pass parameter (the file location uploaded) automator, when service called?
thanks in advance.
Comments
Post a Comment