Jump to content

Yet another question...


Recommended Posts

you have to assign the input box to a variable

$Input1 = GuiCtrlCreateInput ( blah, blah, blah )

then you retrieve information by using GuiCtrlRead like this

GUiCtrlRead ( $Input1 )

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

So like this?

(gawd im such a noob :))

;Constants
    #include <GUIConstants.au3>

   ;GUI Variables
    Global $GUIWidth
    Global $GUIHeight

    $GUIWidth = 250
    $GUIHeight = 250

   ;Create Window
    GUICreate("Theivory Bot V0.1", $GUIWidth, $GUIHeight)

   ;Create Tabs
    GuiCtrlCreateTab(0, 0, 255, 255)
    GuiCtrlCreateTabItem("Main")
    GuiCtrlCreateGroup("Cordinates", 5, 25)
    GuiCtrlCreateLabel("Cordinates of team leader:", 10, 40, 

150, 20)
    GuiCtrlCreateLabel("X", 20, 55)
    GuiCtrlCreateLabel("Y", 55, 55)
    $X = GuiCtrlCreateInput("", 10, 70, 30, 20)
    GUiCtrlRead ( $X )
    $Y = GuiCtrlCreateInput("", 45, 70, 30, 20)
    GUiCtrlRead ( $Y )
    GuiCtrlCreateLabel("Press the Home key to start the bot", 

100, 100)
    GuiCtrlCreateLabel("Press the End key to stop the bot", 

110, 110)

   ;Set State
    GUISetState()

    While 1
       $msg = GUIGetMsg()
       If $msg = $GUI_EVENT_CLOSE Then EXIT
    WEnd

   ;Hotkeys
    HotKeySet("{HOME}", "_IfActive")
    HotKeySet("{END}", "_NotActive")

   ;Check if Monster & Me exists
    If WinActive("Monster&Me - MythOfOrient") Then
           _IfActive()
    Else
          _NotActive()
    EndIf

   ;Start Bot
    Func _IfActive()
    Send('{F9}')
    MouseMove($X, $Y, 0)
    Endfunc

   ;End Bot
    Func _NotActive()

    Endfunc
Link to comment
Share on other sites

So like this?

(gawd im such a noob :))

GuiCtrlCreateLabel("X", 20, 55)
    GuiCtrlCreateLabel("Y", 55, 55)
    $X = GuiCtrlCreateInput("", 10, 70, 30, 20)
    GUiCtrlRead ( $X )
    $Y = GuiCtrlCreateInput("", 45, 70, 30, 20)
    GUiCtrlRead ( $Y )

<{POST_SNAPBACK}>

This part of the script is bad GuiCtrlRead should be call when some event/msg are received not at definition time.

More the result need to be stored in a variable as $Xvalue= GUICtrlRead($X)

$X is not the value but the controlidentifier which allow to retrieve the value :D

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