• 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: Timeout Not Working As Expected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timeout Not Working As Expected


  • Subject: Re: Timeout Not Working As Expected
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 02 Apr 2015 11:18:01 -0700

> On Mar 19, 2015, at 2:42 PM, S. J. Cunningham <email@hidden> wrote:
>
> On Mar 18, 2015, at 7:05 PM, Shane Stanley wrote:
>
>> On 19 Mar 2015, at 6:06 am, S. J. Cunningham <email@hidden> wrote:
>>>
>>> Firefox doesn't support Applescript but I discovered that
>>>
>>> 	tell application "Firefox" to open location "http://www.yahoo.com";
>>>
>>> works
>>
>> "open location" is part of Standard Additions, and will try to open the URL in your chosen browser. So you don't need the "tell" statement (and you won't find it in a browser's scripting dictionary).
>
> I'm sure you are right but riddle me this:
>
> 	open location "imacros://run/?m=LastPostPreviewClip.iim"
>
> 		--> An error of type -10814 has occurred
>
> but
>
> 	tell application "Firefox" to open location"imacros://run/?m=LastPostPreviewClip.iim"
>
> Works fine.
>
> I'm guessing "imacros://" isn't recognized as a url by Applescript but is by Firefox. "http://"; url's work as you describe.  Thankfully the tell statement works or I'd be up the creek.

Essentially, yes.  A plain “open location” command sends the resulting Apple event to whatever application is registered as the default application for that URL scheme, such as Safari for “http”, Mail for “mailto”, Finder for “ftp”, etc.  (These are all configurable.)  Using an explicit “tell” routes the event directly to that application, as in telling Firefox to open an “http” URL, when it would otherwise have gone to Safari.

So, the problem isn’t exactly that “imacros://…” isn’t recognized as a URL, it’s that no application registered itself as being able to handle it, so the system had no idea where to route it.  By adding the “tell”, you’re bypassing the system default (or lack thereof).


--Chris Nebel
AppleScript Engineering
 _______________________________________________
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


  • Prev by Date: Test
  • Next by Date: Re: Can't Add a Script App to the Keychain
  • Previous by thread: Test
  • Next by thread: Re: Microsoft Outlook 2011 - Changing Subject field
  • Index(es):
    • Date
    • Thread