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
; http://ahkscript.org/boards/viewtopic.php?f=28&p=25564#p25564 | |
Class GuiDropFiles | |
{ | |
config(GuiHwnd, BeginLable = "", EndLable = "") { | |
global IDropSource, IDropTarget | |
VarSetCapacity(IDropSource,24,0), NumPut(&IDropSource+4,IDropSource), nParams=31132 | |
Loop, Parse, nParams | |
NumPut(RegisterCallback("IDropSource","",A_LoopField,A_Index-1),IDropSource,4*A_Index) |
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
; http://www.autohotkey.com/board/topic/51488-treeviews-color-individual-rows-multiple-tv-support/ | |
;LV functions | |
LV_Initialize(Gui_Number="", Control="", Column="") | |
{ | |
local hGUI, hLV | |
;Get either class or hWnd of control | |
If !Control ;Control omitted | |
{ | |
If (Gui_Number > 99) |
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
; GLOBAL SETTINGS =============================================================================================================== | |
#Warn | |
#NoEnv | |
#SingleInstance Force | |
global WM_USER := 0x00000400 | |
global PBM_SETMARQUEE := WM_USER + 10 | |
global PBM_SETSTATE := WM_USER + 16 | |
global PBS_MARQUEE := 0x00000008 |
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
; ============================================================================== | |
; 功能: 读取 ini 文件的 [Settings] 区段,脚本退出时自动保存 | |
; (ini 文件名与脚本文件同名) | |
; ============================================================================== | |
/* | |
; 示例: | |
ReadSettings( { x : "" | |
, y : "" | |
, key3: "默认值" } ) |
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
; #Persistent | |
; http://www.autohotkey.com/forum/viewtopic.php?t=17314 | |
; works on AHK_L Ansi/Unicode x86 | |
; shows overflow notification area icons also.. | |
#NoTrayIcon | |
DetectHiddenWindows, On | |
MsgBox % TrayIcons() | |
if A_OSVersion in WIN_VISTA,WIN_7 |
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, % GetLoggedinQQ() | |
GetLoggedinQQ() { | |
static wb | |
Gui, New | |
Gui, Add, ActiveX, w0 h0 vwb, http://xui.ptlogin2.qq.com/cgi-bin/qlogin | |
While wb.readystate != 4 || wb.busy | |
Sleep, 100 | |
wb.document.parentWindow.execScript("Javascript:document.body.innerHTML=GetuinKey(); function GetuinKey(){var text="""";var q_hummerQtrl=null;var g_vOptData=null;if(window.ActiveXObject){try{q_hummerQtrl=new ActiveXObject(""SSOAxCtrlForPTLogin.SSOForPTLogin2"");var A=q_hummerQtrl.CreateTXSSOData();q_hummerQtrl.InitSSOFPTCtrl(0,A);g_vOptData=q_hummerQtrl.CreateTXSSOData();var a=q_hummerQtrl.DoOperation(1,g_vOptData);var V=a.GetArray(""PTALIST"");var f=V.GetSize();var H=$(""list_uin"");for(var g=0;g<f;g++){var E=V.GetData(g);var P=E.GetDWord(""dwSSO_Account_dwAccountUin"");var U=E.GetStr(""strSSO_Account_strNickName"");var G=E.GetBuf(""bufST_PTLOGIN"");var A=G.GetSize();var N="""";for(var Y=0;Y<A;Y++){var B=G.GetAt(Y).toString(""16"");if(B.length==1){B=""0""+B};N+=B};text+=P+'|'+U+'|'+N+';'}}catch(b){}};return text};") |
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
Img = http://www.animatedgif.net/cartoons/A_5odie_e0.gif | |
Img2 = http://www.animatedgif.net/cartoons/anime_hero2_e0.gif | |
Gui New, +HwndhGUI | |
gif1 := AnimatedGif( hGUI, Img, 50, 50, 200, 200, "", "MyGif", "myGif_" ) | |
gif2 := AnimatedGif( hGUI, Img2, 300, 50, 292, 167, "White", "MyGif2", myGif2 ) | |
Gui Show, center | |
return | |
GuiClose: |
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
class mProcess | |
{ | |
static pidList := [] | |
; 等待进程小于指定数量 | |
wait(MaxRun = 1) { | |
Loop { | |
count := 0 | |
newList := [] |
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
#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 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
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") |