Jump to content
Sign in to follow this  
Gillboss

What wrong?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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))

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

because it:

Select

Case $msg = $optEeNormal

Case $msg = $optEePower

Case $msg = $optSinPoint

EndSelect

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  

×
×
  • Create New...