Ofcourse. That is because Script Editor is your active appliecation and when you press Cmd+S, only the save window opens.
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
keystroke "s" using command down
delay 0.2
keystroke return
end tell
end tell
set the target_URL to "http://jott.com/notes.aspx?page=243"
set the destination_file to "Macintosh HD:Users:jeffrey:Downloads:jotts:" & "243.txt"
tell application "Safari" to activate
open location target_URL
delay 5
tell application "System Events"
tell process "Safari"
keystroke "s" using command down
delay 0.2
keystroke return
end tell
end tell
What this doesn’t do is allow me to change the name of the file. Is there a way to insert some text into the filename field before pressing the save button?
activate application "Safari"
tell application "System Events"
tell process "Safari"
click menu item "Save As." of menu 1 of menu bar item "File" of menu bar 1
delay 0.2
set value of text field 1 of sheet 1 of window 1 to "FileName"
click button "Save" of sheet 1 of window 1
end tell
end tell