Jump to content
Sign in to follow this  
prodigyBurn

Please, help, i cant do Left mouse click to start a function.

Recommended Posts

prodigyBurn

Hi to all.

This forum is anwsome!

Please, can you help me with this function below:

HotKeySet("{INSERT}", "sprint")

$sprint=False

Func sprint()

If($sprint)Then

Send("{PGDN up}")

Else

Send("{PGDN down}")

EndIf

$sprint = Not $sprint

EndFunc

But in place of INSERT, i need put a left mouse click.

I tried this:

While 1

Sleep ( 250 )

If _IsPressed("01", $dll) Then

Send("{PGDN up}")

Else

Send("{PGDN down}")

EndIf

WEnd

But dont work too...

Can anyone help me?

Sorry for my english, is not my first lenguage.

Share this post


Link to post
Share on other sites
prodigyBurn

I tried this too:

While 1

If _IsPressed(01) then sprint()

Sleep (100)

WEnd

$sprint=False

Func sprint()

If($sprint)Then

Send("{PGDN up}")

Else

Send("{PGDN down}")

EndIf

$sprint = Not $sprint

EndFunc

Edited by prodigyBurn

Share this post


Link to post
Share on other sites
prodigyBurn

This seems to work unless it is not what you intended.

#Include <Misc.au3>
$sprint=False
While 1
If _IsPressed(01) then sprint()
Sleep (100)
WEnd
Func sprint()
If $sprint Then
Send("{PGDN up}")
MsgBox(0, '', 'Up', 2)
Else
Send("{PGDN down}")
MsgBox(0, '', 'Down', 2)
EndIf
$sprint = Not $sprint
EndFunc

JoHanatCent, thank you very much! :)

Now works like a charm!

Now im trying understand what you do diferent of me.

Thank you friend!

Share this post


Link to post
Share on other sites
JoHanatCent

JoHanatCent, thank you very much! :)

Now works like a charm!

Now im trying understand what you do diferent of me.

Thank you friend!

Pleasure is all mine.

If you can not figure it out just post what you did back here.


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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.