the script below works for me (strangely not every single time…) EXCEPT for the very last step (and once without the second to last step). i thought my delay was too short but when i lengthen it, nothing happens. you won’t be able to reproduce it unless you have a del.iciou.us account and replace your relevant URL (where i put “XYZ”), and you are using camnio or firefox with find-as-type on, but i hoped somone could see what i might be doing wrong by looking. also note the other ways of pressing the buttons (which i derived from UI Browser) such as…
click button “Save” of window “Save”
or
click button 1 of window 1
don’t work, no permutations of them do. just “keystroke return” — which is strange since another script i wrote for exporting camnio bookmarks ONLY clicks the button in the dialog by using the code:
click button “Export” of window “Save”
anyhow, here’s the script. any advice is SO appreciated.
set ExportPage to "https://secure.del.icio.us/settings/XYZ/bookmarks/export"
tell application "Camino" to activate
tell application "System Events"
tell application "Camino" to open url ExportPage
delay 4
keystroke "notes"
keystroke tab
keystroke return
delay 4
keystroke "s" using command down
delay 1
keystroke return
delay 1
keystroke return
end tell
It would help a little if you said what the script’s supposed to do. I presume that after having written “notes” into a Camino document, it should save the document under a default name in Camino’s current save location. I don’t have Camino, but fooling around with a few other applications, I’ve had some success changing the penultimate keystroke return to keystroke tab. (It removes the focus from the save name in the Save As dialog.) Perhaps you could try that.
the script is to load the del.icio.us export bookmark page, go to the button (the ‘notes’ is right before that button), tab to the button, hit it, and save the resulting page (which has no static URL of it’s own). your solution of using keystroke tab worked perfectly and the script now works as intended. it’s a bit ‘brute-force,’ but it works:
set ExportPage to "https://secure.del.icio.us/settings/XYZ/bookmarks/export"
tell application "Camino" to activate
tell application "System Events"
tell application "Camino" to open url ExportPage
delay 4
keystroke "notes"
keystroke tab
keystroke return
delay 4
keystroke "s" using command down
delay 1
keystroke return
delay 1
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke return
delay 1
keystroke return
end tell