• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript + Safari to open URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Applescript + Safari to open URL
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Strange Font Pasted in Mail (From: Christopher Stone <email@hidden>)
 >Re: Strange Font Pasted in Mail (From: Christopher Stone <email@hidden>)
 >Re: Strange Font Pasted in Mail (From: Yvan KOENIG <email@hidden>)
 >Applescript + Safari to open URL (From: Satyam Satyanarayana <email@hidden>)
 >Re: Applescript + Safari to open URL (From: Satyam Satyanarayana <email@hidden>)

  • Prev by Date: Re: Applescript + Safari to open URL
  • Next by Date: Re: Applescript + Safari to open URL
  • Previous by thread: Re: Applescript + Safari to open URL
  • Next by thread: Re: Applescript + Safari to open URL
  • Index(es):
    • Date
    • Thread