Sign in to follow this  
Followers 0
Thatsgreat2345

Press GUIbutton without GUIcontrolclick

8 posts in this topic

#1 ·  Posted (edited)

my script uses controlclick but it keeps pressing a button and so if i press another button then it doesnt work unless i press it really fast to press it b4 the script presses the other button, guictrlsendmsg doesnt exactly work, so yeah is therea ny other way? i searched the forum but the forum search isnt that great so yeah

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites



my script uses controlclick but it keeps pressing a button and so if i press another button then it doesnt work unless i press it really fast to press it b4 the script presses the other button, guictrlsendmsg doesnt exactly work, so yeah is therea ny other way? i searched the forum but the forum search isnt that great so yeah

:geek::o

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

dont understand :o

ok i got the attack button which there are alot of IF statements that do a controclick, if i press pause i got to press it fast b4 the if statements do the controlclicks or else it wont pause cuz the attakc button is being pressed

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

dont understand :geek:

ok i got the attack button which there are alot of IF statements that do a controclick, if i press pause i got to press it fast b4 the if statements do the controlclicks or else it wont pause cuz the attakc button is being pressed

Why not just use a Hotkey to override it?

Edit:

Or provide a script with comments so we can see what the hell your talking about :o

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

added in 3 comments :o simple got the pause button , attack button and the control clicks pressing the attack button :geek:

#include <GuiConstants.au3>
#Include <Misc.au3>
#include <Inet.au3>
#include <File.au3>
#include <String.au3>
Hotkeyset("{esc}", "exit1")
func exit1()
    Exit
endfunc
dim $internetgui

; == GUI generated with Koda ==
; == GUI generated with Koda ==
$gui = GUICreate("Race Zone Online Global AutoAttacker", 655, 567, 192, 125, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE)
GUICtrlCreateLabel("Race Zone Online Global AutoAttacker", 208, 8, 189, 17)
$b1 = GUICtrlCreateButton("b1", 0, 0, 1, 1)
$b2 = GUICtrlCreateButton("b2", 0, 0, 1, 1)
$b3 = GUICtrlCreateButton("b3", 0, 0, 1, 1)
$b4 = GUICtrlCreateButton("b4", 0, 0, 1, 1)
$b5 = GUICtrlCreateButton("b5", 0, 0, 1, 1)
$b6 = GUICtrlCreateButton("b6", 0, 0, 1, 1)
$attack = GUICtrlCreateButton("Attack", 40, 208, 49, 33)
$pause = GUICtrlCreateButton("Pause", 464, 240, 49, 33)
GUICtrlCreateLabel("Settings", 64, 24, 42, 17)
GUICtrlCreateLabel("Speed", 48, 64, 35, 17)
$speed = GUICtrlCreateSlider(8, 88, 113, 17)
GUICtrlSetData($speed,1)
GUICtrlSetLimit ($speed,10,1)
GUICtrlCreateLabel("Damage", 48, 136, 44, 17)
$damage = GUICtrlCreateSlider(8, 160, 113, 17)
GUICtrlSetData($damage,99.99)
GUICtrlSetLimit($damage,99.99,0.00)
$hide = GUICtrlCreateButton("Hide", 232, 240, 129, 17)
$show = Guictrlcreatebutton("Show",150, 240, 129,17)
$users = GUICtrlCreateList("", 480, 80, 97, 136, -1, $WS_EX_CLIENTEDGE)
$attacking = GUICtrlCreateInput("",488, 15, 77, 17)
$person = GUICtrlCreateInput("",488, 31, 77, 17)
$money = GUICtrlCreateInput("",488, 48, 77, 17)
$quit = GUICtrlCreateButton("Quit", 536, 240, 49, 33)

GUISetState()
$internetgui = GUICreate("", 655, 300, 0, 275, $WS_CHILD + $WS_BORDER + $SS_RIGHTJUST, "", $gui)
Guisetstate()

$dll = DllOpen("cwebpage.dll")
    DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $internetgui)
    DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.google.com")
    GUISetState()
    
    
DO
    $msg = GUIGetMsg ()
    
    
    
    Select
    Case $msg = $speed
        $labeltime = Guictrlread($speed)
    $label = GUICtrlCreateLabel($labeltime,11,90,20,20)
Case $msg = $damage
        $labeltime = Guictrlread($damage)
    $label = GUICtrlCreateLabel($labeltime,11,100,20,20)

    Case $msg = $quit
        Exit
Case $msg = $pause;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PAUSE BUTTON
do
sleep(10)
$msg = GuiGetMsg()
until $msg = $attack or $msg = $GUI_EVENT_CLOSE or $msg = $quit



    Case  $msg = $attack;;;;;;;;;;;;;;;;;; ATTACK BUTTON



