I’m using this script to save Safari pages.
tell application "Safari"
activate
set theURL to front document
tell application "System Events"
tell process "Safari"
tell menu 1 of menu bar item "File" of menu bar 1
repeat while enabled of menu item "Save as." is false
delay 0.1
end repeat
end tell
keystroke "s" using command down -- Save As.
repeat until sheet 1 of window 1 exists
delay 0.1
end repeat
tell sheet 1 of window 1
click pop up button 1 of group 1
keystroke "S"
end tell
end tell
end tell
After the step “KEYSTROKE S” I would like to be able to paste the content of the clipboard as a file name, the content of the clipboard comes from a FMP field.
How can I achieve this?
Thanks a lot