Calling a Sub from inside a tell
Calling a Sub from inside a tell
- Subject: Calling a Sub from inside a tell
- From: Gary Bielby <email@hidden>
- Date: Thu, 03 Mar 2005 10:59:01 +0000
Hi, l'm trying to call another sub routine from within a tell block and
l'm getting an error back from QuarkXpress.
To my understanding you need to have 'my' before the sub call if you are
in tell block... the error l'm getting is:
QuarkXPress got an error: Can't make some data into expected type.
Has anyone got any ideas?
Regards, Gary.
the code is:
---------------------
on processLevel(boxName, docName, idnum, theItem)
tell application "QuarkXPressÂȘ4.1"
activate
tell document docName
display dialog "Looking at Text box: " & (boxName)
tell text box (boxName)
if (count of items in theItem) > 0 then
display dialog (count of items in theItem)
repeat with theNewItem in theItem
display dialog "Doing level ID " & idnum
my cutIt(boxName)
if box overflows then
display dialog "still overflows"
set proceed to true
else
set proceed to false
undo
exit repeat
end if
end repeat
if box overflows then
set proceed to true
else
set prceed to false
end if
end if
end tell
end tell
end tell
return (proceed)
end processLevel
on cutIt(boxName)
display dialog "Cutting"
end cutIt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden