Jump to content

make the entered text in a input box a var?


 Share

Recommended Posts

I'm new the the gui stuff so I probly missed something simple.

My code: (just doing clipput into I figure out now to make the inputed text into a var)

#include <GUIConstants.au3>

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

 GUICreate("Form1", 420, 240, 270, 176)
$background = GUICtrlCreatePic ("pic.jpg", 0, 0, 800, 300)
$Input1 = GUICtrlCreateInput("Var1", 32, 40, 121, 21)
$Input2 = GUICtrlCreateInput("Var2", 40, 80, 121, 21)
$Input3 = GUICtrlCreateInput("Var3", 48, 120, 121, 21)
$Input4 = GUICtrlCreateInput("Var4", 56, 160, 121, 21)
$Input5 = GUICtrlCreateInput("Var5", 64, 200, 121, 21)
$Input6 = GUICtrlCreateInput("Var6", 192, 40, 129, 21)
$Label1 = GUICtrlCreateLabel("lable for var1:", 24, 24, 54, 17)
$Label2 = GUICtrlCreateLabel("lable for var2:", 24, 64, 54, 17)
$Label3 = GUICtrlCreateLabel("lable for var3:", 40, 104, 54, 17)
$Label4 = GUICtrlCreateLabel("lable for var4:", 48, 144, 54, 17)
$Label5 = GUICtrlCreateLabel("lable for var5:", 56, 184, 54, 17)
$Label6 = GUICtrlCreateLabel("lable for var6:", 192, 24, 57, 17)

$MyButton1 = GUICtrlCreateButton("Start ", 200, 96, 100, 30, $BS_BOTTOM )
$MyButton2 = GUICtrlCreateButton("Stop/pause", 200, 136, 100, 30, $BS_BOTTOM )
$MyButton3 = GUICtrlCreateButton("Exit", 200, 176, 100, 30, $BS_BOTTOM )
$MyButton4 = GUICtrlCreateButton("More info", 304, 96, 100, 30, $BS_BOTTOM )
GUISetState(@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $MyButton1
            Start()
        Case $msg = $MyButton2
             TogglePause()
         Case $msg = $MyButton3
              Exit 0
         Case $msg = $MyButton4
              ;haven't got around to this part
    EndSelect
Wend

Func start() ; 

ClipPut($Input1)

EndFunc


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(500)
        ToolTip("Spam is paused", 0, 0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

How would I get input1-6 into a var? I tried doing $var1 = $Input1 that didn't seem to work.

and I have to hit tab to jump from one input to the other. How can I make it be able to use the mouse to click em?

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Link to comment
Share on other sites

K thxs. I got the var's working but I still can't click the buttons/input boxes with the mouse I have to use tab.

How can I use the mouse?

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Link to comment
Share on other sites

Huh. Maybe it is just me. I've turned off all extra programs and tried a 2nd mouse nether worked.

edit* I took off the GUICtrlCreatePic and now I can click everthing...maybe he pic was to big.

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

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