Sign in to follow this  
Followers 0
hookLine

Looking for some help with a simple part of my script

9 posts in this topic

Okay, so I have a script like this:

Func sequence()
    Send($teleport)
    Sleep(100)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(251, 310, 2)
    MouseClick("right")
    Sleep($tele_delay)
    MouseMove(248, 187, 2)
    MouseClick("right")
    Sleep($tele_delay)
    Send("w")
    Sleep(300)
    Send($bo)
    Sleep(200)
    MouseClick("right")
    Sleep(500)
    Send($bc)
    Sleep(200)
    MouseClick("right")
    Sleep(500)
    Send("w")
    Sleep(300)
    Send($holyshield)
    Sleep(200)
    MouseClick("right")
    Sleep(500)
    Send($concentration)
    Sleep(300)

I want AutoIt to hold down SHIFT and the LEFT mouse button for an X amount of time. Would this be possible? And if so, what codes would I use?

Share this post


Link to post
Share on other sites



I tried the For..To...Step...Next codes but they didn't work...

Share this post


Link to post
Share on other sites

For holding down shift you can use: Send("{shiftdown}") followed by whatever you want then a Send("{shiftup}")

So to hold it for 5 seconds you would use:

Send("{shiftdown}")
Sleep(5000)
Send("{shiftup}")

As for holding the left mouse button you can set the option using Opt("MouseClickDownDelay", $delay) (where delay is how long you want it to hold in milliseconds.)

This will set it so every time you use Mouseclick it holds it for the amount of time specified.


[b][/b]

Share this post


Link to post
Share on other sites

For holding down shift you can use: Send("{shiftdown}") followed by whatever you want then a Send("{shiftup}")

So to hold it for 5 seconds you would use:

Send("{shiftdown}")
Sleep(5000)
Send("{shiftup}")

As for holding the left mouse button you can set the option using Opt("MouseClickDownDelay", $delay) (where delay is how long you want it to hold in milliseconds.)

This will set it so every time you use Mouseclick it holds it for the amount of time specified.

I guess I didn't make myself clear enough...I want to be able to hold the shift button down AND the left mouse button at the same time.

Share this post


Link to post
Share on other sites

just needed to add the mousedown/up

Send("{shiftdown}")
Mousedown("Left")
Sleep(5000)
Send("{shiftup}")
Mouseup("Left")

GL,

Rental

*sigh*

I feel so stupid for not thinking about that. Thank you very much :)

Share this post


Link to post
Share on other sites

just needed to add the mousedown/up

Send("{shiftdown}")
Mousedown("Left")
Sleep(5000)
Send("{shiftup}")
Mouseup("Left")

GL,

Rental

I did not even know there was a Mouseup/down command.

I learn something new everyday lol


[b][/b]

Share this post


Link to post
Share on other sites

...

I learn something new everyday lol

Me too!!!

:)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Next i can teach you addition if ya want :)

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