0

I've tried to solve this in Autohotkey with not success

In an program (from now on called VP0) there is a hotkey Space Click n Drag to Left/Right to set the tool Maximum Size

I would like to have the same hotkey as is native in VP0, but using Shift instead of Space

The problem is that there is a second native hotkey in VP0 which uses Shift Space Click n Drag to Left/Right to set the tool Minimum Size

The problem is that if I want to set the first VP0 hotkey in AHK I would set LShift should be Space (VP0 Tool Max Size), but since VP0 Tool Min Size = Shift Space when pressing LShift to set VP0 Tool Max Size it sets VP0 Tool Min Size cuz AHK detects that Shift is been pressed.

I have tried using...

SendInput {Shift Up}
SendEvent {Shift Up}

but it just send Shift Up for a few miliseconds, then AHK detect Shift is pressed again, how can I avoid that?? I also have tried THIS BELLOW, but I would like to avoid using loops, cuz it switchs rapidly between Set Brush Max Size n Set Brush Min Size.

;   Increase/Decrease Tool Size
#If WinActive("ahk_exe Verve_painter.exe") && !GetKeyState("XButton1", "P") && !GetKeyState("Space", "P")

LShift & LButton::    ; INCREASE TOOL MAX SIZE
    Tooltip, AAAAAAAAAAAAAAAAAA Shift LButton
    SendEvent {Shift Up}
    SendInput {Space Down}
    Click Down
    While GetKeyState("LButton","P")
    {
    SendEvent {Shift Up}
    }
    Tooltip, BBBBBBBBBBBBBBBBBBBBBB LButton was realeasedd

    SendInput {Space Up}
    Click Up
    Return


$^+LButton::    ; INCREASE TOOL MIN SIZE
    ;Tooltip, Shiiiit Ctrl Shift LButton
    SendInput {Ctrl Up}
    Sleep 10

    SendInput {Shift Down}
    SendInput {Space Down}
    Click Down
    KeyWait, LButton

    SendInput {Space Up}
    SendInput {Shift Up}
    Click Up
    Tooltip Ctrl SHift LButton was released
    Return

#If

Thanks Advanced.

litu16
  • 153

1 Answers1

1

Try to remap both Shift and Ctrl:

#If WinActive("ahk_exe Verve_painter.exe") && GetKeyState("Shift", "P")

       ; Shift+1
    $1:: 
        KeyWait, Shift
        SendInput, {Shift Up}
        MsgBox, Shift+1
        return

      ; Shift+2
    $2::
        KeyWait, Shift
        SendInput, {Shift Up}
        MsgBox, Shift+2
        return

#If WinActive("ahk_exe Verve_painter.exe") 

       Shift::Space

       Ctrl::Shift

#If
Relax
  • 3,785