Sign in to follow this  
Followers 0
bigassmuffin

Linking GUIs to scripts

10 posts in this topic

#1 ·  Posted (edited)

I have a script,

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xB50400
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")
While 1
    If $game = 1 Then
        $coord = PixelSearch( 0, 0, 1023, 651, $color, 10, 20)
        If IsArray($coord) = 1 Then
            MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
            Sleep(3000)

        EndIf
    EndIf   
WEnd   



Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc
 
Func quit()
    Exit
EndFunc

This script works fine without the GUIs..

Then when I add my GUI,

#include <GuiConstants.au3>

GuiCreate("MyGUI", 251, 322,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))


$Checkbox_10 = GuiCtrlCreateCheckbox("Fight Mobs?", 120, 150, 90, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;
    EndSelect
WEnd
Exit

If BitAND(GUICtrlRead($Checkbox_10), $GUI_CHECKED) = $GUI_CHECKED Then
Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xB50400
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")
While 1
    If $game = 1 Then
        $coord = PixelSearch( 0, 0, 1023, 651, $color, 100, 20)
        If IsArray($coord) = 1 Then
            MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
            Sleep(3000)

        EndIf
    EndIf   
WEnd
EndIf

Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

The code does not work when I hit Shift + q'

Any help?

Id really appreciate it!

Edited by bigassmuffin

Share this post


Link to post
Share on other sites



#include <GuiConstants.au3>

$My_GUI = GuiCreate("MyGUI", 251, 322,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))


$Checkbox_10 = GuiCtrlCreateCheckbox("Fight Mobs?", 120, 150, 90, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    EndSelect
    If BitAND(GUICtrlRead($Checkbox_10), $GUI_CHECKED) = $GUI_CHECKED Then 
        GUIDelete($My_GUI)
        ExitLoop
    EndIf
WEnd



Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xB50400
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")
While 1
    If $game = 1 Then
        $coord = PixelSearch( 0, 0, 1023, 651, $color, 100, 20)
        If IsArray($coord) = 1 Then
            MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
            Sleep(3000)

        EndIf
    EndIf  
WEnd


Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

wow muffin, you're really in to this conquer bot aren't you :P , got a script that took 2 threads to complete, and a gui to boot. ;):evil:

such determination and effort for a simple aimbot :D

:D

glad to see it!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I was hoping that if I wanted to do the same thing for antoher box, I can, but apparently I can't...

Heres my script:

#include <GuiConstants.au3>

$My_GUI = GuiCreate("MyGUI", 251, 322,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))


$Checkbox_10 = GuiCtrlCreateCheckbox("TEXT", 120, 150, 90, 20)
$Checkbox_11 = GuiCtrlCreateCheckbox("TEXT", 100, 170, 1, 20)
$Button_18 = GuiCtrlCreateButton("Close", 150, 290, 90, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $Button_18
        Exit
    EndSelect
    If BitAND(GUICtrlRead($Checkbox_10), $GUI_CHECKED) = $GUI_CHECKED Then 
        ExitLoop
    EndIf
WEnd

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xBF5046
$color2 = 0x044BB
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")



While 1
    If $game = 1 Then
        $coord = PixelSearch( 0, 0, 1023, 651, $color, 2, 20)
        If IsArray($coord) = 1 Then
            MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
            Sleep(3000)

        EndIf
    EndIf  
WEnd



GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    EndSelect
    If BitAND(GUICtrlRead($Checkbox_11), $GUI_CHECKED) = $GUI_CHECKED Then 
        ExitLoop
    EndIf
WEnd


While 1
          If $game = 1 then
    $coord1 = PixelSearch( 0, 0, 1023, 651, $color2, 10, 5)
         If IsArray($coord1) = 1 Then
        MouseClick('left', $coord1[0], $coord1[1] - 0, 1, 0)
        Sleep(3000)
         EndIf
         Endif
     WEnd   



Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

Checkbox 10 works fine...but checkbox 11 does not work if checked..

Checkbox 11 does work thoguh without the GUI

Like always, any help is apprecaited! THANKS!

Edited by bigassmuffin

Share this post


Link to post
Share on other sites

??????????????????????????????

Share this post


Link to post
Share on other sites

You really need to read up on your control structures.

#include <GuiConstants.au3>

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xBF5046
$color2 = 0x044BB
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")


$My_GUI = GuiCreate("MyGUI", 251, 322,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))


