Jump to content

Reidar

Members
  • Posts

    2
  • Joined

  • Last visited

Reidar's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks alot, that was ecxactly what i wanted Sorry but having the the Stop() reference in the code wich basically was a call to the Stop() function, i just changed it before posting here. i removed those stop() references and the script works as a charm now. Now i need to learn more about using those dll files P.S This is the code from above without those needless Stop References() $dll = DllOpen("user32.dll") Global $toggle = False While 1 Sleep(250) If WinActive("Darkfall Online") then If _IsPressed("02", $dll) Then While _IsPressed("02", $dll) Sleep(10) WEnd SprintToggle() EndIf EndIf WEnd DllClose($dll) Func SprintToggle() If $toggle == False Then Send("{F12 Down}") $toggle = True Else Send("{F12 Up}") $toggle = False EndIf EndFunc ;==>SprintToggle
  2. I wrote a little script that when pressing down the right mouse button the script should toggle to press down the "F12" button. I made this script for a game and "F12" is bound to sprint ingame. My problem is that i can´t get my right mouse button set as a hotkey. When i run the script below nothing happends if i press my right mouse button, but if i press the button "1" the script starts executing the SprintToggle function. So basicalli the only problem is that i can´t figure out how to bind my right mouse button as a hotkey. I tried searching the forum and google for a solution for this, but i couldn´t find it. WinWaitActive( "Darkfall Online" ) Global $toggle = False HotKeySet( MouseClick("Right"), "SprintToggle" ) ; Press right mouse button to toggle autorun. Loop() Func SprintToggle() if $toggle == False Then Send( "{F12 Down}" ) $toggle = True Stop() Else Send( "{F12 Up}" ) $toggle = False Stop() EndIf EndFunc Func Loop() While True Sleep( 50000 ) WEnd EndFunc
×
×
  • Create New...