Penisaurus Posted March 14, 2010 Posted March 14, 2010 Okay so, I've been working on a program for a chatroom that has functions for ease of access in doing things.I'd like to make a function to where it makes an input box like so:InputBox("Chatroom Program","How many chats would you like to join?", "", "", 110, 140)Then I would type in a number, such as three, then three input boxes would come up: (Or however many I wanted)$Input1 = InputBox("Chatroom Program","Please input a chatroom name:", "", "", 110, 140) $Input2 = InputBox("Chatroom Program","Please input a chatroom name:", "", "", 110, 140) $Input3 = InputBox("Chatroom Program","Please input a chatroom name:", "", "", 110, 140Then it would join those chats using send:Send("/join "& $Input1) Send("/join "& $Input2) Send("/join "& $Input3)Now my question is, is how would that be accomplished in the first place?And, how could you make it so that the script could define a variable by itself?
JohnOne Posted March 15, 2010 Posted March 15, 2010 Something like this perhaps (untested) $sInput = InputBox("Chatroom Program","How many chats would you like to join?", "", "", 110, 140) $var = GUICtrlRead($sInput) If Not @error And IsInt($var) Then For $i = 1 To $var GUICtrlCreateInput("Chatroom" & $i, $i + 12, $i + 12, 10, 50) ; figure out where to put them Next EndIf AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
dani Posted March 15, 2010 Posted March 15, 2010 $var will be a String so IsInt($var) will not work. IsInt(Number($var)) would though.
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