Go Back   The macosxhints Forums > Working with OS X > OS X Developer



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-04-2008, 02:44 PM   #1
NovaScotian
Hall of Famer
 
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 3,330
Quote:
Originally Posted by J Christopher
Okay, thanks. That makes sense.

Just to make sure I'm understanding correctly,

Code:
my doWithTimeout(uiScript, timeoutSeconds)
is the functional equivalent (in this particular case) to

Code:
tell application "System Events" to keystroke tab
delay 2
Is this correct?

Is the "my doWithTimeout()" a single defined function, or is "my" separate from "doWithTimeout()"? If the latter is true, what does "my" do?

Your functional equivalent is correct, and my refers to the script itself, usually meaning that AppleScript, Standard Additions, or a Scripting Addition should do it, not a tell block in which the command is embedded:

Code:
tell application "Finder"
	set someThing to my Handler(arguments)
end tell

on Handler(arg)
	-- do stuff the Finder doesn't know about
end Handler
__________________
PPC dual-core G5/2.3, OS X 10.5.8; 17" MBP Core 2 Duo/2.6, OS X 10.6.2; VMWare Fusion->Win XP
NovaScotian is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting 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

Forum Jump


All times are GMT -5. The time now is 04:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.