Jump to content

Newb Question


Recommended Posts

Do you think I could make an InputBox then make text Loop the number of times they input in the Input Box? If so How?

When do you want them to get out of the loop? Or just trying to see how long before someone goes crazy?

Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
Link to comment
Share on other sites

Do you think I could make an InputBox then make text Loop the number of times they input in the Input Box? If so How?

I don't quite understand the question..

You want an input box that horizontally scrolls?

Also, if you label a thread like this one if someone else ever has this problem it become difficult to search for it without having 50 pages of results - please be more specific next time.

Edited by Anonymouse
children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

I mean Like Say they put a 5 in the Input box. Is it Possible to make it loop 5 (Or whatever they put in the InputBox) times then stop?

$howMany = InputBox("Loop", "How many times should I loop?")
$i = 1
Do
    MsgBox(0,"Loops test", "Loop #" & $i)
    $i = $i + 1
Until $i > $howMany
Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
Link to comment
Share on other sites

Im trying to figure out how to put it in...

Its for a Game my Friend plays

#include <GUIConstantsEx.au3>
GUICreate("Hello World", 200, 100) 
GUICtrlCreateLabel("Welcome too MaxBot Mana Trainer", 30, 10)
GUICtrlCreateButton("Start", 70, 50, 60)
GUISetState(@SW_SHOW)
Winactive("Tibia")
Sleep(1000)
Mousemove(257, 703)
MouseClick("left")
$input = InputBox("Spells", "")
$i = 0
Do
    $i = $i + 1
    ConsoleWrite($i & @CRLF)
Until $i = $input
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Send("Exura")
Send("{Enter}")
Sleep(1000)
GUISetState(@SW_SHOW)
Sleep(2000)

That makes it Automatically Use the Spell 20 Times. So where should I insert the Script you guys have me?

Edited by Tweekin
Link to comment
Share on other sites

Sorry im a newb with this (Started Last Night). How would I put that in?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 171, 112, 445, 332)
$Input1 = GUICtrlCreateInput("", 24, 32, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)); ES_Number means it has to be an integer
GUICtrlSetLimit(-1, 10); 10 is the maximum number of numbers you can put in, ie: 9999999999
$Button1 = GUICtrlCreateButton("OK", 48, 64, 75, 25, 0)
GUISetState(@SW_SHOW)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $nCurVar = Int(GUICtrlRead($Input1)); if you click the button it saves input data as an integer to variable "ncurvar"
            If $nCurVar <= 9999999999 Then; if that variable is less than or equal to 9999999999 then continue
            Do
                For $i=1 To $nCurVar
                    MsgBox(0, "Count down!", $i)
                Next
            Until $i > $nCurVar; continue until you get to input number
        
    ElseIf $nCurVar > 9999999999 Then; if the input data is above 999999999 (you can put any number here) give error msg
        MsgBox(0, "Whatever", "You must enter a number under blah./r/Added this incase you need it")
    EndIf   
EndSwitch
WEnd
Edited by Anonymouse
children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

double posted -.-, i added some information to try and explain why everything was used. If you don't understand please feel free to PM me and I will further explain.

It's all about knowing why, so you don't have to ask again :) right?

Good luck.

[edit2] it might make more sense to actually make casting the spell a Function, then call that function X times to make your life a little simpler... as in call function X number of times instead of MSG box saying the number.[/edit]

[HINT] DO NOT PUT 9999999999 IN INPUT BOX FOR SAMPLE CODE.. if you do ctrl alt del :P[/HINT]

Edited by Anonymouse
children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

You probably want this:

#include <GUIConstantsEx.au3>
GUICreate("Hello World", 200, 100) 
GUICtrlCreateLabel("Welcome too MaxBot Mana Trainer", 30, 10)
GUICtrlCreateButton("Start", 70, 50, 60)
GUISetState(@SW_SHOW)
Winactive("Tibia")
Sleep(1000)
Mousemove(257, 703)
MouseClick("left")
$input = InputBox("Spells", "")
$i = 0
Do
    $i = $i + 1
    ConsoleWrite($i & @CRLF)
Send("Exura")
Send("{Enter}")
Sleep(1000)
Until $i = $input

GUISetState(@SW_SHOW)
Sleep(2000)
Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
Link to comment
Share on other sites

Ok Thank you Working Great.

One more Question:

Is it possible to make another InputBox so they can cast a Different Spell?

Thats why I did the Case, and said to make it a function. You could make multiple buttons for multiple spells, or make multiple input boxes for multiple spells.

If you don't understand let me know and I'll give you another sample code.

children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...