dircreate(@ProgramFilesDir & "/thatsgreat2345")
_filecreate(@ProgramFilesDir & "/thatsgreat2345/source.txt")
filedelete(@ProgramFilesDir & "/thatsgreat2345/source.txt")
_filecreate(@ProgramFilesDir & "/thatsgreat2345/source.txt")
Global $file = (@ProgramFilesDir & "/thatsgreat2345/source.txt")
Global $source = _INetGetSource('http://www.racezoneonline.com/rz/rz_files/race_ladder.php?type=global')
filewrite($file, $source)

$readh = Filereadline($file,"198")
$stringh = $readh
$resulta4 = stringtrimleft($stringh,13)
$resulta6 = stringinstr($resulta4, "&")
$resulta7 = stringleft($resulta4, $resulta6 - 1)
guictrlsetdata($money, "")
guictrlsetdata($money, $resulta7)
$readg = Filereadline($file,"197")
$stringg = $readg
$resultz = _StringReverse($stringg)
$stripg = stringtrimleft($resultz,4)
$resulta1 = stringinstr($stripg, ">")
$resulta3 = stringleft($stripg, $resulta1 - 1)
$resulta2 = _StringReverse($resulta3)
guictrlsetdata($person, "")
guictrlsetdata($person, $resulta2)

$reada = Filereadline($file,"42")
$stringa = $reada
$stripa = _StringReverse($stringa)
$resulta = stringtrimleft($stripa, 8)
$resultb = stringinstr($resulta, ">")
$resultc = stringleft($resulta, $resultb - 1)
$resultd = _StringReverse($resultc)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$readb = Filereadline($file,"65")
$stringb = $readb
$stripb = _StringReverse($stringb)
$resulte = stringtrimleft($stripb, 8)
$resultf = stringinstr($resulte, ">")
$resultg = stringleft($resulte, $resultf - 1)
$resulth = _StringReverse($resultg)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$readc = Filereadline($file,"88")
$stringc = $readc
$stripc = _StringReverse($stringc)
$resulti = stringtrimleft($stripc, 8)
$resultj = stringinstr($resulti, ">")
$resultk = stringleft($resulti, $resultj - 1)
$resultl = _StringReverse($resultk)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$readd = Filereadline($file,"111")
$stringd = $readd
$stripd = _StringReverse($stringd)
$resultm = stringtrimleft($stripd, 8)
$resultn = stringinstr($resultm, ">")
$resulto = stringleft($resultm, $resultn - 1)
$resultp = _StringReverse($resulto)


;;;;;;;;;;;;;;;
$reade = Filereadline($file,"134")
$stringe = $reade
$stripe = _StringReverse($stringe)
$resultq = stringtrimleft($stripe, 8)
$resultr = stringinstr($resultq, ">")
$results = stringleft($resultq, $resultr - 1)
$resultt = _StringReverse($results)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$readf = Filereadline($file,"157")
$stringf = $readf
$stripf = _StringReverse($stringf)
$resultu = stringtrimleft($stripf, 8)
$resultv = stringinstr($resultu, ">")
$resultw = stringleft($resultu, $resultv - 1)
$resultx = _StringReverse($resultw)

Guictrlsetdata($users,"")
Guictrlsetdata($users,"")
Guictrlsetdata($users,"")
Guictrlsetdata($users,"")
Guictrlsetdata($users,"")
Guictrlsetdata($users,"")
Guictrlsetdata($users,$resultd)
Guictrlsetdata($users,$resulth)
Guictrlsetdata($users,$resultl)
Guictrlsetdata($users,$resultp)
Guictrlsetdata($users,$resultt)
Guictrlsetdata($users,$resultx)




Global $damaget = Guictrlread($damage)
$read = Filereadline($file,"45")
$strip2 = _StringReverse($read)
$result5 = stringtrimleft($strip2, 12)
$result6 = stringinstr($result5, "[")
$result100 = _StringReverse($result6)
$result7 = stringleft($result5, $result100 - 1)
$result8 = _StringReverse($result7)
$finalresult = Round($result8, 1)
If $result8 >= $damaget Then
    
$read2 = Filereadline($file,"42")
$string = $read2
$strip = _StringReverse($string)
$result = stringtrimleft($strip, 8)
$result1 = stringinstr($result, ">")
$result2 = stringleft($result, $result1 - 1)
$result4 = _StringReverse($result2)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result4)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result4 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)
ControlClick($gui, '', $attack);;;;;;;;;;;;;;;;;;;;;;; GUI CTRL CLICK

Else
     
     
;;;;;;nextracer
$read1 = Filereadline($file,"68")
$strip3 = _StringReverse($read1)
$result9 = stringtrimleft($strip3, 12)

$result10 = stringinstr($result9, "[")
$result101 = _StringReverse($result10)
$result11 = stringleft($result9, $result101 - 1)
$result12 = _StringReverse($result11)
ControlClick($gui, '', $b2)
EndIf

Case $msg = $b2
;;;;;;;;;;;;;;;;;;;;;;;;;;; race1111111
If $result12 >= $damaget Then
    
    
    
