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
Download(url, dest) | |
{ | |
static oHttp := ComObjCreate("WinHttp.WinHttpRequest.5.1") | |
oHttp.Open("GET", url, True) | |
oHttp.Send() | |
If !oHttp.WaitForResponse(-1) ; Success = -1, Timeout = 0, No response = Empty String | |
Return False | |
if ( ComObjType(oHttp.ResponseStream) = 0xD ) ; VT_UNKNOWN = 0xD | |
{ |
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: ExcelToObj | |
; Author: tmplinshi | |
; Tested On: AHK: 1.1.14.03 U32 | OS: WinXP_SP3 | Microsoft Excel: 2010 | |
; ================================================================= | |
; Parameters: | |
; ExcelFile - Path to xls/xlsx file | |
; ResultObj - Structure is [ [], [], ... ] | |
; Format - Can be "csv" (default) or "html" | |
ExcelToObj(ExcelFile, ByRef ResultObj, Format = "csv") { | |
static xlCSV := 6, xlHTML := 44 |
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
; Last update: 2014-4-23 | |
IsOfficeFile(FileName, Extensions = "doc,docx,xls,xlsx,ppt,pptx") { | |
static doc := "57006f007200640044006f00630075006d0065006e0074" ; W.o.r.d.D.o.c.u.m.e.n.t | |
, docx := "00776F72642F" ; .word/ | |
, xls := "0057006f0072006b0062006f006f006b00" ; .W.o.r.k.b.o.o.k. | |
, xlsx := "0000786C2F" ; ..xl/ | |
, ppt := "0050006f0077006500720050006f0069006e007400200044006f00630075006d0065006e007400" ; .P.o.w.e.r.P.o.i.n.t. .D.o.c.u.m.e.n.t. | |
, pptx := "00007070742F" ; ..ppt/ | |
; ======================================= |
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
; v1.0.0 | |
; http://www.autohotkey.com/board/topic/105112-enum-explorer-receive-all-explorer-in-z-order/ | |
Enum_Explorer(hWnd=0, lParam=0) { | |
If hWnd | |
{ | |
WinGetClass, class, ahk_id %hwnd% | |
If class in CabinetWClass,ExploreWClass | |
{ | |
array := object(lParam) | |
If IsObject(array[hwnd]) |
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
Base64Encode(string) { | |
; js code from http://www.hcidata.info/base64.htm | |
static js_code := " | |
(LTrim | |
var base64s = ""ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/""; | |
function aToB64(rawData){ | |
var encOut = '' | |
var b64 = ''; | |
var i = 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
;------------------------------------------------------------------------------ | |
; Acc.ahk Standard Library | |
; by Sean | |
; Updated by jethrow: | |
; Modified ComObjEnwrap params from (9,pacc) --> (9,pacc,1) | |
; Changed ComObjUnwrap to ComObjValue in order to avoid AddRef (thanks fincs) | |
; Added Acc_GetRoleText & Acc_GetStateText | |
; Added additional functions - commented below | |
; Removed original Acc_Children function | |
; last updated 2/19/2012 |
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
; 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 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 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 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};") |
OlderNewer