This file contains hidden or 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
FolderArr := [], Folders := "" | |
FolderFile := A_ScriptDir "\FolderList.txt" | |
shObj := ComObjCreate( "shell.application" ).Windows | |
Gui, +AlwaysOnTop | |
Gui, Add, Button, section gOpen, Open Folders | |
Gui, Add, Text, vStat, % " " | |
Gui, Add, Button, gSave ys0, Save Folders | |
Gui, Show,, DirMember |
This file contains hidden or 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
url = http://www.archiwum.wyborcza.pl/Archiwum/1,0,8137863,20160401RP-DGW,Amerykanska_czata_w_Polsce,.html | |
reqObj := ComObjCreate( "WinHttp.WinHttpRequest.5.1" ) | |
reqObj.Open( "GET", url, false ), reqObj.Send() | |
htmObj := ComObjCreate( "HTMLfile" ), htmObj.Write( reqObj.ResponseText ) | |
Elements := RegExReplace( htmObj.getElementById( "arM" ).innerHTML, "i)(</|<).*?>", "$1div>" ) | |
htmObj.Close() |
This file contains hidden or 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
ClickCoords( x, y, wT, ctrl = "", btn := "left" ) | |
{ | |
For Each, Msg in ( btn = "left" ? ( l := [ 1, 0, 2 ] ) : btn = "right" ? [ 4, 0, 5 ] : l ) | |
PostMessage, % 0x20 Msg, 0x1, % x|y<<16, % ctrl, % wT | |
} |
This file contains hidden or 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
rand( min = 0, max = 10000 ) { | |
random, rand, % min, % max | |
return rand | |
} |
This file contains hidden or 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
SetTimer, WatchWindow, 100 | |
xOfs := 189, yOfs := 30, GuiCnt := 0 | |
WatchWindow: | |
ControlGet, PlgHwnd, Hwnd,, eXTVSTiwin1, ahk_class TPluginForm | |
if ( WinExist( "ahk_id " PlgHwnd ) && GuiCnt = 0 ) | |
{ | |
Gui Font, s7 CA0E6E6 |
This file contains hidden or 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
GetSamples( bin, ppq, tmpo, srate = 44.1, debug = 0 ) | |
{ | |
; credit: just me >> https://autohotkey.com/boards/viewtopic.php?f=5&t=15637 | |
Loop | |
r := ( (!r?r!!:r) << 7 ) + ( ( h := "0x" . SubStr( bin, ( a_index * 2) - 1, 2 ) ) & 0x7F ) | |
Until ( h <= 0x80 ) | |
Return debug ? r : Round( r * ( 60000 / ( ( 60000000 / tmpo ) * ppq ) ) * srate ) | |
} |
This file contains hidden or 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
new RunChrome( "https://autohotkey.com", [ 0, 0, 1000, 500 ] ) | |
return | |
Esc::ExitApp | |
class RunChrome | |
{ | |
__New( url, coords ) | |
{ | |
this.arr := this.EnumWindows(), this.ShellHookWindow( 1 ) |
This file contains hidden or 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
msgbox % eval("2*4*23") " <> " (2*4*23) "`n" eval("Math.pow(3,7)") " <> " (3**7) "`n" eval( "5*9*poo" ) | |
eval( exp ) | |
{ | |
return InStr([(o:=ComObjCreate("HTMLfile")).Write(".<script>document.body.innerHTML=eval('" exp "')</script>"),r:=o.body.innerHTML][2],"<")?"Error":r | |
} |
This file contains hidden or 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
; API call https://msdn.microsoft.com/en-us/library/windows/desktop/ms633554(v=vs.85).aspx | |
Window_Tile(Monitor=""){ | |
; Required constants: MDITILE_VERTICAL | |
; SM_CMONITORS | |
; WS_CAPTION | |
; WS_MAXIMIZEBOX | |
; WS_MINIMIZE | |
; WS_VISIBLE | |
; WS_EX_TOOLWINDOW | |
wHow:=MDITILE_VERTICAL |
This file contains hidden or 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
msgbox % ShortGitURL( "https://github.com/blog/category/ship" ) ; example long git url | |
ShortGitURL( gitURL ) | |
{ | |
hReq := ComObjCreate("Microsoft.XMLHTTP") | |
hReq.Open("GET", "https://git.io", False), hReq.Send("url=" gitURL) | |
Return hReq.getResponseHeader("Location") | |
} |