Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Attaching AppleScripts to Items in Interface Builder

Attaching AppleScripts to Items in Interface Builder
Thread Tools
Professional Poster
Join Date: Feb 2001
Location: Sydney, Australia
Status: Offline
Reply With Quote
Dec 12, 2002, 09:37 PM
 
I want to know how to attach applescripts to items in interface builder.

Just simple things like:

open location "mailto:dcanaris@hotmail.com"
In vino veritas.
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Dec 12, 2002, 09:59 PM
 
See /Developer/Documentation/CoreTechnologies/AppleScriptStudio.
Rick Roe
icons.cx | weblog
     
undotwa  (op)
Professional Poster
Join Date: Feb 2001
Location: Sydney, Australia
Status: Offline
Reply With Quote
Dec 13, 2002, 04:37 AM
 
Let me explain further:

I have got a new sherlock channel project

And in a window I have got the button 'Contact Me'.

I thought it would be simple to simply connect an applescript to this button to "open location 'mailto:dcanaris@hotmail.com'.

However I have not figured out how to do this. Anyone with any idea on coding Sherlock Channels know a way to do this with or without AppleScript?
In vino veritas.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Dec 13, 2002, 08:02 AM
 
this document:

http://developer.apple.com/techpubs/...hitecture.html

would suggest that you cannot write "triggers" in AppleScript - It looks like you have to write them in JavaScript or XQuery.
     
undotwa  (op)
Professional Poster
Join Date: Feb 2001
Location: Sydney, Australia
Status: Offline
Reply With Quote
Dec 13, 2002, 05:56 PM
 
Would anyone have simplified instruction on how to write an Xquery trigger that will launch a URL and then connect it in Interface Builder?

I am seriously new to this.
(Last edited by undotwa; Dec 13, 2002 at 06:04 PM. )
In vino veritas.
     
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status: Offline
Reply With Quote
Dec 13, 2002, 06:01 PM
 
If you are trying to make Sherlock talk to other applications, I believe you are very limited in that. Sherlock simply isn't designed for complex projects of that sort. I've only glanced through the documentation, but by and large it appears to be very simple stuff. Javascript and XQuery are fairly simple.

What exactly are you trying to do?
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Dec 13, 2002, 06:06 PM
 
Ah. You may be screwed, in that case. There seems to have been a deliberate effort to keep Sherlock channels from being full-fledged Mac OS X programs. And for good reason -- with them being internet-based and automatically-updating, one could easily imagine a scenario in which someone masquerades as a channel provider and alters a script that says "open location 'www.foo.com'" with "tell app 'finder' to delete entire contents of startup disk" or some such.

What you might be able to do instead, though, is have a text field containing a clickable HTML mailto link. I haven't played with the Sherlock SDK enough to know for sure quite yet, so good luck.
(Last edited by Rickster; Dec 13, 2002 at 06:14 PM. )
Rick Roe
icons.cx | weblog
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:57 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2