Skip to content

Instantly share code, notes, and snippets.

@hochun836
Last active July 28, 2025 02:33
Show Gist options
  • Save hochun836/077c6512dba2265d05585547ad91aaa2 to your computer and use it in GitHub Desktop.
Save hochun836/077c6512dba2265d05585547ad91aaa2 to your computer and use it in GitHub Desktop.
# screentools.bat
start C:\software\gInk_v1.1.0\gInk.exe
start C:\software\ZoomIt.exe
start C:\software\Snipaste-1.16.2-x64\Snipaste.exe
start "" "C:\Program Files (x86)\DeskPins\deskpins.exe"
#start C:\software\copyq-7.0.0\copyq.exe
# HotKeyMapping.ahk
; for quick
!a::^Home
!z::^End
!s::^PgUp
!x::^PgDn
^+e::F2
^+r::F5
; for macos
!c::^c
!v::^v
!w::^w
!n::^n
# SqlAppendToggle.ahk
; SQL → Java
^t:: { ; Ctrl + T
ClipWait ; 等待剪貼簿有內容
lines := StrSplit(A_Clipboard, "`n", "`r") ; 分割成行
result := ""
for line in lines {
if (line != "") {
result .= 'sql.append(" ' line ' ");' "`n"
}
}
; 複製結果到剪貼簿
A_Clipboard := result
ClipWait
Send("^v")
}
; Java → SQL
^+t:: { ; Ctrl + Shift + T
ClipWait ; 等待剪貼簿有內容
lines := StrSplit(A_Clipboard, "`n", "`r") ; 分割多行
result := ""
for line in lines {
line := Trim(line) ; 去除首尾空白
; 判斷是否為 sql.append("..."); 格式
if RegExMatch(line, 'i)^sql\.append\(\s*"(.+?)"\s*\);$', &match) {
content := match[1] ; 取出括號內的內容
result .= content "`n"
}
}
; 複製結果到剪貼簿
A_Clipboard := result
ClipWait
Send("^v")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment