Dark_Raver Posted December 26, 2007 Posted December 26, 2007 (edited) is there a way to make a quick yes/no dialog boxwitouth creating a new gui? i know that i can use MsgBox(4,"","") but i dont know how to detect the yes/no clicks in it either a solution or a tip to how to accept input would be very gratefull EDIT: oh and anyone has a snippet of code to dorce the first letter of a word to be capitalized? Edited December 26, 2007 by Dark_Raver
star2 Posted December 26, 2007 Posted December 26, 2007 (edited) right from the help file Return Value Success: Returns the ID of the button pressed. Failure: Returns -1 if the message box timed out. Button Pressed Return Value OK 1 CANCEL 2 ABORT 3 RETRY 4 IGNORE 5 YES 6 NO 7 TRY AGAIN ** 10 CONTINUE ** 11 $t = MsgBox (4, "test" ,"test") If $t = 6 Then SplashTextOn ("", "you have pressed Yes", 250, 30,-1,-1,1,-1,14,600) Sleep (2000) ElseIf $t = 7 Then SplashTextOn ("", "you have pressed No", 250, 30,-1,-1,1,-1,14,600) Sleep (2000) EndIf Edited December 26, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
Dark_Raver Posted December 26, 2007 Author Posted December 26, 2007 i saw that but i didnt knew how to use it i do now thanks for pointing it out being rude sometimes helps
star2 Posted December 26, 2007 Posted December 26, 2007 thanks for pointing it out being rude sometimes helps anything I said was rude to you? [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
Dark_Raver Posted December 26, 2007 Author Posted December 26, 2007 haha nah it was like "read the frigin manual moron" so i readed it and it made sense didnt saw your code you entered tough but io got it now any hints on the capitalization of the first letter tough? it would work fine witouth it but would look nicer
Bowmore Posted December 26, 2007 Posted December 26, 2007 EDIT: oh and anyone has a snippet of code to dorce the first letter of a word to be capitalized?This will change the first letter to upper case for a single word or a string of space separated words. $Test = "lowercase words in a title" $Test2 = _StringTitleCase($Test) MsgBox(0, "Title Case", "Before:" & @CRLF & $Test & @CRLF & "After:" & @CRLF & $Test2 ) Func _StringTitleCase($Title_In) Local $asWords = 0 Local $sTitle = '' $asWords = StringSplit($Title_In," ") If IsArray($asWords) Then For $i = 1 To $asWords[0] $asWords[$i] = StringUpper(StringLeft($asWords[$i],1)) & StringMid($asWords[$i],2) Next For $i = 1 To $asWords[0] - 1 $sTitle &= $asWords[$i] & " " Next $sTitle &= $asWords[$asWords[0]] Return $sTitle Else Return $Title_In EndIf EndFunc "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
LarryDalooza Posted December 26, 2007 Posted December 26, 2007 any hints on the capitalization of the first letter tough?I assume you would require this because your keyboard's shift key is busted...Lar. AutoIt has helped make me wealthy
Dark_Raver Posted December 26, 2007 Author Posted December 26, 2007 no, it needed to read something out of a ini file and i want to make it so that you dont have to think about forgetting caps and such
corey822 Posted December 26, 2007 Posted December 26, 2007 can i just ask on question how do u know wat number yes or no is? cheers C.W C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake
Dark_Raver Posted December 26, 2007 Author Posted December 26, 2007 search the included manual for the MsgBox function there is a list Star2 actualy mentioned it in the second post
corey822 Posted December 26, 2007 Posted December 26, 2007 ok sorry because i see people knowing these numbers all over the place and are they the same as the html/javascript ones? C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake
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