• 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
Akua Sweets: Puppet Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Akua Sweets: Puppet Menu


  • Subject: Akua Sweets: Puppet Menu
  • From: Landis <email@hidden>
  • Date: Fri, 23 Nov 2001 09:35:29 -0800

I need to open a file (the program can do that) then choose a menu option (Stitch Panorama) which will open a new window once it finishes (this can take anywhere from 10 seconds to 45 minutes). Once it does that I want to close the window (File, Close) and save the document (File, Save) and then close the document (File, Close).

At one point it seemed like the puppet menu command would wait for the application to return control before it gave control back to the script. Now it seems to try to execute immediately. This crashes the application with an error of type -2. Is there a way to make the puppet menu wait until the process is done (given that I don't know whether it will take 10 seconds or 45 minutes)? Maybe a way to check if the file menu is no longer grayed out before it tries the next command?

Any suggestions?

Landis

--The handler
--Opens the item "PSName" in QTVRAS and runs the Stitch command,
--saves, and closes
on StitchThis(PSName)
tell application "QTVR Authoring Studio 1.0.1"
activate
--Open the stitcher
open (PSName)
--using Akua Sweets
--"Stitch Panorama" will open progress window,
--and when completed will open panorama movie in a new window
puppet menu {"Panorama", "Stitch Panorama"}
--(* without all this stuff the program won't crash,
--but it will pile up new windows
--Must close this new window
puppet menu {"File", "Close"}
--Must save, but only possible if "proj" file had been altered
try
puppet menu {"File", "Save"}
end try
--Must close the stitcher window
puppet menu {"File", "Close"}
--*)
end tell
end StitchThis

If it would help, the entire script can be seen at:
http://homepage.mac.com/landis/BatchRestitch.txt
The handler I'm having problems with is at the top called StitchThis.
The rest is just to make it run a batch.


  • Prev by Date: Re: how to quit a script
  • Next by Date: Re: Please explain this!? More....
  • Previous by thread: Re: OS X Mail.app scripting "check mail"
  • Next by thread: Number of days since 1/1/0001
  • Index(es):
    • Date
    • Thread