Sign in to follow this  
Followers 0
dragonheard

_ispressed help please

6 posts in this topic

#1 ·  Posted (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 by dragonheard

Share this post


Link to post
Share on other sites



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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

oh i'm sorry =) & thanks for moving it =D

Share this post


Link to post
Share on other sites

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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 connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

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 :D,

& 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)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0