Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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
Posted

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!

Posted

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.

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
  • Recently Browsing   0 members

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