Lightwave plugin - AHK, 3x QuickCut


3x QuickCut - launches 3 different script using the same hotkey

Lightwave plugin - AHK, 3x QuickCut
http://youtu.be/82fL42IBVC8

the code >

#IfWinActive Modeler

; Keypress detection for Altx.
x::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, Altx, 750
return

Altx:
setTimer, Altx, off
if counter = 0 ; The key is pressed once
{
Send, ^+l
}
if counter = 1 ; The key is pressed twice
{
Send, ^+m
}
if counter = 2 ; The key is pressed thrice
{
Send, ^+n
}
counter = -1
return
 
Last edited:

3x QuickSaw - launches 3 different script using the same hotkey

same code as above, just tweaked slightly...

Lightwave plugin - AHK, 3x QuickSaw
http://youtu.be/18EWkbcEous

the code >

#IfWinActive Modeler

; Keypress detection for Altc.
c::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, Altc, 750
return

Altc:
setTimer, Altc, off
if counter = 0 ; The key is pressed once
{
Send, ^+i
}
if counter = 1 ; The key is pressed twice
{
Send, ^+j
}
if counter = 2 ; The key is pressed thrice
{
Send, ^+k
}
counter = -1
return
 
Last edited:

3x XYZ - launches 3 different script using the same hotkey

same code as above, just tweaked slightly...

Lightwave plugin - AHK, 3x XYZ
http://youtu.be/qqYbh1q1O2w

the code >

#IfWinActive Modeler

; Keypress detection for Altdim.
v::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, Altdim, 750
return

Altdim:
setTimer, Altdim, off
if counter = 0 ; The key is pressed once
{
Send, ^+x
}
if counter = 1 ; The key is pressed twice
{
Send, ^+y
}
if counter = 2 ; The key is pressed thrice
{
Send, ^+z
}
counter = -1
return
 

more...



3x Triple - launches 3 different triple commands using the same hotkey

same code as above, just tweaked slightly...

Lightwave plugin - AHK, 3x Triple
http://youtu.be/_jUdsfLKJR8

the code >

#IfWinActive Modeler

; Keypress detection for AltTriple.
l::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, AltTriple, 750
return

AltTriple:
setTimer, AltTriple, off
if counter = 0 ; The key is pressed once
{
Send, ^+o
}
if counter = 1 ; The key is pressed twice
{
Send, ^+p
}
if counter = 2 ; The key is pressed thrice
{
Send, ^+q
}
counter = -1
return
 

Waves of light

Stuck in a very big cube
Well, after playing around with AHK, here's my full code (below). I think this is really going to speed up my modelling workflow, if not just for the select expand, select loop and select connected on the MouseWheel. Thank you once again for bringing this to my attention.

Code:
; DoubleTapC begin.

#IfWinActive Modeler

; Keypress detection for DoubleTapC.
c::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, DoubleTapC, 750
return

DoubleTapC:
setTimer, DoubleTapC, off
if counter = 0 ; The key is pressed once
{
Send, c
}
if counter = 1 ; The key is pressed twice
{
Send, +^g
}
if counter = 2 ; The key is pressed twice
{
Send, +^h
}
counter = -1
return

; DoubleTapC ends.

; ChangeKeyD begin.

; Keypress detection for ChangeKeyD.
d::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, ChangeKeyD, 600
return

ChangeKeyD:
setTimer, ChangeKeyD, off
if counter = 0 ; The key is pressed once
{
Send, d
}
if counter = 1 ; The key is pressed twice
{
Send, l
}
if counter = 2 ; The key is pressed twice
{
Send, +^t
}
counter = -1
return

; ChangeKeyD ends.  

; DoubleTapT begin.

; Keypress detection for DoubleTapT.
t::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, DoubleTapT, 600
return

