Launch Website & Add Text Into Textbox

1 11 2007

tell application "Safari"
--activate to bring Safari to the front--
activate
try
--check if Safari is already open --
set currentDoc to the document of window 1
on error NSReceiverEvaluationScriptError
set currentDoc to make new docuent
end try
set the URL of currentDoc to "http://www.google.com"
-- or use--
open location "http://www.google.com"
--delay for page to load--
delay 2
--use javascript to enter text into textbox
set thisscript to "document.forms[0].q.value='applescript';"
do JavaScript thisscript in document 1
end tell

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: