Re: Applescript + Safari to open URL
Re: Applescript + Safari to open URL
- Subject: Re: Applescript + Safari to open URL
- From: Emmanuel LEVY <email@hidden>
- Date: Tue, 7 Jul 2009 15:34:40 +0200
If it can help, here are handlers that we use to script Safari:
on qadmin_runinsafari(x)
set AppName to "Safari"
tell application AppName to «event sfridojs» x given «class
dcnm»:document 1
end qadmin_runinsafari
on qadmin_waituntilcomplete()
repeat
smilepause 0.3
if qadmin_runinsafari("document.readyState") is "complete" then exit
repeat
end repeat
smilepause 0.3
end qadmin_waituntilcomplete
Those are supposed to synchronously load a page in Safari, with:
qadmin_runinsafari("window.location.href='http://www.google.com' ;")
qadmin_waituntilcomplete()
You probably have to use "delay" rather than "smilepause".
Emmanuel
On Jul 7, 2009, at 2:55 PM, Satyam Satyanarayana wrote:
The script provided by you and Peter are known to me.
The main thing what I am looking is "whether the page loading
process is completed or not".
I am googling as suggested by Peter for "javascript readyState"
On 07-Jul-09, at 5:19 PM, Shawn Brady wrote:
I use this to open several tabs with URLs in each one
tell application "System Events" to tell process "Safari" to
keystroke "t" using command down
set URL of document 1 to "http://www.audiovideoproducer.com/"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden