Jump to content

problem with send key with defined time in input box


Recommended Posts

ok i have it ... but it loops for ever... ad i tryed solving it changing the variables in it around ... but loops or either dont work at all XD

Case $ch
            $timestopress = GUICtrlRead($Label3)
            $timesdone = 0
            do
            send("{DOWN}")
            $timesdone = $timesdone +1
            until $timesdone = $timesdopress
Link to comment
Share on other sites

is there any other way to make this kind of thing?

EDIT: nvm that old one... ive another idea for me...but this idea has one problem that i dont know how to solve.. it always sends only 1 time {DOWN} not as i wanted.. if checkbox checked on 4 it owuld send {DOWN} 4times not 1...how to solve it,plz help

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 233, 209, 192, 124)
$Group1 = GUICtrlCreateGroup("Oppsett", 16, 16, 193, 161)
$Checkbox[1] = GUICtrlCreateCheckbox("1", 104, 48, 97, 17)
$Checkbox[2] = GUICtrlCreateCheckbox("2", 104, 72, 97, 17)
$Checkbox[3] = GUICtrlCreateCheckbox("3", 104, 96, 97, 17)
$Checkbox[4] = GUICtrlCreateCheckbox("4", 104, 120, 97, 17)
$Button1 = GUICtrlCreateButton("OK", 104, 144, 75, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button
        If $Checkbox[1] > 1 Then Sleep(3000)
            Send("{DOWN}")
    EndSwitch
WEnd
Edited by TomaSzz
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...