• 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
Re: simple Quictime script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple Quictime script


  • Subject: Re: simple Quictime script
  • From: "Jan E. Schotsman" <email@hidden>
  • Date: Wed, 13 Oct 2010 22:48:20 +0200


On Oct 13, 2010, at 10:26 PM, Alex Zavatone wrote:

Here's how I call a subroutine from within a tell block. The problem is one of scope. We need to refer back to the current script and tell AppleScript that the sub routine you want to run is within the current script or it will think that you want the target of the tell block to try and call the subroutine.

So one way is instead of issuing a tell to another application and then calling the subroutine, use this:

using terms from application "QuickTime Player"

-- do stuff
set myValue to mySubroutine()

end using terms from


The other way to reference the script itself. Near the top of your script put this:


script main

And at the end of your script do this:

end script

Interesting. I thought it wasn't possible.

Jan E.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: simple Quictime script
      • From: Alex Zavatone <email@hidden>
References: 
 >Re: simple Quictime script (From: "Jan E. Schotsman" <email@hidden>)
 >Re: simple Quictime script (From: Alex Zavatone <email@hidden>)
 >Re: simple Quictime script (From: "Jan E. Schotsman" <email@hidden>)
 >Re: simple Quictime script (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: simple Quictime script
  • Next by Date: Re: simple Quictime script
  • Previous by thread: Re: simple Quictime script
  • Next by thread: Re: simple Quictime script
  • Index(es):
    • Date
    • Thread