vex20 Posted March 16, 2015 Share Posted March 16, 2015 (edited) I'm really posting about 1 problem, but while I'm here, I figured I'd ask another question that I've had for a quite a long time now too My main problem is this: I want a script that will prevent the use of the enter key whenever it's running. The script sleeps unless a specific window is active, and while said window is active, I want to prevent myself from using enter at any point in time. I found the _IsPressed() function, which will tell me if enter was pressed, but I can't seem to figure out how to interupt/block the press from happening in the first place. Any ideas on how I could accomplish this? I know in C++/VB/etc, you can just say 'if enter is pressed, do not send the key_down event, but I can't seem to find anything similar with autoit. The second question I have is regarding the window spy. In alot of situations, when you hover over something, it changes color. How do you grab the original pixel color when this happens? Thanks in advance! Edited March 16, 2015 by vex20 Link to comment Share on other sites More sharing options...
mpower Posted March 16, 2015 Share Posted March 16, 2015 For your first question, I suggest using the Search Forum function: '?do=embed' frameborder='0' data-embedContent>> As for your second question I have no idea what you are asking. Link to comment Share on other sites More sharing options...
water Posted March 16, 2015 Share Posted March 16, 2015 Another comment: Could you please be so kind and give meaningful titles to your threads? Everyone on this forum has questions and is looking for help When a thread has a meaningful title it attracts much more users and so it is more likely to get a helpful answer. 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 March 16, 2015 Share Posted March 16, 2015 I know in C++/VB/etc, you can just say 'if enter is pressed, do not send the key_down event Is that right? Please show that code, it will be easier to translate to AutoIt. 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