This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Created by Frankie Bagnardi | |
Forum topic: http://www.autohotkey.com/forum/topic74340.html | |
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
v0.5 | |
Modified by R3gX - http://www.autohotkey.com/board/topic/69236-regex-class/page-2#entry582249 | |
*/ | |
class RegEx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Use this one-liner to produce a JSON literal from the Git log: | |
git log \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Written by Lexikos - see: http://www.autohotkey.com/board/topic/20925-listvars/#entry156570 | |
Loop { | |
tick := A_TickCount | |
ToolTip % ListGlobalVars() | |
} | |
ListGlobalVars() | |
{ | |
static hwndEdit, pSFW, pSW, bkpSFW, bkpSW | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Args( CmdLine := "", Skip := 0 ) { ; By SKAN, http://goo.gl/JfMNpN, CD:23/Aug/2014 | MD:24/Aug/2014 | |
Local pArgs := 0, nArgs := 0, A := [] | |
pArgs := DllCall( "Shell32\CommandLineToArgvW", "WStr",CmdLine, "PtrP",nArgs, "Ptr" ) | |
Loop % ( nArgs ) | |
If ( A_Index > Skip ) | |
A[ A_Index - Skip ] := StrGet( NumGet( ( A_Index - 1 ) * A_PtrSize + pArgs ), "UTF-16" ) | |
Return A, A[0] := nArgs - Skip, DllCall( "LocalFree", "Ptr",pArgs ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test := GetTimeZones() | |
ExitApp | |
GetTimeZones() { | |
; Taken from: http://www.autohotkey.com/community/viewtopic.php?t=73951 | |
OutputDebug % "**** GetTimeZones START ****" | |
; Get the "Time Zones" entries from registry | |
RegRoot := "HKEY_LOCAL_MACHINE" | |
RegKey := "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;############################ | |
; description: Generate JUnit-XML output for Yunit-Framework (https://github.com/Uberi/Yunit) | |
; | |
; author: hoppfrosch | |
; date: 20121207 | |
;############################ | |
class xml{ | |
; Credits:By Maestrith (http://www.autohotkey.com/board/topic/85010-xml-parser/?hl=msxml) | |
__New(param*){ | |
ref:=param.1,root:=param.2,file:=param.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;shows what version of ahk the user is running | |
; i think sinkfaze might have come up with this originally (dist. by camerb) | |
info := "AutoHotkey:`t" "AutoHotkey" ((A_AhkVersion < 1.1) ? " Classic ": ((A_IsDll ? "_H (DLL)":"_L"))) | |
. "`nAHK Version:`t" A_AhkVersion | |
. "`nUnicode:`t`t" (A_IsUnicode ? "Yes " ((A_PtrSize=8) ? "(64-bit)" : "(32-bit)") : "No") | |
. "`nOperating System:`t" (!A_OSVersion ? A_OSType : A_OSVersion) " " (A_Is64bitOS ? "(64-bit)" : "(32-bit)") | |
. "`nAdmin Rights:`t" (A_IsAdmin ? "Yes" : "No") | |
MsgBox, 68, Support Information, %info%`n`nWould you like to copy this information to the Clipboard? | |
IfMsgBox Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Named parameters for functions | |
; | |
; Credits: named parameters by lexikos (http://www.autohotkey.com/board/topic/62504-variadic-functions) | |
; Note the Brackets around the parameters and the trailing star {...}*!!! (Brackets: JSON - Star: Variadic ...) | |
Test({WinTitle: "ahk_class Notepad", ExcludeTitle: "Untitled", Cmd: "PID"}*) | |
Test2({WinTitle: "ahk_class Notepad", ExcludeTitle: "Untitled2", Cmd: "PID2"}*) | |
; Simple Variadic: All parameters are accesible through prms-Array | |
Test(prms*) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CallStack(deepness = 5, printLines = 1) | |
{ | |
loop % deepness | |
{ | |
lvl := -1 - deepness + A_Index | |
oEx := Exception("", lvl) | |
oExPrev := Exception("", lvl - 1) | |
FileReadLine, line, % oEx.file, % oEx.line | |
if(oEx.What = lvl) | |
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Conversion of a version given as string to a numerical version (to allow version comparison) | |
; | |
; see: http://www.autohotkey.com/board/topic/62037-conversion-of-version-string-to-number/ | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Example: Does current AHK-Version meet my requirements? | |
; Which version of Autohotkey is required? | |
versionAHKReq := "1.0.90.0" | |
vAHKCurr := NumifyVersion(A_AhkVersion) | |
vAHKReq := NumifyVersion(versionAHKReq) |
OlderNewer