Codybean1 Posted January 24, 2014 Share Posted January 24, 2014 I just want a simple script that makes it so that when I press the E Key and let it go, the P Key is imputed for a brief period of time. Thank you in advance. Link to comment Share on other sites More sharing options...
water Posted January 24, 2014 Share Posted January 24, 2014 Welcome to AutoIt and the forum! Can you please tell us what you try to achieve? Which program do you try to automate? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Codybean1 Posted January 24, 2014 Author Share Posted January 24, 2014 I'm trying to automate an emulation software known as Dolphin. I'm trying to create some interesting Key Bindings to make things easier to control but the Program only goes so far. I need a timed input whenever the 'E' key is released that inputs the 'P' key for a brief period of time, then resets for the next time the 'E' key is released. So when I let go of E, P is input for a short period of time. That's pretty much it. Link to comment Share on other sites More sharing options...
water Posted January 24, 2014 Share Posted January 24, 2014 (edited) Something like this? Every time you press "E" one "P" is being sent to the active window. HotKeySet("E", "_PKey") HotKeySet("{ESC}", "_Exit") ; End the script While 1 Sleep(50) WEnd Func _PKey() Send("P") EndFunc ;==>_PKey Func _Exit() Exit EndFunc ;==>_Exit Edited January 24, 2014 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Codybean1 Posted January 24, 2014 Author Share Posted January 24, 2014 So I got it to work, but I'd like it so whenever E is not being pressed would P trigger for a short period of time, and not forever. Again, thank you so far. Link to comment Share on other sites More sharing options...
water Posted January 24, 2014 Share Posted January 24, 2014 Sorry, but I don't get it. The script should wait until you press and release "E", then it should send "P" for 0.01 seconds? How many "P" do you expect to be sent is this short time? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted January 24, 2014 Share Posted January 24, 2014 Look at _IsPressed function. Learn how to use a while loop and If...Then condition. That's all you need. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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