Joshuaaaa Posted November 29, 2007 Share Posted November 29, 2007 (edited) I am able to run this code with no errors, but for some reason the last bit of the code right here: If BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) Then Send("{F1 Down}") Sleep(6000); 60 seconds Send("{F1 Up}") EndIF It's not working. It does not give me any error messages, but it is not effective. What I'm trying to do is have it press F1 (an in-game hotkey) every 60 seconds. But it's not... I've been trying to figure this out for 2 days, no joke. Anybody help me? Below is the full code.While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Run If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) Then Send("{LCTRL Down}") Sleep(0); 0 seconds Send("{LCTRL Up}") EndIf If BitAND(GUICtrlRead($Checkbox3), $GUI_CHECKED) Then Do MouseClick ("SECONDARY") Sleep(1); 1= .01sec Until _IsPressed ("09") EndIf If BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) Then Send("{F1 Down}") Sleep(6000); 60 seconds Send("{F1 Up}") EndIF EndSwitch Wend Edited November 29, 2007 by Joshuaaaa Link to comment Share on other sites More sharing options...
Generator Posted November 29, 2007 Share Posted November 29, 2007 Sleep(0); 0 seconds Sleep uses millionsecond as its unit, you still need to go AutoIt Option to change SendKeyDelay, but technically you cannot make the time 0 ms. Some function will have to take place which it takes time.Sleep(6000); 60 seconds 60 seconds is Sleep(60 * 1000) Link to comment Share on other sites More sharing options...
Joshuaaaa Posted November 29, 2007 Author Share Posted November 29, 2007 i see. hmm... how could i have it so that if checkbox2 is checked, then checkbox1 is made unclickable? don't mean to bug.. i've tried so many times. Link to comment Share on other sites More sharing options...
Generator Posted November 29, 2007 Share Posted November 29, 2007 If BitAND(GUICtrlRead($Checkbox2), $GUI_CHECKED) Then GUICtrlSetState($Checkbox1, $GUI_DISABLE) 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