proem Posted September 5, 2009 Share Posted September 5, 2009 Specifically, I'm looking for a function that returns true or false if a specific key is pressed or not. I'm trying to make a "fast clicker" script that checks whether or not a certain key is held down in real time, and makes the mouse click if it is. Simple, no? But it's actually pretty useful for me Help is appreciated! Link to comment Share on other sites More sharing options...
Yashied Posted September 5, 2009 Share Posted September 5, 2009 _IsPressed() My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
proem Posted September 5, 2009 Author Share Posted September 5, 2009 _IsPressed()*facepalm*I have a feeling I could have found that if I looked harder. I tried, though. Thanks anyways! I'm looking that up in the help file and I'm well on my way to 1000 clicks/s Link to comment Share on other sites More sharing options...
proem Posted September 6, 2009 Author Share Posted September 6, 2009 (edited) I've encountered a problem... #include <Misc.au3> AutoItSetOption( "MouseClickDelay", "0" ) $turbo = 0 Func ToggleTurbo() if $turbo then $turbo = 0 else $turbo = 1 EndIf EndFunc HotKeySet( "{F2}", "ToggleTurbo" ) While True If $turbo AND _IsPressed("01") then Sleep("10") MouseClick( "left" ) EndIf WEnd The script looks like it should work and successfully toggles, but when I hold leftmouse it only clicks once or twice, then stops. Help? Edited September 6, 2009 by proem Link to comment Share on other sites More sharing options...
JohnOne Posted September 6, 2009 Share Posted September 6, 2009 Maybe nothing, but does Sleep("10") need the quotations ? 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...
proem Posted September 6, 2009 Author Share Posted September 6, 2009 Maybe nothing, but does need the quotations ?Apparently not, but it doesn't affect it much. I think I've found the problem though: MouseClick is clicking just fine, but after that it releases leftmouse, and when the script checks to see if it's held down it stops because of this. Because I've still got my finger on leftmouse, my mouse doesn't send an update. As far as I can tell there's no way around this Link to comment Share on other sites More sharing options...
omikron48 Posted September 6, 2009 Share Posted September 6, 2009 You could try using a different key as the turbo button for the mouse click and not the left mouse button. That would work. Assign it to the pause button or something. 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