DoubleTapT:
setTimer, DoubleTapT, off
if counter = 0 ; The key is pressed once
{
Send, t
}
if counter = 1 ; The key is pressed twice
{
Send, +^i
}
if counter = 2 ; The key is pressed twice
{
Send, +^j
}
counter = -1
return

; DoubleTapT ends.

; DoubleTapQ begin.

; Keypress detection for DoubleTapQ.
q::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, DoubleTapQ, 750
return

DoubleTapQ:
setTimer, DoubleTapQ, off
if counter = 0 ; The key is pressed once
{
Send, q
}
if counter = 1 ; The key is pressed twice
{
Send, +^k
}
if counter = 2 ; The key is pressed twice
{
Send, +^l
}
counter = -1
return

; DoubleTapQ ends.

; DoubleTapV begin.

; Keypress detection for DoubleTapV.
v::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, DoubleTapV, 750
return

DoubleTapV:
setTimer, DoubleTapV, off
if counter = 0 ; The key is pressed once
{
Send, v
}
if counter = 1 ; The key is pressed twice
{
Send, +^e
}
if counter = 2 ; The key is pressed twice
{
Send, +^f
}
counter = -1
return

; DoubleTapV ends.

; ChangeKeyB begin.

; Keypress detection for ChangeKeyB.
b::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, ChangeKeyB, 750
return

ChangeKeyB:
setTimer, ChangeKeyB, off
if counter = 0 ; The key is pressed once
{
Send, b
}
if counter = 1 ; The key is pressed twice
{
Send, +^q
}
if counter = 2 ; The key is pressed twice
{
Send, +^r
}
counter = -1
return

; ChangeKeyB ends.

; ChangeKey1 begin.

; Keypress detection for ChangeKey1.
1::Send, +^l
; ChangeKey1 ends.
; ChangeKey2 begin.

; Keypress detection for ChangeKey2.
2::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, ChangeKey2, 750
return

ChangeKey2:
setTimer, ChangeKey2, off
if counter = 0 ; The key is pressed once
{
Send, +^b
}
if counter = 1 ; The key is pressed twice
{
Send, +^c
}
if counter = 2 ; The key is pressed twice
{
Send, +^d
}
counter = -1
return

; ChangeKey2 ends.

; ChangeKey3 begin.

; Keypress detection for ChangeKey2.
3::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, ChangeKey3, 750
return

ChangeKey3:
setTimer, ChangeKey3, off
if counter = 0 ; The key is pressed once
{
Send, +^m
}
if counter = 1 ; The key is pressed twice
{
Send, +^n
}
if counter = 2 ; The key is pressed twice
{
Send, +^p
}
counter = -1
return

; ChangeKey3 ends.

; ChangeKey4 begin.

; Keypress detection for ChangeKey2.
4::
if counter >= 0 ; setTimer already started, so we log the keypress instead
{
counter++
return
}
counter = 0 ; Start setTimer and set the number of logged keypresses to 0
setTimer, ChangeKey4, 750
return

ChangeKey4:
setTimer, ChangeKey4, off
if counter = 0 ; The key is pressed once
{
Send, +^u
}
if counter = 1 ; The key is pressed twice
{
Send, +^v
}
if counter = 2 ; The key is pressed twice
{
Send, +^x
}
counter = -1
return

; ChangeKey4 ends. 4

; MOUSE BUTTON CHANGES.
; BEGIN.

MButton:: Send, {Delete}
WheelUp:: Send, {Up}
WheelDown:: Send, {Down}
+WheelUp:: Send, +]
+WheelDown:: Send, +[
+RButton:: Send, ]
+MButton:: Send, {Right}
^WheelUp:: Send, +^o
^WheelDown:: Send, +^o

; END.
 

GraphXs

GraphX
That is cool, though where do you set the initial key to modify in the script? For example you are using L for the triple commands, but I don't see i "L" ref in the AHK script? never mind, found it.

Do you know of a way to use this method to have multiple command follow one another? Is that possible?

**** Got it to work!
 
Last edited:
Top Bottom