Hi!
I'd like to define the hotkey [Ctrl]+[Shift]+V for a specific application that alters the clipboard content and then pastes it. For all other applications the original hotkey key combination should be simply passed on.
So far I have come up with the following Lua script:winHand = acGetForegroundWindow()
winTitle = acGetWindowTitle( winHand)
if winTitle:sub( 1, 6) == "StatET" then
cbText = acGetClipboardText()
acSetClipboardText( cbText:gsub("%\\[%\\]?", "/"))
acSendKeys( "^v")
acSetClipboardText( cbText)
else
acSendKeys( "^+v")
end
For that "StatET" application it is indeed working as intended, but for every other application the hotkey obviously seems to trigger itself in a loop and so the orginial key combination is never passed on to the actual application!
Is there a way to prevent this loop, e.g. another way to restrict that hotkey to a specific application?
Cheers!