I’m trying to automate the start up and shutdown of Classic.
I only want to run Classic mode when I use Adobe Streamline. Is there a script out there that can launch Classic, open Adobe Streamline, when closing Streamline the computer will also automatically terminate Classic mode.
The reason why I want this is to only open Classic Mode for the duration of the Classic Application. This will save my precious time in the long run.
There are really only two options here, as far as I can tell.
The MacOS or Streamline itself would need to be at least partially ‘attachable’, but it’s not. See, in order for a script to run at the time Adobe Streamline is quit, you would need to be able to capture the quit event. This is referred to as ‘attachability’ in the AS world. Unfortunately, Streamline isn’t attachable, nor is the OS.
Background script. The other option here is to create some kind of background AppleScript which would stay open and monitor the OS for certain conditions and run your desired actions accordingly. So, as long as this script was running, it could see if Streamline was running and poll at a time interval of, say, every 10 seconds. When it noticed that Streamline was no longer running, it could terminate Classic.
I’m not sure either of these options are very desirable though, much less elegant.
I don’t know - I haven’t tried it… but I think that YoupiKey (I have version 1.7.5) will allow you to set such an event as a “sequence”. Just write a quick script to quit the application, then set the sequence to shutdown the classic environment. It should work.
Now, you’d have to run it from the YoupiKey menu (or have it set as a hot-key combination), but it should work.
Classic will start up automatically when the application is launched, the question is how to have it force quit using an apple script. What I’m thinking is maybe having a script on the desktop that you click on, it quits the os9 application and then force quits classic, or it could just force quit classic…which would close the os9 application as well. The question is how to have a script force quit classic. This I don’t know, but would like to find out.
Either way, it would be the same amount of time, quitting the os9 app, or double clicking a script, with x you could set a key combination to launch the script, so it could be that simple as well. I don’t like having scripts running in the background all the time, so this would be better for someone like me.
quit application "Classic Support"
This quits classic and all it’s applications.
Save as application and set a hot key for it, or put it in the script menu.
Simple and does the job. If you have unsaved changes open in a current document the dialog to save or don’t save still comes up.
Good luck, and let us know what the end code looks like, maybe it could help some others. like me.
It does the job. Quitting «Classic Support», quits «TruBlueEnvironnement», and the OS 9 app I was running, «Bedford Simply Accounting». It also saved all changes before closing the app.
Worked great for me.
… but when in an handler, it does not seem to work. Is that possible ? As a stand alone script it works perfectly.
Thanks in advance.