I'm writting a quick apple script to try and paste some user inputed information into safari. Below is my code:
I'm trying to copy the user input to the clipboard, which works, but when i try to paste it into the URL i get the error:
Expected end of line but found identifier
Can anyone shed any light on this?
Thank you!
Code:
set thePrefix to ""
set theNumber to ""
set theIcon to note
display dialog "Please Enter The URL:" default answer ""
set theNumber to text returned of result
set the clipboard to theNumber
tell application "Safari"
make new document at end of documents
activate "Safari"
set URL of document 1 to "http://www.facebook.com"
keystroke "v" using {command down}
end tell
Expected end of line but found identifier
Can anyone shed any light on this?
Thank you!