Sign in to follow this  
Followers 0
soemaal

Error in my script. anyone can fix it?

5 posts in this topic

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{HOME}", "TogglePause")
HotKeySet("{END}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d

#include <GUIConstants.au3>
Global $Checkbox[8]
; == GUI generated with Koda ==
$Miner1 = GUICreate("Conquer Online Auto Miner - Soemaal ~ Elitepvpers.de ©2007 ", 492, 366, 225, 176)
GUISetIcon("C:\Program Files\Conquer 2.0\tqzf.ico")
GUISetCursor (3)
GUISetFont(12, 400, 0, "Times New Roman")
GUISetBkColor(0x9DB9EB)
$Checkbox[1] = GUICtrlCreateCheckbox("Refine Gem", 24, 64, 153, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[2] = GUICtrlCreateCheckbox("Normal Gem", 24, 24, 145, 41)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[3] = GUICtrlCreateCheckbox("Super Gem", 24, 96, 169, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Group1 = GUICtrlCreateGroup("Disconnect at", 16, 8, 185, 145)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Checkbox[4] = GUICtrlCreateCheckbox("All ores", 264, 24, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[5] = GUICtrlCreateCheckbox("Iron/Copper ore", 264, 56, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[6] = GUICtrlCreateCheckbox("Iron/Silver ore", 264, 88, 153, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[7] = GUICtrlCreateCheckbox("Gold ore", 264, 112, 161, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Group2 = GUICtrlCreateGroup("Ores to Drop", 248, 8, 177, 145)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateLabel("Soemaal's autominer V1.0 Basic oredropper. Pause = Home, End = End, Show message = ctrl+shift D ", 16, 160, 185, 187)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Button1 = GUICtrlCreateButton("Done", 300, 300, 100, 50)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        for $x = 1 To UBound($Checkbox) -1
            If _IsChecked($Checkbox[$x]) Then
                ; do what you wqant
              (sleep 60000)
              MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
Sleep(2000)
MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
Sleep(2000)
MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
            EndIf
        Next
    Case Else
        ;;;;;;;
    EndSelect
WEnd
Exit

Func _IsChecked($control)
    Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
EndFunc





While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","")
EndFunc

Here it is :)


Sorry i am only 14 years old, Dutch and new to scripting.Got any complainments? PM memy name is Bas :)

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

got it fixed already :)

How should i go further... i am creating an pixelbased mining program for an game. (conquer online)

Global $Paused
HotKeySet("{HOME}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d
#include <GUIConstants.au3>

Global $Checkbox[8]
; == GUI generated with Koda ==
$Miner1 = GUICreate("Conquer Online Auto Miner - Soemaal ~ Elitepvpers.de ©2007 ", 492, 366, 225, 176)
GUISetIcon("C:\Program Files\Conquer 2.0\tqzf.ico")
GUISetCursor (3)
GUISetFont(12, 400, 0, "Times New Roman")
GUISetBkColor(0x9DB9EB)
$Checkbox[1] = GUICtrlCreateCheckbox("Refine Gem", 24, 64, 153, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[2] = GUICtrlCreateCheckbox("Normal Gem", 24, 24, 145, 41)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[3] = GUICtrlCreateCheckbox("Super Gem", 24, 96, 169, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Group1 = GUICtrlCreateGroup("Disconnect at", 16, 8, 185, 145)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Checkbox[4] = GUICtrlCreateCheckbox("All ores", 264, 24, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[5] = GUICtrlCreateCheckbox("Iron/Copper ore", 264, 56, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[6] = GUICtrlCreateCheckbox("Iron/Silver ore", 264, 88, 153, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Checkbox[7] = GUICtrlCreateCheckbox("Gold ore", 264, 112, 161, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Group2 = GUICtrlCreateGroup("Ores to Drop", 248, 8, 177, 145)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateLabel("Soemaal's autominer V1.0 Basic oredropper.", 16, 160, 185, 187)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0x9DB9EB)
$Button1 = GUICtrlCreateButton("Done", 300, 300, 100, 50)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        for $x = 1 To UBound($Checkbox) -1
            If _IsChecked($Checkbox[$x]) Then
                ; do what you wqant
                MsgBox(0x0, "Conquer Online Auto Miner - Soemaal ~ Elitepvpers.de ©2007 ", GUICtrlRead($Checkbox[$x],1) & " Check, Open your inventory. And press Ok when done.", 2)
                Sleep(60000)
MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
Sleep(2000)
MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
Sleep(2000)
MouseClick("left" ,859,70)
MouseClick("left" ,651,327)
            EndIf
        Next
    Case Else
        ;;;;;;;
    EndSelect
WEnd
Exit

Func _IsChecked($control)
    Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
EndFunc

While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

now im realy stuck, but i have the feeling i already did half of the work.

Edited by soemaal

Sorry i am only 14 years old, Dutch and new to scripting.Got any complainments? PM memy name is Bas :)

Share this post


Link to post
Share on other sites

Remove..

While 1

Sleep(100)

WEnd

Remove the "2" if you want the user to press ok

And press Ok when done.", 2)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

double

while 1 - wend

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