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
class mProcess | |
{ | |
static pidList := [] | |
; 等待进程小于指定数量 | |
wait(MaxRun = 1) { | |
Loop { | |
count := 0 | |
newList := [] |
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
#IfWinActive, ahk_class PX_WINDOW_CLASS ; Sublime Text 窗口 | |
F5::st_ahk.run() | |
^F5::st_ahk.compile() | |
; F2::WinMenuSelectItem,,, 6&, 10&, 2& | |
#If | |
; 功能: 运行/编译在 Sublime Text 中打开的 ahk 文件。 | |
; | |
; * 编译的时候,会自动将需要的 ahk 文件复制到“脚本目录\Lib\”。 | |
; (注:不会覆盖旧文件) |
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
class GDI | |
{ | |
__New(hWnd, CliWidth=0, CliHeight=0) | |
{ | |
if !(CliWidth && CliHeight) | |
{ | |
VarSetCapacity(Rect, 16, 0) | |
DllCall("GetClientRect", "Ptr", hWnd, "Ptr", &Rect) | |
CliWidth := NumGet(Rect, 8, "Int") | |
CliHeight := NumGet(Rect, 12, "Int") |
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
#c::cmdHere() | |
cmdHere() { | |
If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass") | |
WinGetText, data | |
Run, cmd, % RegExMatch(data, "i`am)^地址: \K.*", dir) ? dir : A_Desktop | |
} | |
/* | |
cmdHere() { |
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
/* | |
ObjRegisterActive(Object, CLSID, Flags:=0) | |
Registers an object as the active object for a given class ID. | |
Requires AutoHotkey v1.1.17+; may crash earlier versions. | |
Object: | |
Any AutoHotkey object. | |
CLSID: | |
A GUID or ProgID of your own making. |
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
; ====================================================================================================================== | |
; Namepace: ScrollGUI | |
; Function: Create a scrollable GUI as a parent for GUI windows. | |
; Tested with: AHK 1.1.19.02 | |
; Tested on: Win 8.1 (x64) | |
; Change log: 1.0.00.00/2015-02-06/just me - initial release on ahkscript.org | |
; License: The Unlicense -> http://unlicense.org | |
; ====================================================================================================================== | |
Class ScrollGUI { | |
Static Instances := [] |
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
StdOutToVar( sCmd ) { ; GAHK32 ; Modified Version : SKAN 05-Jul-2013 http://goo.gl/j8XJXY | |
Static StrGet := "StrGet" ; Original Author : Sean 20-Feb-2007 http://goo.gl/mxCdn | |
DllCall( "CreatePipe", UIntP,hPipeRead, UIntP,hPipeWrite, UInt,0, UInt,0 ) | |
DllCall( "SetHandleInformation", UInt,hPipeWrite, UInt,1, UInt,1 ) | |
VarSetCapacity( STARTUPINFO, 68, 0 ) ; STARTUPINFO ; http://goo.gl/fZf24 | |
NumPut( 68, STARTUPINFO, 0 ) ; cbSize | |
NumPut( 0x100, STARTUPINFO, 44 ) ; dwFlags => STARTF_USESTDHANDLES = 0x100 | |
NumPut( hPipeWrite, STARTUPINFO, 60 ) ; hStdOutput |
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
剪贴板_全角数字转半角(p*) { | |
; 函数内部调用 | |
If (p.1 = "ToolTip") { | |
ToolTip, % p.2 | |
fn := Func(A_ThisFunc).Bind("Remove_ToolTip") | |
SetTimer, %fn%, -2000 | |
Return | |
} | |
Else If (p.1 = "Remove_ToolTip") { |