Jump to content

What wrong?


Recommended Posts

oh and man i delete ok..?

now its:

#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()    
    Sleep(2000)   
    Send("Primary = "&$PSkill)
    Sleep(2000)
    Send("{ENTER}")
    Sleep(2000)
    Send("Secondary = "&$SSkill)
    Sleep(2000)   
EndFunc

and its not working yet..

its type the numbers 4 and 6..

try yourself :)

Link to comment
Share on other sites

oh and man i delete ok..?

now its:

...

and its not working yet..

its type the numbers 4 and 6..

try yourself :)

We were 3 people stating in the first 3 posts that you can't use the values returned from GUICtrlCreate... functions to get data, you have to use GUICtrlRead($controlid).

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

Link to comment
Share on other sites

#include <GUIConstants.au3>
Opt("GUIOnEventMode",1)

HotKeySet("{F5}", "startbot")
GUICreate("Combo", 540, 540, 100, 100)   
$testbutton = GUICtrlCreateButton("Test button", 100, 20, 200, 20)
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")
GUICtrlSetOnEvent($testbutton, "testButton")
GUISetOnEvent($GUI_EVENT_CLOSE, "endbot")
GUISetState()

While 1
    Sleep(100)
WEnd

Func startbot()   
    Sleep(1000)   
    Send("Primary = "&GUICtrlRead($PSkill))
    Sleep(1000)
    Send("{ENTER}")
    Sleep(1000)
    Send("Secondary = "&GUICtrlRead($SSkill))
    Sleep(1000)   
EndFunc

Func testButton()
    MsgBox(0,"","You clicked the button!", 2000)
EndFunc

Func endbot()
    MsgBox(0,"","Thanks for using my great bot!", 2000)
    Exit
EndFunc

Link to comment
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
 Share

  • Recently Browsing   0 members

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