Hello,
I am trying to modify a script to allow the user to make a selection from a list of options before the script is processed, but I’m running into trouble. The first script below works fine, but when I try to run the second one, and, for example, select “Clippings-Religion”, I get this error: “VoodooPad Pro got an error: Can’t make page {“Clippings-Religion”} of document 1 into type page.” Can anyone see why this script isn’t working as desired?
Thank you,
Erik
FIRST SCRIPT:
tell application "Firefox"
activate
set theURL to «class curl» of window 1
set theTitle to name of window 1
tell application "System Events" to keystroke "c" using {command down}
end tell
set thetext to "-----------------------------------------------------------------------" & return & ¬
theTitle & return ¬
& return & theURL & return ¬
& return & (the clipboard) & return & return
tell application "VoodooPad Pro"
append text return & thetext to page "Clippings-Religion" of document 1
end tell
SECOND SCRIPT:
set pageList to {"Clippings-Religion", "Clippings-Education", "Clippings-Environment", "Clippings-Iraq", "Clippings-Iran", "Clippings-North Korea", "Clippings-Energy", "Clippings-Health Care", "Clippings-Discourse", "Clippings-Leadership", "Clippings-Other", "Cancel"}
set PageToPasteTo to choose from list pageList with multiple selections allowed
tell application "Firefox"
activate
set theURL to «class curl» of window 1
set theTitle to name of window 1
tell application "System Events" to keystroke "c" using {command down}
end tell
set thetext to "-----------------------------------------------------------------------" & return & ¬
theTitle & return ¬
& return & theURL & return ¬
& return & (the clipboard) & return & return
tell application "VoodooPad Pro"
append text return & thetext to page PageToPasteTo of document 1
end tell