Sign in to follow this  
Followers 0
King

Mouse presses

25 posts in this topic

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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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
Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

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:

[center]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.[/center]

Share this post


Link to post
Share on other sites

MouseClick("Right)"? Or MouseClick("Right")? :geek:

cunfuzled i dont see the differnt :o

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

hahahah i didnt even notice that but not my fault just copied cdkid :o

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

New error. Error: Unknow Function Name

Share this post


Link to post
Share on other sites

hahahahah u probaly didnt change the sleep

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

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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!

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

To get to the program i am opening the folder, going to the aut2exe folder then clicking on the aut2exe.exe

Share this post


Link to post
Share on other sites

slow down king,,,

do you really want to make an executable file?

first get the script working right in autoit.

Share this post


Link to post
Share on other sites

Line 0 (File "C:\DandS\C\Mouse.exe"):

If _ispressed('01') Then

If ^ ERROR

Error: Unknown Function Name

Share this post


Link to post
Share on other sites

probaly because you dont have beta or you didnt inlucde misc.au3

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