Jammer Posted July 29, 2007 Share Posted July 29, 2007 HotKeySet("q", "gamecontrol") Func gamecontrol() $caps = _GetCapsLock() if $caps then Game("Q") EndIf if not $caps then Game("q") EndIf HotKeySet("q") if $caps then Send("Q") EndIf if not $caps then Send("q") EndIf HotKeySet("q", "gamecontrol") EndFunc HotKeySet("+q", "shiftqcontrol") Func shiftqcontrol() $caps = _GetCapsLock() if $caps then Game("q") EndIf if not $caps then Game("Q") EndIf HotKeySet("+q") if $caps then Send("q") EndIf if not $caps then Send("Q") EndIf HotKeySet("+q", "shiftqcontrol") EndFunc basicly i have a game. q uses healt potions Q uses mana potions.... Game counts how many potions i have dranked. don't know why but after using right shift + q to drink mana pot gets the shift somekinda stuck and if u press simple q without shift it still drinks mana potion ... to unstuck the shift i have to press the left shift and then everything is normal... everything is ok if im using the left shift but when i use the right shift it gets stuck and the only way to unstuck it is left shift... and the code has no difference in caps lock.... please help. i want to count my potions Link to comment Share on other sites More sharing options...
Paulie Posted July 29, 2007 Share Posted July 29, 2007 This worked for me. #Include <Misc.au3> Global Const $q_hex= "51" Global Const $rshift_hex= "10" Dim $ManaCount = 0 Dim $HealthCount=0 While 1 If _IsPressed($q_hex) Then $Healthcount+=1 Do Sleep(75) Until NOT _IsPressed($q_hex) ToolTip("Health Potions: "&$HealthCount&@CRLF&"Mana Potions: "&$ManaCount&@CRLF&"Total Potions: "&$Healthcount+$ManaCount,0,0) EndIf If _Ispressed($rshift_hex) Then While _IsPressed($rshift_Hex) If _IsPressed($q_hex) Then $ManaCount+=1 ToolTip("Health Potions: "&$HealthCount&@CRLF&"Mana Potions: "&$ManaCount&@CRLF&"Total Potions: "&$Healthcount+$ManaCount,0,0) Do Sleep(75) Until NOT _IsPressed($q_Hex) EndIf WEnd EndIf ToolTip("Health Potions: "&$HealthCount&@CRLF&"Mana Potions: "&$ManaCount&@CRLF&"Total Potions: "&$Healthcount+$ManaCount,0,0) WEnd Link to comment Share on other sites More sharing options...
Jammer Posted July 29, 2007 Author Share Posted July 29, 2007 yeah but im using some other buttons like p g and others to count portal uses,stance changes and so on. Link to comment Share on other sites More sharing options...
erebus Posted July 29, 2007 Share Posted July 29, 2007 Then use their hex codes accordingly in the given example. Don't be lazy, study the code to understand what is the difference between his and yours. 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