• 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
Is it possible to register an AS app as a custom URL handler?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is it possible to register an AS app as a custom URL handler?


  • Subject: Is it possible to register an AS app as a custom URL handler?
  • From: Jeff Porten <email@hidden>
  • Date: Mon, 17 May 2004 02:25:48 -0400

I might very well be barking up the wrong tree here -- this idea is sending me into several areas I'm unfamiliar with, simultaneously.

The solved problem: I have a selection of N messages in Mail.app. I want to store those messages as a link to a task in another application that is not AppleScriptable and which doesn't have an explicit linking system. Solution: get the unique message IDs, build a concatenated string out of them, and use GUI Scripting to manhandle that into the other application. Knocked that out on a long train ride.

The unsolved problem: how the heck do I get that string back OUT? I.e., I want to see the string in the other app, do something simple (i.e., a keystroke), and have the Mail messages pop back up. The command is simple: "open messages of mbox whose message ID is someID". (The script that builds the string also moves the message to the mailbox defined in mbox.)

So what I need to do is get the string in that non-AppleScriptable application to my AppleScript, so it can parse out the ID and send that open message event to Mail.app. Worst case scenario, I can figure this out in GUI Scripting, but that seems more painful than the clever idea....

The clever idea: create a new URL protocol named msg://. Register it as handled by my AS application. Save the message IDs as URLs (i.e., msg://msgIDstringFromMail). Command-click on the URL, and boom, up pops the message.

Great idea, excepting:

1) registering an AS app as a URL handler seems to randomly pick any AS app from the hard drive, rather than *my* app

2) changing the creator code doesn't seem to help matters any

3) I haven't the slightest idea WHAT is being sent by the command, or how to parse it. I assume that what's coming in is an Open URL event -- so how do I deal with that?

Ideas? Or am I being just far too clever?

Best,
Jeff
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Is it possible to register an AS app as a custom URL handler?
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: Shutdown script
  • Next by Date: Re: Shutdown script
  • Previous by thread: Re: Entering data in a web page
  • Next by thread: Re: Is it possible to register an AS app as a custom URL handler?
  • Index(es):
    • Date
    • Thread