Jump to content

Mouse presses


Recommended Posts

I am still newb to this and you guys have more then helped me in the past but maybe i can get your help again.

What i need is a script that when i press the left mouse key it would prest then Left + right then wait a split second and press the right button again....

Can this be done?

Link to comment
Share on other sites

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
MouseClick("Right)"
EndIf
WEnd

this will

you : left click

it: left click > right click > right click

NOTE: requires beta!

~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

  • Moderators

more like :o

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right)"
EndIf
WEnd
MouseClick("Right)"? Or MouseClick("Right")? :geek:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

cunfuzled i dont see the differnt :o

Could i add a

HotKeySet("^!z","Movment");^!z is Ctrl+Alt+'z' to run the Movment
HotKeySet("^!x","End");^!x is Ctrl+Alt+'x' to close the Movment
Func Movment()
#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right)"
EndIf
WEnd
Func End()

I think i screwed that up royaly... but i tried.

Edited by King
Link to comment
Share on other sites

  • Moderators

cunfuzled i dont see the differnt :o

Everyone keeps doing it...

MousClick("Right)" Is the incorrect syntax

MouseClick("Right") Is the correct syntax

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I am useing

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right")
EndIf
WEnd

I get Error: Unable to Parse line.

I downloaded http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe to use it right?

Ok i changed the ("right") and now i am getting

Error: Unknown Function Name

Edited by King
Link to comment
Share on other sites

I am useing

#include <Misc.au3>

While 1

sleep(100)

If _IsPressed('01') Then

MouseClick("left")

MouseClick("Right")

sleep(a split second)

MouseClick("Right)"

EndIf

WEnd

I get Error: Unable to Parse line.

I downloaded http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe to use it right?

the error is in red... try this... and you were helped by a newbie!

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right")
EndIf
WEnd

If that works... well then, I did something good today

Edited by oakchas
Link to comment
Share on other sites

change your code to this

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right")
EndIf
WEnd

sorry for the type-o :o

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

edit:

oh hahaha didnt even notice the Sleep(a split second) :o

Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

New error. Error: Unknow Function Name

Then try this:

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
;sleep(a split second)
MouseClick("Right")
EndIf
WEnd
Edited by oakchas
Link to comment
Share on other sites

How do i know if i am useing the beta. this is what i am doing

First You will need to DL

http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe

Second - Create a note pad file and add this code to it.

#include <Misc.au3>
While 1
sleep(100)
If _IsPressed('01') Then
MouseClick("left")
MouseClick("Right")
sleep(a split second)
MouseClick("Right")
EndIf
WEnd

Third - Save the file as anythingyouwish.au3

Fourth - Open the autoit program and browse for this file. Select the file and at the bottom there will be a button that say "Convert". convert the file.

Fith - Run the new converted file. It will appear in the bottom right corner of your screen next to your time.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...