$Checkbox_10 = GuiCtrlCreateCheckbox("TEXT", 120, 150, 90, 20)
$Checkbox_11 = GuiCtrlCreateCheckbox("TEXT", 100, 170, 1, 20)
$Button_18 = GuiCtrlCreateButton("Close", 150, 290, 90, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $Button_18
        Exit
    EndSelect
    If BitAND(GUICtrlRead($Checkbox_10), $GUI_CHECKED) = $GUI_CHECKED Then 
        While 1
    If $game = 1 Then
        $coord = PixelSearch( 0, 0, 1023, 651, $color, 2, 20)
        If IsArray($coord) = 1 Then
            MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
            Sleep(3000)

        EndIf
    EndIf  
WEnd

    EndIf
    If BitAND(GUICtrlRead($Checkbox_11), $GUI_CHECKED) = $GUI_CHECKED Then 
        While 1
          If $game = 1 then
    $coord1 = PixelSearch( 0, 0, 1023, 651, $color2, 10, 5)
         If IsArray($coord1) = 1 Then
        MouseClick('left', $coord1[0], $coord1[1] - 0, 1, 0)
        Sleep(3000)
         EndIf
         Endif
     WEnd   
    EndIf
WEnd

Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

Messy, but it should work!

Run it through Tidy to make it neater!

#)

Share this post


Link to post
Share on other sites

Thank you for helping, but unfortunatly, it does not work AT ALL<--

THe GUI doesnt load checkbox 10, and checkbox 11 still doesnt work, thank you for trying though,

If anyone can help, I would greatly appreciate it!

Share this post


Link to post
Share on other sites

Thank you for helping, but unfortunatly, it does not work AT ALL<--

THe GUI doesnt load checkbox 10, and checkbox 11 still doesnt work, thank you for trying though,

If anyone can help, I would greatly appreciate it!

Try this:

#include <GuiConstants.au3>

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$color = 0xBF5046
$color2 = 0x044BB
$game = 0
HotKeySet("+q", "Play")
HotKeySet("{ESC}", "quit")

$My_GUI = GuiCreate("MyGUI", 251, 322,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Checkbox_10 = GuiCtrlCreateCheckbox("TEXT", 120, 150, 90, 20)
$Checkbox_11 = GuiCtrlCreateCheckbox("TEXT", 100, 170, 1, 20)
$Button_18 = GuiCtrlCreateButton("Close", 150, 290, 90, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Button_18
            Exit
    EndSelect
    
    If BitAND(GUICtrlRead($Checkbox_10), $GUI_CHECKED) = $GUI_CHECKED Then
        If $game = 1 Then
            $coord = PixelSearch( 0, 0, 1023, 651, $color, 2, 20)
            If IsArray($coord) = 1 Then
                MouseClick('left', $coord[0], $coord[1] - -30, 1, 0)
                Sleep(3000)
            EndIf
        EndIf
    EndIf
    
    If BitAND(GUICtrlRead($Checkbox_11), $GUI_CHECKED) = $GUI_CHECKED Then
        If $game = 1 then
            $coord1 = PixelSearch( 0, 0, 1023, 651, $color2, 10, 5)
            If IsArray($coord1) = 1 Then
                MouseClick('left', $coord1[0], $coord1[1] - 0, 1, 0)
                Sleep(3000)
            EndIf
        Endif
    EndIf
WEnd

Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

Note: I didn't test your strange setting $game variable ...

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Still doesnt work, I even put the same EXACT variables and cords and EVERYTHING that is in checkbox 10 into checkbox 11, and it still doesnt work....

Is this a glitch in autoit?

Edited by bigassmuffin

Share this post


Link to post
Share on other sites

LMAO, this wholew time ive been putting in the rong checkbox variable, I fixed it, THANK YOU ALL FOR YOUR HELP!

Share this post


Link to post
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
Sign in to follow this  
Followers 0