dragonheard Posted November 21, 2013 Posted November 21, 2013 (edited) Hello, here's what i'm trying to do: as long as left/primary mouse button is pressed keep clicking the left/primary mousebutton. here's what i got so far: #include <misc.au3> $dll = DllOpen("user32.dll") HotKeySet ("{esc}","stop") While 1 if _IsPressed ("01") Then MouseClick("primary") EndIf WEnd func stop () Exit EndFunc i tried changing the amound of click mouseclick does but that doesn't really solve anything what happens is that it clicks once/twice and then it stops. the other thing i tried was: #include <misc.au3> $dll = DllOpen("user32.dll") HotKeySet ("{esc}","stop") While 1 if _IsPressed ("01") Then MouseDown("primary") EndIf WEnd func stop () Exit EndFunc while it sometimes does register like 500 clicks being sent a second (o.o) it does not allways work. any help would be appreciated, thanks. dg. Edited November 21, 2013 by dragonheard
Moderators Melba23 Posted November 21, 2013 Moderators Posted November 21, 2013 dragonheard,Welcome to the AutoIt forum. But please pay attention to where you post - the "Developer Chat" section where you started this thread is not for general support questions. I have moved the thread for you, but would ask you to be more careful in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dragonheard Posted November 21, 2013 Author Posted November 21, 2013 oh i'm sorry =) & thanks for moving it =D
Moderators JLogan3o13 Posted November 21, 2013 Moderators Posted November 21, 2013 Hi, dragonheard. Just out of curiosity, what is the window you're trying to interact with? You're coming to see some of the inconsistencies you get with mouseclicks. Often there is an easier way to manipulate the program than spamming the mouse button. "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!
bogQ Posted November 21, 2013 Posted November 21, 2013 do put sleep(10) after MouseDown("primary") and retest your script, some guis do have problem registering large amount of data sent to them at once so probably other program just brake the input. TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
dragonheard Posted December 18, 2013 Author Posted December 18, 2013 do put sleep(10) after MouseDown("primary") and retest your script, some guis do have problem registering large amount of data sent to them at once so probably other program just brake the input. i'll try that thanks , & is there any way to let autoit know that a click made by autoit is a different click than an actual mouse click? cause when i want it to click as long as left mousebutton is pressed it keeps looping cause it clicks the left mousebutton (presses it)
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