Chito Posted August 12, 2010 Share Posted August 12, 2010 hello i was bored so i thought that i would learn some autoit i was working on a sample script when i fell into some problems. the key sending works but its when i want to stop is the problem. any help would be wonderful. #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <GuiButton.au3> #include <WindowsConstants.au3> ;#NoTrayIcon GUICreate("Enter", 160, 120) $button1 = GUICtrlCreateButton("Enter Press On", 10, 10, 90, 50) $button2 = GUICtrlCreateButton("Enter Press Off", 10, 60, 90, 50) $enter = 0 GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() $msg = GUIGetMsg() Case - 3 ExitLoop Exit case $button1 $enter = 1 Case $button2 $enter = 0 EndSwitch If $enter = 1 Then Do if winactive("[CLASS:Notepad]") = 1 Then send("{K}") Else controlsend("[CLASS:Notepad]","","","{K}") EndIf Sleep(3000) Until $enter = 0 EndIf WEnd Link to comment Share on other sites More sharing options...
Chito Posted August 12, 2010 Author Share Posted August 12, 2010 hi,it is good and it usefulregards,phe9oxis,http://www.guidebuddha.com...?the stop button doesnt work Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now