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
DownloadToFile(url, filename) | |
{ | |
static a := "AutoHotkey/" A_AhkVersion | |
if (!(o := FileOpen(filename, "w")) || !DllCall("LoadLibrary", "str", "wininet") || !(h := DllCall("wininet\InternetOpen", "str", a, "uint", 1, "ptr", 0, "ptr", 0, "uint", 0, "ptr"))) | |
return 0 | |
c := s := 0 | |
if (f := DllCall("wininet\InternetOpenUrl", "ptr", h, "str", url, "ptr", 0, "uint", 0, "uint", 0x80003000, "ptr", 0, "ptr")) | |
{ | |
while (DllCall("wininet\InternetQueryDataAvailable", "ptr", f, "uint*", s, "uint", 0, "ptr", 0) && s > 0) | |
{ |
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
DownloadBin(url, byref buf) | |
{ | |
static a := "AutoHotkey/" A_AhkVersion | |
if (!DllCall("LoadLibrary", "str", "wininet") || !(h := DllCall("wininet\InternetOpen", "str", a, "uint", 1, "ptr", 0, "ptr", 0, "uint", 0, "ptr"))) | |
return 0 | |
c := s := 0 | |
if (f := DllCall("wininet\InternetOpenUrl", "ptr", h, "str", url, "ptr", 0, "uint", 0, "uint", 0x80003000, "ptr", 0, "ptr")) | |
{ | |
while (DllCall("wininet\InternetQueryDataAvailable", "ptr", f, "uint*", s, "uint", 0, "ptr", 0) && s > 0) | |
{ |
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
AutoSort(Arr) { | |
t := [] | |
for k, v in Arr | |
t[RegExReplace(v, "\s")] := v | |
for k, v in t | |
Arr[A_Index] := v | |
return Arr | |
} |
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
PIDfromAnyID( anyID="" ) { ; SKAN, 10-May-2014. http://ahkscript.org/boards/viewtopic.php?p=17974#p17974 | |
Process, Exist, %anyID% | |
IfGreater, ErrorLevel, 0, Return ErrorLevel | |
DetectHiddenWindows, % SubStr( ( ADHW := A_DetectHiddenWindows ) . "On", -1 ) | |
SetTitleMatchMode, % SubStr( ( ATMM := A_TitleMatchMode ) . "RegEx", -4 ) | |
WinGet, PID, PID, ahk_id %anyID% | |
IfEqual, PID,, WinGet, PID, PID, %anyID% | |
DetectHiddenWindows, %ADHW% | |
SetTitleMatchMode, %ATMM% | |
Return PID ? PID : 0 |
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
F1::ComObjCreate("shell.application").ControlPanelItem("Firewall.cpl") |
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
SetParentByTitle(Window_Title_Text, Gui_Number) ; F | |
{ | |
WinGetTitle, Window_Title_Text_Complete, %Window_Title_Text% | |
Parent_Handle := DllCall( "FindWindowEx", "uint",0, "uint",0, "uint",0, "str", Window_Title_Text_Complete) | |
Gui, %Gui_Number%: +LastFound | |
Return DllCall( "SetParent", "uint", WinExist(), "uint", Parent_Handle ) | |
} |
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
SetParentByClass(Window_Class, Gui_Number) ; F | |
{ | |
Parent_Handle := DllCall( "FindWindowEx", "uint",0, "uint",0, "str", Window_Class, "uint",0) | |
Gui, %Gui_Number%: +LastFound | |
Return DllCall( "SetParent", "uint", WinExist(), "uint", Parent_Handle ) | |
} |
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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme", | |
"font_face": "Inconsolata", | |
"font_size": 11, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
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
[ | |
// Material-Theme-Darker Patch | |
// ========================================================================== | |
// Sidebar Row Padding | |
// -------------------------------------------------------------------------- | |
{ | |
"class": "sidebar_tree", | |
}, |
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
/* | |
TimeDiff.ahk | |
Usage: | |
TimeDiff.ShowTimeDiff() | |
*/ | |
class TimeDiff { | |
; Public API |
OlderNewer