Skip to content

Instantly share code, notes, and snippets.

@alvaro-ometis
Last active July 23, 2021 02:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc to your computer and use it in GitHub Desktop.
Save alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc to your computer and use it in GitHub Desktop.
AutoHotKey script that helps me on my daily work with Qlik and other software
#SingleInstance force
/* KEYS CHEAT SHEET
# win
! Alt
^ ctrl
+ shift
<^>! altGr
* any modifier
UP key up
*/
; [Qlik] - Text replacement - l8i - Load * Inline
; e.g.: LOAD * INLINE [
;
; ];
:*:l8i::LOAD {*} INLINE {[}{Enter 2}{]};{Left 3}{Space 2}
; [Qlik] - Text replacement - $V - Dollar bracket expansion $()
; e.g.: $()
:*:$V::$(){Left}
; [Qlik] - Text selection + Hotkeys - [Ctrl] [Shift] [4] - Wrap text selection in dollar bracket $()
; e.g.: vMyVariable -> $(vMyVariable)
^+4::
clipsaved := ClipboardAll ; Store previous clipboard
Clipboard = ; claear clipboard
Send ^c ; copy selected text
ClipWait ; wait for the clipboard to receive values
SendInput $(%clipboard%) ; send wrapped text
Clipboard := clipsaved ; Restore prevous contents
clipsaved = ; Free the memory in case the clipboard was very large
Return
; [Qlik] - Text selection + Hotkeys - [Alt] [[] - Wrap selection in square brackets []
![::
clipsaved := ClipboardAll ; Store previous clipboard
Clipboard = ; clear clipboard
Send ^c ; copy selected text
ClipWait ; wait for the clipboard to receive values
SendInput [%clipboard%] ; send wrapped text
Clipboard := clipsaved ; Restore prevous contents
clipsaved = ; Free the memory in case the clipboard was very large
Return
/*
BROSWER CHEAT SHEET
Google Chrome
ahk_exe chrome.exe
Firefox
ahk_exe firefox.exe
Microsoft Edge
ahk_exe msedge.exe
Internet Explorer (please don't)
ahk_exe iexplore.exe
*/
; Check for the browser
#IfWinActive ahk_exe chrome.exe
; [Qlik] - Hotkeys - [Alt] [Mouse Scroll Wheel Up] - Navigates to the previous script section
!WheelUp::PgUp
; [Qlik] - Hotkeys - [Alt] [Mouse Scroll Wheel Down] - Navigates to the next script section
!WheelDown::PgDn
; [Qlik] - Hotkeys - [Ctrl] [/] - Toggle comments... like all other code editors! Qlik 👀
^/::k
; End browser section
#IfWinActive
; [Support] - Text replacement - ;hi; - Email starter
:*:;hi;::Hi ,{Enter 4}Regards,{Enter}YOUR_NAME_HERE{Up 5}{Left}
; [General] - Hotkeys - [Win] [c] - Open VS Code or switch to it
#c::
If WinExist("ahk_exe Code.exe")
WinActivate
Else
Run "C:\Program Files\Microsoft VS Code\Code.exe"
Return
; [General] - Hotkeys - [Win] [e] - Open Explorer window or switch to it
#e::
If WinExist("ahk_class CabinetWClass")
WinActivate
Else
Send {LWin Down} {e} {LWin Up}
Return
; [General] - Hotkeys - [Win] [Shift] [e] - Open New Explorer window
+#e:: Send {LWin Down} {e} {LWin Up}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment