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
; https://en.wikipedia.org/wiki/Digest_access_authentication | |
class DigestAuth | |
{ | |
Build(username, password, method, uri, ByRef WWWAuthenticate) { | |
Loop, Parse, % "realm|qop|algorithm|nonce|opaque", | | |
RegExMatch(WWWAuthenticate, A_LoopField "=""?\K[^,""]+", %A_LoopField%) | |
cnonce := this.create_cnonce() | |
nonceCount := "00000001" |
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
Chrome_GetTabList() { | |
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") | |
whr.Open("GET", "http://localhost:9222/json") | |
whr.Send() | |
out := [] | |
for i, tab in Jxon_Load(whr.ResponseText) | |
{ | |
if (tab.type = "page") | |
out.push( {url: tab.url, title: tab.title} ) |
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
Gui, +HWNDhGUI | |
Gui, Add, Text, x50 y50 w700 h500 HWNDhText, | |
Gui, Show, w800 h620 | |
mpv := "D:\Program Files\mpv\mpv.exe" | |
Run, %mpv% --idle --input-ipc-server=\\.\pipe\mpvsocket --wid=%hText% ; Or --wid=%hGUI% | |
return | |
GuiDropFiles: | |
mpv_loadfile(A_GuiEvent) |
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
; Accessible Info Viewer by jethrow | |
; https://autohotkey.com/board/topic/77888-accessible-info-viewer-alpha-release-2012-09-20/ | |
; Modified by tmplinshi - https://gist.github.com/tmplinshi/0fcb8655c1402a3662ac048d0d974915/ | |
#NoEnv | |
#SingleInstance, force | |
SetBatchLines, -1 | |
{ | |
WM_ACTIVATE := 0x06 |
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
GetBitrate(FileName) { | |
if !InStr(FileName, ":") { | |
FileName := A_WorkingDir "\" FileName | |
} | |
RegExMatch(FileName, "^(.*\\)(.*)$", m) | |
oShell := ComObjCreate("Shell.Application") | |
oFolder := oShell.Namespace(m1) | |
return oFolder.GetDetailsOf( oFolder.Parsename(m2), 28 ) | |
} |
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
/* | |
ArgsToObj - Convert command line parameters to object | |
Example: | |
--------------------------------------------------------------------- | |
Command line parameters: | |
-from gbk /to utf-8 /a /b --delete-top 2 --delete-end=5 in.txt out.txt | |
Return: | |
{ |
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
/* | |
ParseCmdline - parse command line to object | |
Example: | |
cmdline = "a test.ahk" -from gbk /to utf-8 /a /b --delete-top 2 --delete-end=5 "in file.txt" out.txt | |
o := ParseCmdline(cmdline) | |
MsgBox, % obj_print(o) | |
Return: | |
{ |
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
b64_encode(p*) { | |
return b64.encode(p*) | |
} | |
b64_decode(p*) { | |
return b64.decode(p*) | |
} | |
class b64 | |
{ |
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
; ---------------------------------------------------------------------------------------------------------------------- | |
; Function .....: StdoutToVar_CreateProcess | |
; Description ..: Runs a command line program and returns its output. | |
; Parameters ...: sCmd - Commandline to execute. | |
; ..............: sEncoding - Encoding used by the target process. Look at StrGet() for possible values. | |
; ..............: sDir - Working directory. | |
; ..............: nExitCode - Process exit code, receive it as a byref parameter. | |
; Return .......: Command output as a string on success, empty string on error. | |
; AHK Version ..: AHK_L x32/64 Unicode/ANSI | |
; Author .......: Sean (http://goo.gl/o3VCO8), modified by nfl and by Cyruz |
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
; Works for DropDownList/ComboBox/ListBox | |
Class ListBox | |
{ | |
__New(hwnd) { | |
; GuiControl, +AltSubmit, %hwnd% | |
this.hwnd := hwnd | |
} | |
Add(str) { | |
GuiControl,, % this.hwnd, %str% |