arminius Posted April 25, 2008 Share Posted April 25, 2008 I'm wanting msg box to turn itself off when i click on the default ok button, this happens with the following coding CODESelect ; Daily Rituals Case @HOUR=06 MsgBox(262144, "Reminder", "go to class") Case @HOUR=17 MsgBox(262144, "Reminder", "cook dinner") EndSelect but I want their to be a second button which when I click on it will make the button appear again say 30 mins all I'm having trouble with is setting the differnt execute with the spare button? how would I do that? Link to comment Share on other sites More sharing options...
Achilles Posted April 25, 2008 Share Posted April 25, 2008 Here's a starter: $result = Msgbox(4, 'Question', 'Is AutoIt awesome?') If $result = 6 then Msgbox(0, 'Correct', 'Good answer') Else Msgbox(0, 'Wrong', 'You are crazy!') Endif You can have different buttons, look in the helpfile for those options. Each button has it's own return value (like Yes is 6), you can find those in the helpfile too. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
arminius Posted April 25, 2008 Author Share Posted April 25, 2008 how would I go about keeping the case system I have, but still having the result = 1 then do this, result = 1 then do something completely different Link to comment Share on other sites More sharing options...
BrettF Posted April 25, 2008 Share Posted April 25, 2008 how would I go about keeping the case system I have, but still having the result = 1 then do this, result = 1 then do something completely differentCode would help.... My Crystal ball is cloudy... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
arminius Posted April 25, 2008 Author Share Posted April 25, 2008 I ment to say how would I go about keeping the case system I have, but still having the result = 1 then do this, result = 2 then do something completely different Link to comment Share on other sites More sharing options...
BrettF Posted April 25, 2008 Share Posted April 25, 2008 I ment to say how would I go about keeping the case system I have, but still having the result = 1 then do this, result = 2 then do something completely differentHard to say without code, but maybe... $msg = "" $szName = InputBox(Default, "Please enter a word.", "", " M", Default, Default, Default, Default, 10) Switch @error Case 2 $msg = "Timeout " ContinueCase Case 1; Continuing previous case $msg &= "Cancellation" Case 0 Switch $szName Case "a", "e", "i", "o", "u" $msg = "Vowel" Case "QP" $msg = "Mathematics" Case "Q" to "QZ" $msg = "Science" Case Else $msg = "Others" EndSwitch Case Else $msg = "Something went horribly wrong." EndSwitch MsgBox(0, Default, $msg) Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now