Keegar Posted September 5, 2010 Share Posted September 5, 2010 (edited) Hello, I am using a macro which activates by pressing 'e'. Well, that's what I want it to do. The thing is that I will sometimes (like 50/50) also press shift while I press e, so I would need the macro to activate on both 'e' and 'E' (or both on 'e' and 'shift+e'). The current line is: global $rayCycle = "e" which works for just e, obviously. I know autohotkey has a '~' prefix that makes it so it doesn't matter if you press any other button than the one followed by it, is there something similar in AutoIt? Anyone who can help me out here? Thank you in advance! Edited September 5, 2010 by Keegar Link to comment Share on other sites More sharing options...
legoman1 Posted September 6, 2010 Share Posted September 6, 2010 (edited) i dont think that autoit has that capability, but i could be wrong.are you using hotkeyset?because you could just set 2 different hotkeys to the same function+ = shift^ = ctrl! = alt# = win keyhotkeyset('e', '_SomeFunction')hotkeyset('+{e}', '_SomeFunction')read the help filelegoman Edited September 6, 2010 by legoman1 Link to comment Share on other sites More sharing options...
Keegar Posted September 6, 2010 Author Share Posted September 6, 2010 thanks for your reply legoman1. The problem is that the macro works with a counter (everytime I press e it increases the counter with 1) so would that not mean I get 2 counters working seperately? (thus they have different values) And also I have no idea how to implement it properly. I've read the help file but could not quite figure it out.. Link to comment Share on other sites More sharing options...
Fubarable Posted September 6, 2010 Share Posted September 6, 2010 The problem is that the macro works with a counter (everytime I press e it increases the counter with 1) so would that not mean I get 2 counters working seperately? (thus they have different values)but they'd be calling the very same function, right? The best way to check on this is to test it in a small program, and then if it doesn't work, post your code.And also I have no idea how to implement it properly. I've read the help file but could not quite figure it out..What have you tried so far? Link to comment Share on other sites More sharing options...
Keegar Posted September 7, 2010 Author Share Posted September 7, 2010 expandcollapse popupGlobal $wTitle = "Darkfall Online"; WinWaitActive($wTitle) global $rayCycle = "E" HotKeySet($rayCycle, "rayCycle") global $cycle = 0 global $ray1 = "{Home}" global $ray2 = "{;}" global $ray3 = "{'}" global $ray4 = "{,}" global $ray5 = "{.}" global $ray6 = "{/}" Sleep(3000) While 1 sleep(100) WEnd Func rayCycle(); if $cycle > 5 Then $cycle = 0 endif if $cycle == 0 Then send("{SHIFTDOWN}") send($ray1) send("{SHIFTDOWN}") endif if $cycle == 1 Then send("{SHIFTDOWN}") send($ray2) send("{SHIFTDOWN}") endif if $cycle == 2 Then send("{SHIFTDOWN}") send($ray3) send("{SHIFTDOWN}") endif if $cycle == 3 Then send("{SHIFTDOWN}") send($ray4) send("{SHIFTDOWN}") endif if $cycle == 4 Then send("{SHIFTDOWN}") send($ray5) send("{SHIFTDOWN}") endif if $cycle == 5 Then send("{SHIFTDOWN}") send($ray6) send("{SHIFTDOWN}") endif $cycle = $cycle + 1 EndFunc this is the code - I do not know how to implement your suggestion because this script uses different not the hotkeyset but global $raycycle or something.. I have tried doing global $rayCycle = "E" or "e" (and also with e and +e) but thats probably quite a pathetic attempt. I've also tried: global $rayCycle = "e" global $rayCycle = "+e" ~rest of code also did not work Link to comment Share on other sites More sharing options...
Keegar Posted September 7, 2010 Author Share Posted September 7, 2010 OK, it works now Thanks for your help, turns out I double-hotkeyed on the wrong place (picky little program ) Another question that rose is if it is possible to use MouseClick (left) or MouseUp or something as a hotkey. It seems not possible but is there a workaround? Link to comment Share on other sites More sharing options...
Keegar Posted September 7, 2010 Author Share Posted September 7, 2010 sorry I could not edit - but is there a way to pause the entire macro? I can add a pause function now but it will not block my e and shift+e combination to reactivate the macro.. Link to comment Share on other sites More sharing options...
Keegar Posted September 9, 2010 Author Share Posted September 9, 2010 bump - is there any way to get a working pause? Link to comment Share on other sites More sharing options...
kaotkbliss Posted September 9, 2010 Share Posted September 9, 2010 Yes however...Global $wTitle = "Darkfall Online";And This 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Keegar Posted September 11, 2010 Author Share Posted September 11, 2010 no worries! I can imagine you think its a bit if you see the game, but Darkfall Online is a game with a pretty bad UI so it is 'allowed' for people to use macros to bind spells/abilities in the game. 90% of the people playing it use them. Thanks for your replies all, I got it set up well now 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