Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- #SingleInstance force
- #Persistent
- #LTrim
- SetTitleMatchMode 2
- SendMode input
- SetWorkingDir %A_ScriptDir%
- DetectHiddenWindows on
- IfWinNotExist ahk_exe Columbus.exe
- Run Columbus.exe
- ;{ Global Variables
- IniRead iter, _Main.ini, Main, iter, 0
- IniRead weatherSettings, _Main.ini, Main, weather, hko
- superMode = none
- ;{ Dead Key List
- deadKeyList := {}
- deadKeyList["Grave"]:= {"a":"à", "e":"è", "i":"ì", "n":"ǹ", "o":"ò", "u":"ù", "w":"ẁ", "y":"ỳ"
- , "none":"``"}
- deadKeyList["Tilde"]:= {"a":"ã", "e":"ẽ", "i":"ĩ", "n":"ñ", "o":"õ", "u":"ũ", "v":"ṽ", "y":"ỹ"
- , "none":"~"}
- deadKeyList["Acute"]:= {"a":"á", "c":"ć", "e":"é", "g":"ǵ", "i":"í", "k":"ḱ", "l":"ĺ", "m":"ḿ"
- , "n":"ń", "o":"ó", "p":"ṕ", "r":"ŕ", "s":"ś", "u":"ú", "w":"ẃ"
- , "y":"ý", "z":"ź", "æ":"ǽ", "none":"'"}
- deadKeyList["Umlaut"]:= {"a":"ä", "e":"ë", "h":"ḧ", "i":"ï", "o":"ö", "t":"ẗ", "u":"ü", "w":"ẅ"
- , "x":"ẍ", "y":"ÿ", "none":Chr(34)}
- deadKeyList["Circumflex"]:={"a":"â", "c":"ĉ", "e":"ê", "g":"ĝ", "h":"ĥ", "i":"î", "j":"ĵ", "o":"ô"
- , "s":"ŝ", "u":"û", "w":"ŵ", "y":"ŷ", "z":"ẑ", "none":"+6"}
- deadKeyList["Macron"]:= {"a":"ā", "b":"ḇ", "d":"ḏ", "e":"ē", "g":"ḡ", "h":"ẖ", "i":"ī", "k":"ḵ"
- , "l":"ḻ", "n":"ṉ", "o":"ō", "r":"ṟ", "t":"ṯ", "u":"ū", "y":"ȳ"
- , "z":"ẕ", "none":"-"}
- deadKeyList["Stroke"]:= {"a":"ⱥ", "b":"ƀ", "c":"ȼ", "d":"đ", "e":"ɇ", "g":"ǥ", "h":"ħ", "i":"ɨ"
- , "j":"ɉ", "l":"ł", "o":"ø", "p":"ᵽ", "r":"ɍ", "t":"ŧ", "u":"ʉ"
- , "y":"ɏ", "z":"ƶ", "none":"_"}
- deadKeyList["Ring"]:= {"a":"å", "u":"ů", "w":"ẘ", "y":"ẙ", "none":"˚"}
- deadKeyList["Caron"]:= {"a":"ǎ", "c":"č", "d":"ď", "e":"ě", "g":"ǧ", "h":"ȟ", "i":"ǐ", "j":"ǰ"
- , "k":"ǩ", "l":"ľ", "n":"ň", "o":"ǒ", "r":"ř", "s":"š", "t":"ť"
- , "u":"ǔ", "z":"ž", "none":"ˇ"}
- deadKeyList["Cedilla"]:= {"c":"ç", "d":"ḑ", "e":"ȩ", "g":"ģ", "h":"ḩ", "k":"ķ", "l":"ļ", "n":"ņ"
- , "r":"ŗ", "s":"ş", "t":"ţ", "none":"¸"}
- deadKeyList["Ogonek"]:= {"a":"ą", "e":"ę", "i":"į", "o":"ǫ", "u":"ų", "none":"˛"}
- deadKeyList["Breve"]:= {"a":"ă", "e":"ĕ", "g":"ğ", "h":"ḫ", "i":"ĭ", "o":"ŏ", "u":"ŭ"
- , "none":"˘"}
- deadKeyList["Dot"] := {"a":"ȧ", "b":"ḃ", "c":"ċ", "d":"ḋ", "e":"ė", "f":"ḟ", "g":"ġ", "h":"ḣ"
- , "i":"ı", "j":"ȷ", "l":"ŀ", "m":"ṁ", "n":"ṅ", "o":"ȯ", "s":"ṡ"
- , "t":"ṫ", "w":"ẇ", "x":"ẋ", "y":"ẏ", "z":"ż", "none":"·"}
- diacriticsList := []
- for k, v in deadKeyList
- diacriticsList.Insert(k)
- allPages := Ceil(diacriticsList.MaxIndex() / 4)
- diacriticsPointer = 1
- selectedDiacritics := {w: "", a: "", s: "", d:""}
- DiacriticsOffset := {w: 1, a: 2, s: 3, d: 4}
- ;} Dead Key List
- fractions := {12:"½", 13:"⅓", 23:"⅔", 14:"¼", 24:"½", 34:"¾", 15:"⅕", 25:"⅖", 35:"⅗", 45:"⅘"
- , 16:"⅙", 26:"⅓", 36:"½", 46:"⅔", 56:"⅚", 18:"⅛", 28:"¼", 38:"⅜", 48:"½", 58:"⅝", 68:"¾", 78:"⅞"}
- ;}
- ;{ Cleanup script
- cleanUp() {
- /*
- RunWait counter.bat, Z:\, hide
- fileCount = 0
- Loop, read, rename.txt
- fileCount += %A_LoopReadLine%
- */
- ;MsgBox %fileCount%
- If fileCount <> 0
- RunWait rename.ahk
- RunWait % (FileExist( "\\psf\Home\Pictures\Scan Inputs\*.j*" ) && !WinExist( "scan.ahk" ))
- ? "scan2.ahk"
- : ""
- /*
- IfExist \\psf\Home\Pictures\Scan Inputs\*.j*
- IfWinNotExist scan.ahk
- RunWait, scan2.ahk
- */
- }
- light(lightNumber, toggle) {
- DetectHiddenWindows on
- if WinExist("arduino-control.ahk ahk_class AutoHotkey")
- PostMessage 4101, %lightNumber%, %toggle%
- DetectHiddenWindows off
- }
- addOnTime(toAdd) {
- nowTime := A_Now
- nowTime += %toAdd%, minutes
- FormatTime keyMinutes, %nowTime%, HH:mm:ss
- Return keyMinutes
- }
- SetTimer, CleanupAll, % 60 * 60 * 1000
- ;SetTimer, ClearMods, % 1000
- CleanupAll:
- ;light(5, 1)
- iter += 1
- scheduled := addOnTime(60) . ", " . addOnTime(120) . " and " . addOnTime(180)
- cleanUp()
- IniRead, countScreen, dat\rename.ini, main, screenshots, 0
- IniRead, countDl, dat\rename.ini, main, downloads, 0
- IniRead, currDate, dat\rename.ini, main, date, 0
- FileRead, results, completed.txt
- SetFormat, IntegerFast, D
- SetFormat, Integer, D
- iter := iter + 0
- TrayTip Cleanup Process Completed,
- (
- Organized Downloads/Screenshots, iteration %iter%
- Next scheduled times are:
- %scheduled%.
- %countScreen% file(s) moved to screenshots\%currDate%\
- %countDl% file(s) moved to downloads\%currDate%\
- ), 10, 1
- ;light(5, 0)
- if WinExist("arduino-control.ahk ahk_class AutoHotkey")
- PostMessage 4110, %lightNumber%, %toggle%
- Return
- CloseToolTip:
- ToolTip
- Return
- ;} cleanup script
- #Include USIntExt4Ext1.ahk
- #include %A_ScriptDir%\lib\Arduino.ahk
- DeadKey(diacritic) {
- global deadKeyList
- light(1, 1)
- Suspend On
- ToolTip Type the letter that the %diacritic% needs to be put on.
- Input letter, l1
- ToolTip
- Suspend Off
- if (letter = " ")
- Send % deadKeyList[diacritic, "none"]
- else if (deadKeyList[diacritic].hasKey(letter))
- {
- outLetter := deadKeyList[diacritic, letter]
- if letter is upper
- StringUpper, outLetter, outLetter
- Send %outLetter%
- }
- else, Send % deadKeyList[diacritic, "none"] . letter
- light(1, 0)
- }
- ;{ Basic keys
- >!Left::SendInput ←
- >!Up::SendInput ↑
- >!Right::SendInput →
- >!Down::SendInput ↓
- ;NumpadHome::SendInput ↖
- ;NumpadEnd::SendInput ↙
- ;NumpadPgUp::SendInput ↗
- ;NumpadPgDn::SendInput ↘
- ;NumpadClear::Return
- #d::Return ;Noops this so it won't show the desktop.
- ;{ Basic Dead Keys
- $`::DeadKey("Grave")
- $+`::DeadKey("Tilde")
- $'::DeadKey("Acute")
- $+'::DeadKey("Umlaut")
- $+6::DeadKey("Circumflex")
- $-::DeadKey("Macron")
- $+-::DeadKey("Stroke")
- <^>!+`::DeadKey("Ring")
- <^>!v::DeadKey("Caron")
- <^>!.::DeadKey("Cedilla")
- <^>!`::DeadKey("Breve")
- <^>!+.::DeadKey("Ogonek")
- $NumpadSub::Send {blind}-
- >!\::
- thisPage = -1
- loop
- {
- thisPage := Mod(thisPage + (keyPressed = "q" ? allPages - 1 : 1), allPages)
- keyLabels := "w: " . (diacriticsList[thisPage * 4 + 1] = "" ? "-" : diacriticsList[thisPage * 4 + 1])
- . "`na: " . (diacriticsList[thisPage * 4 + 2] = "" ? "-" : diacriticsList[thisPage * 4 + 2])
- . "`ns: " . (diacriticsList[thisPage * 4 + 3] = "" ? "-" : diacriticsList[thisPage * 4 + 3])
- . "`nd: " . (diacriticsList[thisPage * 4 + 4] = "" ? "-" : diacriticsList[thisPage * 4 + 4])
- nil := thisPage + 1
- IfWinNotExist AHK Dead Keys
- SplashTextOn, 300, 200, AHK Dead Keys (Page %nil% of %allPages%), %keyLabels% `n`ne: next page`nq: last page`nx: quit`n
- else {
- WinSetTitle,,, AHK Dead Keys (Page %nil% of %allPages%)
- ControlSetText, Static1, %keyLabels% `n`ne: next page`nq: last page`nx: quit`n
- }
- Input nil, , wasdeqx
- nil = ; we can discard the rest
- StringRight keyPressed, ErrorLevel, 1
- } until not (keyPressed = "e" or keyPressed = "q")
- SplashTextOff
- if (keyPressed = "x" or diacriticsList[thisPage * 4 + DiacriticsOffset[keyPressed]] = "")
- return
- else
- DeadKey(diacriticsList[thisPage * 4 + DiacriticsOffset[keyPressed]])
- return
- DisplayPage:
- Return
- ;} Basic Dead Keys
- ;{ AltGr
- ;{ lc
- >!q::Send œ
- >!r::Send ®
- >!t::Send þ
- >!a::Send æ
- >!s::Send ß
- >!d::Send ð
- >!f::Send г
- >!g::Send ȝ
- >!h::Send ħ
- >!j::Send ж
- >!k::Send ф
- >!o::Send ø
- >!z::Send ʒ
- >!c::Send ©
- >!b::Send ρ
- >!n::Send ñ
- >!m::Send µ
- >![::Send «
- >!]::Send »
- ; >!\::Send ¬
- >!;::Send ¶
- >!,::Send ç
- >!/::Send −
- ;} lc
- ;{ digits
- >!1::Send ¡
- >!2::Send ²
- >!3::Send ³
- >!4::Send ¤
- >!5::Send €
- >!6::Send ¼
- >!7::Send ½
- >!8::Send ¾
- >!9::Send ‘
- >!0::Send ’
- >!-::Send ¥
- >!=::Send ×
- >!+1::Send ¹
- >!+4::Send £
- >!+=::Send ÷
- >!+/::Send ⁄
- ;} digits
- ;{ uc
- >!+q::Send Œ
- >!+t::Send Þ
- >!+a::Send Æ
- >!+s::Send §
- >!+d::Send Ð
- >!+f::Send Г
- >!+g::Send Ȝ
- >!+h::Send Ħ
- >!+j::Send Ж
- >!+k::Send Ф
- >!+o::Send Ø
- >!+z::Send Ʒ
- >!+c::Send ¢
- >!+v::Send ·
- >!+b::Send Ρ
- >!+n::Send Ñ
- >!+[::Send ‹
- >!+]::Send ›
- >!+;::Send °
- >!+,::Send Ç
- ;} uc
- ;} AltGr
- ;} Basic Keys
- ;{ Special keys
- ;{ M1 – Keyboard
- NumpadClear & NumpadEnd:: ;M1G1
- MsgBox Cleaning up...
- CleanUp()
- Return
- NumpadClear & NumpadDown:: ;M1G2
- SetTimer ChangeButtonNames, 50
- MsgBox, 4, _Main.ahk time output, Do you want simple or verbose time output?
- IfMsgBox, No
- FormatTime currTime,, H 'hours,' m 'minutes and' s 'seconds have passed since day number' d 'of' MMMM 'in the year of our lord' yyyy
- else, FormatTime currTime,, HH:mm:ss dd.MM.yyyy
- SendInput %currTime%
- Return
- ChangeButtonNames:
- IfWinNotExist, _Main.ahk time output
- return ; Keep waiting.
- SetTimer, ChangeButtonNames, off
- WinActivate
- ControlSetText, Button1, &Simple
- ControlSetText, Button2, &Verbose
- return
- WheelLeft:: ;M1G3
- IniWrite, %iter%, _Main.ini, Main, iter
- doNotKeepNumber = 1
- +WheelLeft:: ;+M1G3 – reload while not keeping iteration number
- if doNotKeepNumber <> 1
- IniWrite, 0, _Main.ini, Main, iter
- SoundPlay C:\Windows\Media\chimes.wav, wait
- Reload
- Return
- NumpadClear & NumpadPgDn::Run Scan2.ahk ;M1G4
- +WheelRight:: ;+M1G5 - weather settings
- InputBox weatherSettings, Weather Settings,
- (
- Select the settings to apply to the weather detector:
- One of: fio for FORECAST.IO, or hko for HKO; then
- One of: nothing for simple units, or -n for True Blue SI Units; then
- One of: nothing for cached data, or -c for current data
- ),,,,,,,,%weatherSettings%
- if errorLevel
- return
- WheelRight:: ;M1G5 – weather
- RunWait C:\Windows\py.exe weather.py %weatherSettings%, Z:\Documents\AutoHotkey
- IniRead result, _Main.ini, weather, message
- IniRead isOld, _Main.ini, weather, olddata
- if isOld = True
- result = %result% (Cached data)
- MsgBox, 4, , %result%. Type result?
- IfMsgBox No
- return
- else, Send %result%
- Return
- NumpadClear & NumpadLeft:: ;M1G6
- InputBox requestedLocation, Write a location,Please write a location for which you want to find the timezone.
- if errorLevel
- {
- MsgBox Action cancelled.
- Return
- }
- If InStr(requestedLocation, A_Space)
- requestedLocation := Chr(34) . requestedLocation . Chr(34)
- RunWait C:\Windows\py.exe timezones.py %requestedLocation%
- IniRead result, _Main.ini, local time, message
- IniRead errors, _Main.ini, local time, error
- if errors <> none
- MsgBox There had been an error: %errors%
- Else
- {
- MsgBox, 4, , %result%. Type result?
- IfMsgBox No
- return
- else, Send %result%
- }
- Return
- ;} M1
- ;{ M1 – Gamepad
- NumpadClear & A:: Run IPA.ahk ;M1G1
- NumpadClear & B:: ;M1G2 – language selection key
- InputBox scriptName, Enter Script Name, Enter the name of the script you wish to write in: cyrillic`, greek`, kana`, hangul`, cas
- IfExist %scriptName%.ahk
- Run %scriptName%.ahk
- Return
- NumpadClear & C:: ;M1G3 – fraction key
- ToolTip Enter the fraction (e.g. ⅔ → 23)
- Input fractionCode, L2
- Send % fractions.hasKey(fractionCode) ? fractions[fractionCode] : ""
- ToolTip
- Return
- NumpadClear & D:: ;M1G4 – superscripts and subscripts
- superMode := (superMode = "none") ? "super"
- : (superMode = "super") ? "sub"
- : "none"
- ToolTip Superscript/subscript mode changed to %superMode%.
- SetTimer, closeToolTip, -2000
- Return
- ;{ Superscript and Subscript Hotkeys
- #If superMode = "super"
- 0::⁰
- 1::¹
- 2::²
- 3::³
- 4::⁴
- 5::⁵
- 6::⁶
- 7::⁷
- 8::⁸
- 9::⁹
- NumpadSub::Send ⁻
- NumpadAdd::⁺
- #If superMode = "sub"
- 0::₀
- 1::₁
- 2::₂
- 3::₃
- 4::₄
- 5::₅
- 6::₆
- 7::₇
- 8::₈
- 9::₉
- NumpadSub::Send ₋
- NumpadAdd::₊
- #If
- ;}
- NumpadClear & E:: Return ;M1G5
- NumpadClear & F:: Return ;M1G6
- NumpadClear & G:: ;M1G7 – dictionary
- InputBox, lookupData, Look up word, What is the word you want to look up?
- If ErrorLevel
- return
- Run http://en.wiktionary.org/wiki/%lookupData%
- return
- NumpadClear & H:: Run %comspec% /c "py lunches.py", Z:\Documents\autoHotkey, hide ;M1G8
- NumpadClear & I:: Run photofinder.ahk ;M1G9
- NumpadClear & J:: Run \\psf\Home\Downloads\%currDate%\ ;M1G10
- NumpadClear & K:: Run \\psf\Home\Desktop\Screenshots\%currDate%\ ;M1G11
- NumpadClear & L:: Send ^!+p ;M1G12 – Columbus!
- NumpadClear & M:: ;M1G13
- DetectHiddenWindows on
- if WinExist("arduino-control.ahk ahk_class AutoHotkey")
- PostMessage 4103
- DetectHiddenWindows off
- Return
- NumpadClear & N:: ;M1G14
- DetectHiddenWindows on
- if WinExist("arduino-control.ahk ahk_class AutoHotkey")
- PostMessage 4102
- DetectHiddenWindows off
- Return
- NumpadClear & O:: ;M1G15
- NumpadClear & P:: ;M1G16
- NumpadClear & Q:: ;M1G17
- NumpadClear & R:: ;M1G18
- NumpadClear & S:: ;M1G19
- NumpadClear & T:: ;M1G20
- NumpadClear & U:: ;M1G21
- NumpadClear & V:: ;M1G22
- NumpadClear & W:: ;M1G23
- NumpadClear & X:: ;M1G24
- MsgBox AHK Capture %A_ThisHotkey% (Placeholder)
- Return
- ;} M1
- ;{ M2 – the Paginating Keys
- NumpadClear & NumpadSub:: ;The EveryKey
- Input code,, {Enter}
- ;MsgBox %code%
- StringSplit codeBits, code, /
- reconstructed = k%codeBits1%p%codeBits2%m%codebits3%
- if isLabel(reconstructed)
- gosub %reconstructed%
- else
- MsgBox AHK Capture: Paginating Key %reconstructed% (Placeholder)
- Return
- /*
- Each code creates a command hook with the subroutine name
- kCpPmSCA (page, command, shift, control, alt)
- e.g. page 2, command 20, shift on = k20p1m100:
- */
- k1p1m000:
- loop {
- URLDownloadToFile http://asie.pl/drama.php?plain, dat\drama.txt
- FileRead, drama, dat\drama.txt
- MsgBox, 259, Minecraft Drama Generator, %drama% `r`n`r`n Another?
- IfMsgBox No
- break
- IfMsgBox Cancel
- {
- send %drama%
- break
- }
- }
- Return
- k2p1m000:
- key = {xxxxxxxx-xxxx-xxxx-4xxx-xxxxxxxxxxxx}
- loop 31
- {
- Random outputDigit, 0, 15
- outputDigit := (outputDigit = 10 ? "A"
- : outputDigit = 11 ? "B"
- : outputDigit = 12 ? "C"
- : outputDigit = 13 ? "D"
- : outputDigit = 14 ? "E"
- : outputDigit = 15 ? "F"
- : outputDigit)
- StringReplace key, key, x, %outputDigit%
- }
- Send {Raw}%key%
- Return
- ;} M2
- ;{ M3 – Program Specific Keys
- ;{ Quassel only commands
- #IfWinActive AHK_class QWidget
- XButton1:: ;M3G1
- Send /nick isoraqathedh
- GoSub confirm
- Return
- XButton2::Send {down}/msg NickServ identify%A_Space% ;M3G2
- +XButton2:: Send {down}/msg NickServ GHOST isoraqathedh%A_Space% ;+M3G2
- Launch_Mail::ControlClick x218 y846, AHK_class QWidget ;M3G3 Italic (387,846)
- +Launch_Mail::ControlClick x194 y846, AHK_class QWidget ;+M3G3 Bold
- +Browser_Home::Send {down}/away{enter} ;+M3G4
- Browser_Home:: ;M3G4
- Send {down}
- InputBox, reason, Input Away Reason, Write reason for away below.,,,,,,,,alis
- If ErrorLevel
- Send, +{Home}{Backspace}
- Else, Send, {backspace}/away %reason%{enter}
- Return
- confirm:
- MsgBox, 4, Confirm IRC Command, Would you like to continue? (press Yes or No)
- IfMsgBox, Yes, Send, {enter}
- Else, Send, +{Home}{Backspace}
- Return
- ;} Quassel-only commands
- ;{ Skype-only commands
- #IfWinActive ahk_class tSkMainForm
- XButton1::Send !soo ;M3G1
- XButton2::Send !soa ;M3G2
- Launch_Mail::Send !soi ;M3G3
- Browser_Home::Send !sod ;M3G4
- ^up:: ;Chat Up
- Send !2
- Sleep 100
- Send {up}{enter}
- Sleep 400
- Send {Ctrl up}
- Return
- ^down:: ;Chat Down
- Send !2
- Sleep 100
- Send {down}{enter}
- Sleep 400
- Send {Ctrl up}
- Return
- ;} Skype-only commands
- ;{ Notepad++ only commands
- #IfWinActive ahk_class Notepad++
- F1::Return
- ;F10::Send {home}color({#}666666){{}{end}{}}
- XButton1::Run HTML.ahk ;M3G1
- XButton2::Run CSS.ahk ;M3G2
- Launch_Mail::Run Javascript.ahk ;M3G3
- ;} Notepad++ only commands
- ;{ Firefox only commands
- #IfWinActive ahk_class MozillaWindowClass
- XButton1::Send {Browser_Back} ;M3G1 – Back
- XButton2::Send {Browser_Forward} ;M3G2 – Forward
- Launch_Mail::Send !tfo ;M3G3 – FoxReplace wordfilter list fun!
- Browser_Home:: ;M3G4 – site-specific action
- Clipsaved = %ClipboardAll%
- Sleep 600
- Send !d^x
- IfInString clipboard, zh.wikipedia.org/wiki/
- {
- StringReplace clipboard, clipboard, /wiki/, /zh-hk/
- Send ^v{enter}
- }
- Else, IfInString clipboard, //xkcd.com
- {
- StringReplace Clipboard, Clipboard, https:, http:
- StringReplace Clipboard, Clipboard, xkcd.com, explainxkcd.com
- Send ^v{enter}
- }
- Else, IfInString Clipboard, //tvtropes.org/
- {
- Send !tww
- Sleep 600
- SendRaw,
- ( Join`s
- for (i in document.getElementsByClassName("spoiler")) {
- document.getElementsByClassName("spoiler")[i].setAttribute("style", " color:black !important; background-color:#DDD;");
- for (j in document.getElementsByClassName("spoiler")[i].getElementsByTagName(" a"))
- if (document.getElementsByClassName("spoiler")[i].getElementsByTagName(" a")[j].setAttribute)
- document.getElementsByClassName("spoiler")[i].getElementsByTagName(" a")[j].setAttribute("style", "color:blue;");
- }
- )
- Send {Enter}
- Sleep 500
- Send !t
- Sleep 1500
- Send ww
- }
- Else, Send {esc}
- Clipboard := clipsaved
- Clipsaved =
- Return
- ;} Firefox only commands
- ;{ Zim-wiki only commands
- #IfWinActive - Zim ahk_class gdkWindowToplevel
- XButton1::Send !mssss{Enter} ; M3G1 Superscript
- +XButton1::Send !msss{Enter} ; +M3G1 Subscript
- XButton2::Send !it ; M3G2 Bulleted list
- +XButton2::Send !in ;+M3G2 Numbered list
- Launch_Mail::Send !ii ; M3G3 Add image
- Launch_App2:: ;M3G6 special keys
- InputBox reason, Special Character Entry Field, Use this text box to input text that the program's text input handler refuses to input.
- Send %reason%
- Return
- ;} Zim-wiki only commands
- ;{ Windows Explorer-only commands
- #IfWinActive AHK_class CabinetWClass
- XButton1::Send {Browser_Back} ;M3G1 – Back
- XButton2::Send {Browser_Forward} ;M3G2 – Forward
- Launch_Mail::Send !{up} ;M3G3 – up
- ;}
- ;{ Emacs-only commands
- #IfWinActive ahk_class Emacs
- /*
- XButton1::Send ^xb{enter} ;M3G1 – file switchback
- +XButton1::Send ^c^z^x1 ;+M3G1 – REPL switchback
- XButton2::Send ^xb ;M3G2 – file switchback (specified)
- Launch_Mail::Send ^xu ;M3G3 – last file
- Browser_Home::Send ^x{right} ;M3G4 – next file
- +Browser_Home::Send ^x{left} ;+M3G4 – previous file
- Launch_Media::Send ^c^c ;M3G5 – compile or cancel
- Launch_App2::Send ^x^s ;M3G6 – save
- ; Gamepad
- NumpadClear & 1:: ;M3G1 – load last called file
- gosub SleepSome
- Send (load +'Z:!p){bs}
- Return
- NumpadClear & 2::
- gosub SleepSome
- Send +{up}^w^y^y{up} ;M3G2 – clone line
- Return
- NumpadClear & 3:: ;M3G3 – The RIGHT working directory
- gosub SleepSome
- Send ^x^f^+a^wZ:/Documents/Programming/
- Return
- NumpadClear & 4:: ;M3G4 – Clear REPL
- gosub SleepSome
- MsgBox 4, Clear REPL, Are you sure?
- IfMsgBox Yes
- Send ^c!o
- Return
- NumpadClear & F10:: ;M3G20 – cut
- gosub SleepSome
- Send ^w
- Return
- NumpadClear & F11:: ;M3G21 – copy
- gosub SleepSome
- Send !w
- Return
- NumpadClear & F12:: ;M3G22 – paste
- gosub SleepSome
- Send ^y
- Return
- SleepSome:
- Sleep 500
- Return
- */
- ; Other
- ::d-bind::destructuring-bind
- ::m-v-bind::multiple-value-bind
- ;} Emacs-only commands
- ;{ Scite4AHK only commands
- #IfWinActive ahk_class SciTEWindow
- !0::Send !va ; Fold all
- NumpadAdd::Send {+}
- NumpadSub::Send -
- ;}
- #IfWinActive
- ;{ Else
- XButton1:: ;M3G1
- XButton2:: ;M3G2
- Launch_Mail:: ;M3G3
- Browser_Home:: ;M3G4
- Launch_Media:: ;M3G5
- Launch_App2:: ;M3G6
- ; Gamepad
- NumpadClear & 1:: ;M3G1
- NumpadClear & 2:: ;M3G2
- NumpadClear & 3:: ;M3G3
- NumpadClear & 4:: ;M3G4
- NumpadClear & 5:: ;M3G5
- NumpadClear & 6:: ;M3G6
- NumpadClear & 7:: ;M3G7
- NumpadClear & 8:: ;M3G8
- NumpadClear & 9:: ;M3G9
- NumpadClear & 0:: ;M3G10
- NumpadClear & F1:: ;M3G11
- NumpadClear & F2:: ;M3G12
- NumpadClear & F3:: ;M3G13
- NumpadClear & F4:: ;M3G14
- NumpadClear & F5:: ;M3G15
- NumpadClear & F6:: ;M3G16
- NumpadClear & F7:: ;M3G17
- NumpadClear & F8:: ;M3G18
- NumpadClear & F9:: ;M3G19
- NumpadClear & F10:: ;M3G20
- NumpadClear & F11:: ;M3G21
- NumpadClear & F12:: ;M3G22
- NumpadClear & Y:: ;M3G23
- NumpadClear & Z:: ;M3G24
- SoundBeep
- MsgBox Program-specific action keys. This program has yet to have this key assigned for it.
- Return
- ; Also noop Launch_Mail
- +Launch_Mail:: Return
- ;}
- ;} M3
- ;{ Media Keys
- Volume_Mute::
- IniWrite 1, dat\rename.ini, main, manualt
- MsgBox The next download cleanup session will be manual.
- Return
- Volume_Up::
- ;Return
- Volume_Down::
- ;Return
- Media_Play_Pause::
- ;Return
- Media_Stop::
- ;Return
- Media_Prev::
- ;Return
- Media_Next::
- ;Return
- SoundBeep
- MsgBox AHK Capture %A_ThisHotKey% (Placeholder)
- Return
- ;} Media Keys
- ;} Special Keys
- ;{ Joystick
- Joy1::
- MsgBox AHK Capture %A_ThisHotkey% (Placeholder)
- Return
- ;} Joystick
- ;{ Other
- makeDate() {
- FormatTime, currTime,, 'Screen Shot' yyyy-MM-dd 'at' HH.mm.ss
- FormatTime, currDate,, yyyy-MM
- IfNotExist, \\psf\Home\Desktop\Screenshots\%currDate%, FileCreateDir, \\psf\Home\Desktop\Screenshots\%currDate%
- Random randomMillies, 0, 999
- return currTime . "." . SubStr("000" . randomMillies, -2) . ".png"
- }
- PrintScreen:: ;Local PrintScreen, regional
- currTime := makeDate()
- Run C:\Program Files (x86)\MiniCap\MiniCap.exe -captureregselect -clipimage -exit -save "\\psf\Home\Desktop\Screenshots\%currTime%"
- Return
- +PrintScreen:: ;Local PrintScreen, global
- currTime := makeDate()
- Run C:\Program Files (x86)\MiniCap\MiniCap.exe -capturedesktop -clipimage -exit -save "\\psf\Home\Desktop\Screenshots\%currTime%"
- Return
- !PrintScreen::Run C:\Program Files (x86)\Gyazo\gyazowin.exe, C:\Program Files (x86)\Gyazo ; Internet Printscreen
- Pause::Pause
- +Pause::Suspend
- +#c:: Run crusher.ahk
- ;} Other
- OnExit:
- IniWrite, %iter%, _Main.ini, Main, iter
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment