Jump to content

Recommended Posts

Posted

look at this:

#include <GUIConstants.au3>

HotKeySet("{F5}", "startbot")
GUICreate("Combo", 540, 540, 100, 100)   
GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20)
$PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21)
GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1")
GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20)
$SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21)
GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2")
GUISetState() 

While 1
    Sleep(1000)
WEnd

Func startbot() 
    $msg = GUIGetMsg()     
    Sleep(2000)    
    Send("Primary = "&$PSkill)
    Sleep(2000)
    Send("{ENTER}")
    Sleep(2000)
    Send("Secondary = "&$SSkill)
    Sleep(2000)    
EndFunc

why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data?

(try to test yourself.. you will understand)

thanks

Posted

look at this:

#include <GUIConstants.au3>

HotKeySet("{F5}", "startbot")
GUICreate("Combo", 540, 540, 100, 100)   
GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20)
$PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21)
GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1")
GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20)
$SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21)
GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2")
GUISetState() 

While 1
    Sleep(1000)
WEnd

Func startbot() 
    $msg = GUIGetMsg()     
    Sleep(2000)    
    Send("Primary = "&$PSkill)
    Sleep(2000)
    Send("{ENTER}")
    Sleep(2000)
    Send("Secondary = "&$SSkill)
    Sleep(2000)    
EndFunc

why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data?

(try to test yourself.. you will understand)

thanks

I didnt try it yet but i thing you need to do GUIctrlread($pSkill) instead of $PSkill

so it would look like this

Send("Primary = "& guictrlread($PSkill))

code
Posted

look at this:

#include <GUIConstants.au3>

HotKeySet("{F5}", "startbot")
GUICreate("Combo", 540, 540, 100, 100)   
GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20)
$PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21)
GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1")
GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20)
$SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21)
GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2")
GUISetState() 

While 1
    Sleep(1000)
WEnd

Func startbot() 
    $msg = GUIGetMsg()     
    Sleep(2000)    
    Send("Primary = "&$PSkill)
    Sleep(2000)
    Send("{ENTER}")
    Sleep(2000)
    Send("Secondary = "&$SSkill)
    Sleep(2000)    
EndFunc

why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data?

(try to test yourself.. you will understand)

thanks

Why are you using GUIGetMsg in your startbot func?

That should be placed in the main loop.

You need to use GUICtrlRead to get the data from the combo, otherwise it's just a control id.

:)

Broken link? PM me and I'll send you the file!

Posted (edited)

Why are you using GUIGetMsg in your startbot func?

That should be placed in the main loop.

You need to use GUICtrlRead to get the data from the combo, otherwise it's just a control id.

:)

but i must it for other things... i have radio in the bot too...

and i have hotkeys of start and pause... i must it.. if the user change data after the pause..?

i must GUIGetMsg.

Edited by Gillboss
Posted

but i must it for other things... i have radio in the bot too...

and i have hotkeys of start and pause... i must it.. if the user change data after the pause..?

i must GUIGetMsg.

Read up on OnEventMode instead, because it will look very messy and buggy otherwise. :)

Broken link? PM me and I'll send you the file!

Posted (edited)

where..? can u send me the source please..?

edit:

ty kkKrazy.. found..GUICtrlSetOnEvent in help file..

more edit..:

why i need it? where insert it?

Edited by Gillboss
Posted

Please study this example:

#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode",1)
GUICreate("Testing OnEvent")
$button=GUICtrlCreateButton("Click me",10,10,100,50)
GUICtrlSetOnEvent($button,"_Buttonclicked")
GUISetOnEvent($GUI_EVENT_CLOSE,"close")
GUISetState()

while 1
    sleep(100)
WEnd

Func close ()
    Exit
EndFunc
Func _Buttonclicked()
    MsgBox(0,"Click","You clicked me!")
EndFunc

Broken link? PM me and I'll send you the file!

Posted

where..? can u send me the source please..?

edit:

ty kkKrazy.. found..GUICtrlSetOnEvent in help file..

more edit..:

why i need it? where insert it?

Your welcome :) Hope your script comes out good!

as for your second edit im too late:(

code
Posted

ok i learn and im know it now..

and why it can help me?

After defining all events you never have to think about them again, do whatever you want in your other functions and your GUI will still be responsive :)

Broken link? PM me and I'll send you the file!

Posted

because it:

Select

Case $msg = $optEeNormal

Case $msg = $optEePower

Case $msg = $optSinPoint

EndSelect

You are reaaaaaally confusing.

Broken link? PM me and I'll send you the file!

Posted (edited)

well how can i check if the radio checked?

Generate events for the checkboxes with GUICtrlSetOnEvent.

Edited by monoceres

Broken link? PM me and I'll send you the file!

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
  • Recently Browsing   0 members

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