Lenged Posted June 1, 2019 Share Posted June 1, 2019 Hello. I'm new to autoit. I've read the AutoIt Help and got confused about using the function send and HotKeySet. What I want to do is to press w+shift on keyboard and hold them on a window-mode online game for 20 minutes, and I also need another key (such as F11) to activite the action. Now I face with 2 problems, 1. Opt("SendKeyDownDelay", 2000) Send("{w down}") functions above can't make the W key holding for 2 seconds. 2.HotKeySet doesn't seem to function as I expect. It just doesn't work. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ;Script Start - Add your code below here HotKeySet("{F11}","f11") Func f11() ToolTip("这是一个工具提示", 0, 0) HotKeySet("{F11}") sleep(2000) Opt("SendKeyDownDelay", 2000) Send("{w down}") HotKeySet("{F11}","f11") EndFunc I know those are quite low-level questions but I've been stuck in them for three hours. Thanks for any help. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2019 Moderators Share Posted June 1, 2019 @Lenged you read the help file but seem to have missed the forum rules. Please read them now, especially the part about game automation, and you will see why this thread is locked. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts