Jambaman Posted August 10, 2014 Share Posted August 10, 2014 What would be the code make my script hold down a button, the left arrow key, for a certain amount of time, 1 second? Link to comment Share on other sites More sharing options...
water Posted August 10, 2014 Share Posted August 10, 2014 Can you please be a bit more specific and tell us what you try to achieve? Which program do you try to automate? So we can suggest a solution. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Jambaman Posted August 10, 2014 Author Share Posted August 10, 2014 Can you please be a bit more specific and tell us what you try to achieve? Which program do you try to automate? So we can suggest a solution. Send ("LEFT") for 1 second ^ Holding down the left arrow key for 1 second Link to comment Share on other sites More sharing options...
water Posted August 10, 2014 Share Posted August 10, 2014 The question was: Why do you need to hold down the left arrow key for a second? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Solution JohnOne Posted August 10, 2014 Solution Share Posted August 10, 2014 Send ("{LEFT DOWN}") Sleep(1000) Send ("{LEFT UP}") 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...
Jambaman Posted August 10, 2014 Author Share Posted August 10, 2014 Send ("{LEFT DOWN}") Sleep(1000) Send ("{LEFT UP}") Cheers mate Link to comment Share on other sites More sharing options...
Jambaman Posted August 10, 2014 Author Share Posted August 10, 2014 The question was: Why do you need to hold down the left arrow key for a second? It's hard to explain Link to comment Share on other sites More sharing options...
JohnOne Posted August 10, 2014 Share Posted August 10, 2014 You should give it a go, like water says there will probably be better solutions than sending keys. 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...
Jambaman Posted August 10, 2014 Author Share Posted August 10, 2014 You should give it a go, like water says there will probably be better solutions than sending keys. The question was: Why do you need to hold down the left arrow key for a second? Well im running it in a game and in the interface I need to turn the camera, and to achieve that I need to press the left key or the right key, and I only want it to press it for a second Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 11, 2014 Moderators Share Posted August 11, 2014 You have two posts now, one in which you come right out and state it is for a game, and the other that looks a lot like game automation though you never state it. Please read the forum rules, especially the part about game automation before posting again. P.S. Too bad there is nothing in the rules about how pathetic it is to have to use scripts to cheat at games 232showtime and Jambaman 2 "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...
water Posted August 11, 2014 Share Posted August 11, 2014 I have already reported this thread so a Mod will soon take care of it. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts