prodigyBurn Posted February 23, 2011 Share Posted February 23, 2011 Hi to all.This forum is anwsome!Please, can you help me with this function below:HotKeySet("{INSERT}", "sprint")$sprint=FalseFunc sprint() If($sprint)Then Send("{PGDN up}") Else Send("{PGDN down}") EndIf $sprint = Not $sprintEndFuncBut 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}") EndIfWEndBut dont work too...Can anyone help me?Sorry for my english, is not my first lenguage. Link to comment Share on other sites More sharing options...
prodigyBurn Posted February 23, 2011 Author Share Posted February 23, 2011 (edited) I tried this too:While 1 If _IsPressed(01) then sprint() Sleep (100) WEnd$sprint=FalseFunc sprint() If($sprint)Then Send("{PGDN up}") Else Send("{PGDN down}") EndIf $sprint = Not $sprintEndFunc Edited February 23, 2011 by prodigyBurn Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 23, 2011 Share Posted February 23, 2011 I tried this too: 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 Link to comment Share on other sites More sharing options...
prodigyBurn Posted February 23, 2011 Author Share Posted February 23, 2011 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! Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 24, 2011 Share Posted February 24, 2011 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now