• 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
Calling a Sub from inside a tell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: [ANN] AppleScript Pro training sessions
  • Next by Date: Re: Calling a Sub from inside a tell
  • Previous by thread: Re: [ANN] AppleScript Pro training sessions
  • Next by thread: Re: Calling a Sub from inside a tell
  • Index(es):
    • Date
    • Thread