Eric1 Posted April 27, 2007 Share Posted April 27, 2007 (edited) Hi, first post and all that. To the point; Q1: How - if you can - do you insert func's into If statements? Q2: What are the Msg Box options - 1 through 8 I think. Q3: How would I make a script that sends a random letter, or number (or a set of letters and numbers) without repeating the same thing twice? Q4: How could I make a a script that if I pushed a certain button, it would end, regardless of if it's done or not. Sorry for being so new at this Edited April 27, 2007 by Eric1 Link to comment Share on other sites More sharing options...
searchresult Posted April 27, 2007 Share Posted April 27, 2007 Hi, first post and all that. To the point; Q1: How - if you can - do you insert func's into If statements?Q2: What are the Msg Box options - 1 through 8 I think. Q3: How would I make a script that sends a random letter, or number (or a set of letters and numbers) without repeating the same thing twice?welcome to the forum.you have it in autoit help file or try search on the forum...if that doesn't help replay and will be answered Link to comment Share on other sites More sharing options...
Eric1 Posted April 27, 2007 Author Share Posted April 27, 2007 welcome to the forum.you have it in autoit help file or try search on the forum...if that doesn't help replay and will be answeredYeah... About that.... i did =PI've read the help file (booooooring) but I'm gona go search it and if that doesn't work, then w/e. Link to comment Share on other sites More sharing options...
Shevilie Posted April 27, 2007 Share Posted April 27, 2007 I've read the help file (booooooring)Everytime you ask a question this is the place we will redirect you to You should take a quick tour through it or try the Auto 1 2 3 in my signatur, that should get you going Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
searchresult Posted April 27, 2007 Share Posted April 27, 2007 you also have examples in autoit already done scripts that helpd me a lot... look to find help for a function or something write in auto it for example writ msgbox click on it and then press f1 that should give you fast way help about what you wont Link to comment Share on other sites More sharing options...
searchresult Posted April 27, 2007 Share Posted April 27, 2007 Everytime you ask a question this is the place we will redirect you to You should take a quick tour through it or try the Auto 1 2 3 in my signatur, that should get you goingyou said it right Link to comment Share on other sites More sharing options...
thenewkid Posted April 27, 2007 Share Posted April 27, 2007 (edited) could this help you a bit i made a litte script that uses the ifs, random a lot Msg Boxs and a button on a gui with a label and a hotkey expandcollapse popup#include <GUIConstants.au3> HotKeySet("Esc","_Exit") ;will make a form $Form1 = GUICreate("??", 110, 90, 193, 115) ; will make a label $Label1 = GUICtrlCreateLabel("", 32, 16, 43, 17) ; will make a button $Button1 = GUICtrlCreateButton("??", 16, 48, 75, 25, 0) ; this makes the gui show GUISetState(@SW_SHOW) ;main loop While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ;will run the Go() func Go() EndSwitch WEnd Func _Exit() MsgBox(0,"??","Will now exit") Exit EndFunc Func Go() $whatone = Random(1,2,1) If $whatone = "1" Then ; will run the _123() func _123() Else ; will run the _letters() func _letters() EndIf EndFunc Func _123() ;will make the number $number = Random(1,3,1) MsgBox(0,"??","a new number was picked") ;will make the labael show the number that was picked GUICtrlSetData($Label1, $number ) EndFunc Func _letters() ; is the bit to make ramdon numbers $abc = Random( 1, 3, 1) ; this will make the numbers in to leters if $abc = "1" Then ; if the random picks 1 then it will chage it to a $abc = "a" ElseIf $abc = "2" Then ; if the random picks 2 then it will chage it to b $abc = "b" ElseIf $abc = "3" Then ; if the random picks 2 then it will chage it to c $abc = "C" EndIf MsgBox(0,"??","a new letter was picked") ;will make the label show the letter that was picked GUICtrlSetData($Label1, $abc) EndFunc Edited April 27, 2007 by thenewkid some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with 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