Sign in to follow this  
Followers 0
Keegar

Shift-key modifier

10 posts in this topic

#1 ·  Posted (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 by Keegar

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 key

hotkeyset('e', '_SomeFunction')

hotkeyset('+{e}', '_SomeFunction')

read the help file

legoman

Edited by legoman1

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Global $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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

bump - is there any way to get a working pause?

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0