Reptos Posted December 20, 2015 Share Posted December 20, 2015 Hello! I'm kinda new to autoit so i'd like to know how to do something. I have a bot that i want to have a input box to choose the amount of numbers the script loops. After the total amount of loop's have been done i want it to do another script once and then loop back to the first script? How is this done? Link to comment Share on other sites More sharing options...
Developers Jos Posted December 20, 2015 Developers Share Posted December 20, 2015 (edited) I have removed your duplicate thread. Seems you have already tried something so what about you share what you have that isn't working yet?Jos Edited December 20, 2015 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Reptos Posted December 20, 2015 Author Share Posted December 20, 2015 I have removed your duplicate thread. Seems you have already tried something so what about you share what you have that isn't working yet?JosThis is my first thread? I just signed up lol. Link to comment Share on other sites More sharing options...
JohnOne Posted December 20, 2015 Share Posted December 20, 2015 While 3 $iLoops = Number(InputBox("", "")) For $i = 1 To $iLoops _DoSomething_1($i) Next _DoSomething_2() WEnd Func _DoSomething_1($i) ConsoleWrite("-Doing something 1 " & $i & @LF) EndFunc Func _DoSomething_2() ConsoleWrite("+Doing something 2" & @LF) EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Trong Posted December 20, 2015 Share Posted December 20, 2015 Local $input,$num While 1 $num+=1 $input=InputBox("Enter Somethink","You Enter: "&$input,"","",-1,130) If @error=1 Then ExitLoop ConsoleWrite($input&@CRLF) If $input="xxx" Or $num>5 Then OtherScript() $num=0 EndIf WEnd Func OtherScript() MsgBox(48,"Other Script","Some think!") EndFunc Regards, Link to comment Share on other sites More sharing options...
Reptos Posted December 20, 2015 Author Share Posted December 20, 2015 Local $input,$num While 1 $num+=1 $input=InputBox("Enter Somethink","You Enter: "&$input,"","",-1,130) If @error=1 Then ExitLoop ConsoleWrite($input&@CRLF) If $input="xxx" Or $num>5 Then OtherScript() $num=0 EndIf WEnd Func OtherScript() MsgBox(48,"Other Script","Some think!") EndFunc Thanks! It worked but could you show me how to do something via skype? My skype is ChipinOw Link to comment Share on other sites More sharing options...
Developers Jos Posted December 20, 2015 Developers Share Posted December 20, 2015 This is my first thread? I just signed up lol.So you mean to say you haven't tried anything yet nor researched what information is already available and thought I start fishing right away?Well you have 2 who did bite. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Reptos Posted December 20, 2015 Author Share Posted December 20, 2015 So you mean to say you haven't tried anything yet nor researched what information is already available and thought I start fishing right away?Well you have 2 who did bite. JosAhh, I get what you're saying. I did do research on the topic but i couldn't find out how to do it how i wanted it so i thought i'd come here. Link to comment Share on other sites More sharing options...
Trong Posted December 20, 2015 Share Posted December 20, 2015 Thanks! It worked but could you show me how to do something via skype? My skype is ChipinOwI was a goof (it is how people describe me)english is not my primary language.I'm not good AutoIt and english too.And this forums is support to use AutoIt, not where the request to write programsI finally do not use skype.Sorry. Regards, Link to comment Share on other sites More sharing options...
Reptos Posted December 21, 2015 Author Share Posted December 21, 2015 (edited) Hello! I'm in need of help. I'm trying to figure out how to make someone choose the amount of times a script loops instead of just being on infinite loop with While 1? After it looped the chosen amount of times i want it to run another function and then loop back to the 1st function.Func $stay MouseClick("Left",304,203) EndFuncIf $Input1 = +1> Then $StayFunc $Input1 while 1 = +1 loop = $StayAlso How would i go about them putting their username into a textbox and then it typing it into the position where i have the send command? Edited December 21, 2015 by Reptos Link to comment Share on other sites More sharing options...
Developers Jos Posted December 21, 2015 Developers Share Posted December 21, 2015 (edited) Why did you open a new topic in stead of sticking to the previous one?Weren't the answers what you were expecting?Merged and let's not do this again.Jos Edited December 21, 2015 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Reptos Posted December 21, 2015 Author Share Posted December 21, 2015 Why did you open a new topic in stead of sticking to the previous one?Weren't the answers what you were expecting?Merged and let's not do this again.JosNo one is going to come back here... So i just opened a new one Link to comment Share on other sites More sharing options...
Trong Posted December 22, 2015 Share Posted December 22, 2015 Hello! I'm in need of help. I'm trying to figure out how to make someone choose the amount of times a script loops instead of just being on infinite loop with While 1? After it looped the chosen amount of times i want it to run another function and then loop back to the 1st function.Func $stay MouseClick("Left",304,203) EndFuncIf $Input1 = +1> Then $StayFunc $Input1 while 1 = +1 loop = $StayAlso How would i go about them putting their username into a textbox and then it typing it into the position where i have the send command? You may need:expandcollapse popup#NoTrayIcon Global Const $GUI_EVENT_CLOSE = -3 Global Const $GUI_CHECKED = 1 Global Const $GUI_UNCHECKED = 4 Global $hGUI = GUICreate("Mouse Click", 360, 76, -1, -1) GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -77, 0, 0, 72, 72) GUICtrlCreateLabel("Mouse:", 80, 0, 39, 17) GUICtrlCreateLabel("X:", 104, 24, 14, 17) Global $iX = GUICtrlCreateInput("123", 136, 24, 33, 21) GUICtrlCreateLabel("Y:", 200, 24, 14, 17) Global $iY = GUICtrlCreateInput("456", 216, 24, 41, 21) GUICtrlCreateLabel("Clicks:", 184, 56, 30, 17) Global $iC = GUICtrlCreateInput("5", 216, 48, 41, 21) GUICtrlCreateLabel("Speed:", 88, 56, 34, 17) Global $iS = GUICtrlCreateInput("10", 136, 48, 33, 21) Global $bLeft = GUICtrlCreateRadio("Left", 136, 0, 41, 17) GUICtrlSetState($bLeft, $GUI_CHECKED) Global $bRight = GUICtrlCreateRadio("Right", 208, 0, 49, 17) Global $bClickNow = GUICtrlCreateButton("Click Now", 272, 0, 81, 73) GUISetState(@SW_SHOW) HotKeySet("{ESC}", "_Exit") ;If you press ESC the script will stop Global $nMsg, $x, $y, $Speed, $Button, $ClickTime While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Exit() Case $bClickNow Clicks() EndSwitch WEnd Func Clicks() $x = GUICtrlRead($iX, 0) $y = GUICtrlRead($iY, 0) $ClickTime = GUICtrlRead($iC, 0) $Speed = GUICtrlRead($iS, 0) If GUICtrlRead($bLeft, 0) = $GUI_CHECKED Then $Button = "left" If GUICtrlRead($bLeft, 0) = $GUI_CHECKED Then $Button = "right" ;MouseClick ( $Button, $x, $y , $ClickTime , $Speed) If $ClickTime > 1 Then While $ClickTime $ClickTime -= 1 MouseClick($Button, $x, $y, 1, $Speed) WEnd Else MouseClick($Button, $x, $y, 1, $Speed) EndIf EndFunc ;==>Clicks Func _Exit() Local $ask=MsgBox(36,"Mouse Click","Are you sure want to exit?",Default,$hGUI) If $ask=6 Then Exit EndFunc ;==>_Exit Or: While True <> False Local $input = Input1() If $input > 0 Then Click($input) WEnd Func Input1() Local $input = InputBox("Mouse Click", "Loop: ", "", "", -1, 130) If @error = 1 Then Exit Return $input EndFunc ;==>Input1 Func Click($input) While $input $input -= 1 MouseClick("Left", 304, 203) If $input < 1 Then ExitLoop WEnd EndFunc ;==>Click Regards, Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2015 Developers Share Posted December 22, 2015 No one is going to come back here... So i just opened a new oneDon't think that is the case when you show progress keep posting here.Either way: Just stick to one topic.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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