Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Choose-your-own-adventure gave #2



Hello,

I am still working on my choose-your-own-adventure game, and I want to determine which button was pressed. Right now, I use this code:

on clicked theObject
--Option 1
if theObject is equal to button id 2 of window id 1 then
display dialog "Option 1 was chosen"
end if


--Option 2
if theObject is equal to button id 3 of window id 1 then
display dialog "Option 2 was chosen"
end if
end
clicked

Right now, when the first button that I press first becomes gets handled as "Option 1" and the second button pressed becomes "Option 2". I don't want it to change from run to run depending on what the user does, I would like me to be able to say on the start screen "Press any button to continue..." Right now, I am working around this problem by forcing the user to press the button "Option 1". Any help will be greatly appreciated!

Thanks,
Connor
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.