Reputation: 21
Lately I have discovered Automator (yes, finally she did that) and I wanted to make an event which runs at a regular interval using Calendar. I wanted to save a particular web page to Evernote using the Web Clipper extension in Safari.
I set up my Web Clipper to start on $, F = Full page, enter = Save.
I have come so far as to actually have an event which works by:
tell application "Safari" to activate delay 5 tell application "System Events" keystroke "$" -- key code 10 = Activate Web Clipper (custom shortcut) end tell delay 1 tell application "System Events" keystroke "f" -- key code 3 = Full page saved by Web Clipper end tell tell application "System Events" key code 36 -- works to save page, however, 'keystroke enter' does not end tell
5.Saving the document in a Calendar event and set it up to repeat.
I found some help here with a list of key code values, however, I couldn't find "enter" in the list. I used a little free app called Key Codes instead to figure out that enter has the key code 36.
I would rather be able to use keystroke, since it is easier to read than some number. Can anyone help?
Upvotes: 2
Views: 7163
Reputation: 17640
i'm not sure this will do exactly what you want but maybe just keystroke return ?
tell application "Safari" to activate
delay 5
tell application "System Events"
keystroke "$" -- key code 10 = Activate Web Clipper (custom shortcut)
delay 1
keystroke "f" -- key code 3 = Full page saved by Web Clipper
keystroke return
end tell
Upvotes: 2