Sign in to follow this  
Followers 0
farhan879

Need help with Send() [SOLVED]

3 posts in this topic




#2 ·  Posted (edited)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Form2 = GUICreate("Form2", 261, 168, 303, 219)
$Edit1 = GUICtrlCreateEdit("", 32, 16, 185, 89)
GUICtrlSetData(-1, "Edit1")
$Label1 = GUICtrlCreateLabel("Numer of times to be sent:", 16, 112, 127, 17)
$Input1 = GUICtrlCreateInput(5, 144, 112, 89, 21,$ES_NUMBER)
$Button1 = GUICtrlCreateButton("Send", 80, 136, 75, 25, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            sleep(3000)
            for $i = 1 to GUICtrlRead($Input1)
                Send(GUICtrlRead($Edit1),1)
            Next
    EndSwitch
WEnd

But better use a function like _IsPressed() or HotKeySet() than a button to trigger the output...maybe with a parallel check of winactive() to ensure the right target...

Edited by KaFu

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  
Followers 0