;raceeeeeeeeeeeeeeeeeeeeeeeeeee
$read3 = Filereadline($file,"65")
$string1 = $read3
$strip4 = _StringReverse($string1)
$result13 = stringtrimleft($strip4, 8)
$result14 = stringinstr($result13, ">")
$result15 = stringleft($result13, $result14 - 1)
$result16 = _StringReverse($result15)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result16)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str","http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result16 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)
ControlClick($gui, '', $attack)


Else
    
    
$read4 = Filereadline($file,"91")
$strip5 = _StringReverse($read4)
$result17 = stringtrimleft($strip5, 12)
$result18 = stringinstr($result17, "[")
$result102 = _StringReverse($result18)
$result19 = stringleft($result17, $result102 - 1)
$result20 = _StringReverse($result19)
ControlClick($gui, '', $b3)
EndIf

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;race 222222222222222
case $msg = $b3
    
    
    
If $result20 >= $damaget Then
    
    
    
$read5 = Filereadline($file,"88")
$string2 = $read5
$strip6 = _StringReverse($string2)
$result21 = stringtrimleft($strip6, 8)
$result22 = stringinstr($result21, ">")
$result23 = stringleft($result21, $result22 - 1)
$result24 = _StringReverse($result23)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result24)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result24 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)
ControlClick($gui, '', $attack)



Else
    
    
    
$read6 = Filereadline($file,"114")
$strip7 = _StringReverse($read6)
$result25 = stringtrimleft($strip7, 12)
$result26 = stringinstr($result25, "[")
$result103 = _StringReverse($result26)
$result27 = stringleft($result25, $result103 - 1)
$result28 = _StringReverse($result27)
ControlClick($gui, '', $b4)
EndIf

;;;;;;;;;;;;;;;;;;;;;;;;;;; race33333333333333
Case $msg = $b4
    
    
    
If $result28 >= $damaget Then
    
    
    
    
$read7 = Filereadline($file,"111")
$string3 = $read7
$strip7 = _StringReverse($string3)
$result29 = stringtrimleft($strip7, 8)
$result30 = stringinstr($result29, ">")
$result31 = stringleft($result29, $result30 - 1)
$result32 = _StringReverse($result31)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result32)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result32 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)
ControlClick($gui, '', $attack)



Else
    
    
    
$read8 = Filereadline($file,"137")
$strip8 = _StringReverse($read8)
$result33 = stringtrimleft($strip8, 12)
$result34 = stringinstr($result33, "[")
$result104 = _StringReverse($result34)
$result35 = stringleft($result33, $result104 - 1)
$result36 = _StringReverse($result35)   
ControlClick($gui, '', $b5)
EndIf

;;;;;;;;;;;;;;;;;;;;;;;;;race444444444444444444444444444444
Case $msg = $b5
    
    
If $result36 >= $damaget Then
    
    
    $read9 = Filereadline($file,"134")
$string4 = $read9
$strip9 = _StringReverse($string4)
$result36 = stringtrimleft($strip9, 8)
$result37 = stringinstr($result36, ">")
$result38 = stringleft($result36, $result37 - 1)
$result39 = _StringReverse($result38)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result39)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str","http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result39 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)
ControlClick($gui, '', $attack)


Else
    
    
    
$read10 = Filereadline($file,"160")
$strip10 = _StringReverse($read10)
$result40 = stringtrimleft($strip10, 12)
$result41 = stringinstr($result40, "[")
$result105 = _StringReverse($result41)
$result42 = stringleft($result40, $result105 - 1)
$result43 = _StringReverse($result42)
ControlClick($gui, '', $b6)
EndIf

;;;;;;;;;;;;;;;;;;;;;;;race555555555555555555555
Case $msg = $b6
    
    
    
If $result43 >= $damaget Then
    
    
$read11 = Filereadline($file,"157")
$string5 = $read11
$strip10 = _StringReverse($string5)
$result44 = stringtrimleft($strip10, 8)
$result45 = stringinstr($result44, ">")
$result46 = stringleft($result44, $result45 - 1)
$result47 = _StringReverse($result46)
Guictrlsetdata($attacking,"")
Guictrlsetdata($attacking,$result46)
DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $internetgui, "str", "http://www.racezoneonline.com/rz/processes/race_engine.php?opponent=" & $result47 & "&tid=3&type=global")
$time = Guictrlread($speed)
Sleep($Time * 1000)

Else
ControlClick($gui, '', $attack)

If $result43 <= $damaget Then
    Guictrlsetdata($attacking,"")
    Guictrlsetdata($attacking,"No one")
    msgbox(0,"No one","No one to attack")
    ControlClick($gui, '', $pause)
    Endif
EndIf;;;;;;;;;;;;;;;;;;;;;;;;;;;;race666666666666666666666666666
EndSelect

Until $msg = $GUI_EVENT_CLOSE
Edited by thatsgreat2345

Share this post


Link to post
Share on other sites
:o Sorry I asked!! I'll peak though!

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

hahah removed

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

SetOnEvent is not a friend of GUIGetMsg()


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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