Jump to content

[Help] Apply Multiple Scripts to GUI


Recommended Posts

Hello AutoIt members :blink: I'm fairly new to GUI and I'd like some help on my bot. Here is what the GUI looks like using Koda

Posted Image

The Code Koda created with it

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\administrator\desktop\koda\forms\form1.kxf
$Form1_1 = GUICreate("TwikiE's PyPQ Bonus Botter v.87", 255, 127, 190, 111)
$Label1 = GUICtrlCreateLabel("Mode", 176, 16, 31, 17)
$Radio1 = GUICtrlCreateRadio("Easy", 136, 32, 113, 17)
$Radio2 = GUICtrlCreateRadio("Normal", 136, 56, 113, 17)
$Radio3 = GUICtrlCreateRadio("Hard", 136, 80, 113, 17)
$Radio4 = GUICtrlCreateRadio("Hell", 136, 104, 113, 17)
$Label2 = GUICtrlCreateLabel("Lag", 48, 16, 22, 17)
$Button1 = GUICtrlCreateButton("Start!", 24, 80, 75, 25)
$Delay = GUICtrlCreateInput("Delay", 0, 32, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I'll give you guys a brief description, each radio under Mode is a different script, and under Lag is the delay. I want the user to input a value for Lag and apply that as that number to all sleep times throughtout the script, would I store it in a variable, how would I do so. Also I'd like the user to choose a mode and press start when they are done, start would start the script of course. I've already made my script for all the Modes, how would I put it the GUI Script, also how do I put the Lag value to all sleep values in the script. And last but not least how do I make it all work at once upon pressing start ;)

If it is possible, can I change the icon in that picture, the icon on the top left of the GUI?

Script for Easy

sleep(1000)
Send ("{right down}")
sleep(6000)
Send ("{right up}")
sleep(100)
Send ("{SPACE}")
sleep(750)
Send ("{down}")
sleep(300)
Send ("{down}")
sleep(300)
Send ("{down}")
sleep(300)
Send ("{space}")
sleep(750)
Send ("{space}")
sleep(5000)
Send ("{right down}")
sleep(600)
Send ("{right up}")
sleep(400)
Send ("{down down}")
sleep(300)
send("{ALT}"
sleep(300)
Send ("{down up}")
sleep(100)
Send ("{left down}")
sleep(100)
Send ("{left up}")
sleep(100)
Send("^")
sleep(100)
Send("^")
sleep(100)
Send("^")
sleep(100)
Send("^")
sleep(100)
Send("^")

The Normal, Hard, and Hell are very similar.

[Edit: This was posted in the GUI section as well, but no replies yet, not sure if this is the right section]

Thanks

Rice

Edited by riceking

\

Link to comment
Share on other sites

Double post ... Intentional by the looks of it.

Goto First -> [Help] Beginning a bot Any help would be appreciated :blink:

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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