Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > scripting classic from X...

scripting classic from X...
Thread Tools
Dedicated MacNNer
Join Date: Apr 1999
Location: MA
Status: Offline
Reply With Quote
Jan 18, 2002, 08:51 AM
 
hi,

I haven't done much of anything with AS (in either classic or X) and I've come across a problem that sounds perfect to solve with a script.

My 4 year old son has a number of classic games that he plays -- these all assume that the monitor is in 640x480, which of course, isn't a normal resolution for X. The games run fine in 800x600 or 1024x768, just with a border around them -- which annoys him greatly.

What I would like to do is to wrap the games with a script that would switch the res to 640x480, launch the game, and then, when the game exits, switch back to 800x600.

Right now, we have to go to the system prefs and change it manually for him -- not too hard, but if he wants to start playing all by himself he can't switch the resolution on his own.

Also, on a related topic, I know that I can make an app start on login -- can I also do launch a script on logout as well?

thanks!
dennis
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jan 18, 2002, 04:09 PM
 
Originally posted by SmileyDude:
<STRONG>My 4 year old son has a number of classic games that he plays -- these all assume that the monitor is in 640x480, which of course, isn't a normal resolution for X. The games run fine in 800x600 or 1024x768, just with a border around them -- which annoys him greatly.

What I would like to do is to wrap the games with a script that would switch the res to 640x480, launch the game, and then, when the game exits, switch back to 800x600.</STRONG>
This is be do-able with CoreGraphics, but that's a C API so I'm not sure about scripting.

<STRONG>Also, on a related topic, I know that I can make an app start on login -- can I also do launch a script on logout as well?</STRONG>
You can launch a script, yes. See Mac OS X: System Overview, and look for the LoginHook/LogoutHook references.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:45 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2