• 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
Opening a specified URL in a specified browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening a specified URL in a specified browser


  • Subject: Opening a specified URL in a specified browser
  • From: Craig Hoyt <email@hidden>
  • Date: Wed, 27 Dec 2006 13:54:29 -0800

Happy Holidays All,

I'm currently going backwards on my project now... I had the 'open location my_url' working and now I can't seem to even make this work anymore.

I have a small background application (not AS) that calls AS routines. One such call is:

tell application "Safari" to activate
open location "http://www.google.com/";
end tell

Yes I know the browser is hard coded into the script and so is the URL but all I get is Safari opening to it's home page. I had this working with the undesired effect of it opening a second window the the requested url. Now I can't even get the second page to show at all. I started tinkering trying to get this to load the url into the same window as the home page and since then I can't seem to get this to work. The browser will most likely not be running prior to running the script so it must opened. I've tried many variations of tell application "Safari" to open location "http://www.google.com/"; but without success, I would like it to open without opening a new window if possible but right now I'll take what I can get. The only thing that has change on my test machine is my code and I did do a system update. What I get now is just the browser opening and the url used in the open location is not shown either in the existing window of a running browser or a new window.

A second issue... I have another script that allows one to launch (activate) an application from a user input. If the name selected is misspelled or does not exist a dialog appears requesting the user find the file. I would like to have this fail without displaying any dialog. Is this what the try is used for or is there some other way I can stop a dialog from appearing.

Thanks,
Craig
_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Opening a specified URL in a specified browser
      • From: Malcolm Fitzgerald <email@hidden>
  • Prev by Date: Re: Replace all caps into plain
  • Next by Date: Re: Opening a specified URL in a specified browser
  • Previous by thread: Re: Replace all caps into plain
  • Next by thread: Re: Opening a specified URL in a specified browser
  • Index(es):
    • Date
    • Thread