Skip to content

Instantly share code, notes, and snippets.

View maestrith's full-sized avatar

Chad Wilson maestrith

View GitHub Profile
@maestrith
maestrith / SocketEventProc.ahk
Created February 26, 2014 23:49
Posted using AHK Studio
SocketEventProc(info*){
Critical
static count:=0
global id
static a:=[]
if info.1.1
return a
if (info.3=socket.__eventmsg){
if (info.2&0xFFFF=1){
onrecv(a[info.1])
@maestrith
maestrith / debug.ahk
Created February 27, 2014 19:25
Posted using AHK Studio
#SingleInstance,Force
checkfiles()
rxml:=new xml("recv")
v:=[]
global hwnd,v,rxml
gui()
load("small.ahk")
v.hwnd:=hwnd,v.msg:=[]
return
class Socket{
@maestrith
maestrith / AHK Studio.ahk
Created March 7, 2014 16:13
Posted using AHK Studio
#SingleInstance,Force
tick:=A_TickCount
settings:=new xml("settings","lib\settings.xml"),files:=new xml("files")
global v:=[],settings,files
imagelist()
gui()
return
GuiDropFiles:
open(A_GuiEvent)
return
@maestrith
maestrith / youtube.ahk
Created March 31, 2014 16:02
Posted using AHK Studio
#SingleInstance,Force
html:=ComObjCreate("htmlfile")
url:="https://www.youtube.com/watch?v=VZZ0PnDZdZk"
html.write(URLDownloadToVar(url))
title:=html.getElementsByName("title").item[0].getattribute("content")
title1:=title
title:=uriencode(title)
scripts:=html.getElementsBytagname("script") ;.length ;.innerhtml ;.getattribute("flashvars")
while,ss:=scripts.item[A_Index-1]{
if InStr(ss.innerhtml,"bitrate"){
@maestrith
maestrith / AHK Studio.ahk
Created April 2, 2014 23:30
Posted using AHK Studio
#SingleInstance,Off
;download complete
DetectHiddenWindows,On
OnMessage(0x4a,"WM_COPYDATA")
if (AID:=OtherInstance()){
File=%1%
Send_WM_COPYDATA(AID,File)
ExitApp
}
@maestrith
maestrith / Xbox Guild Wars 2.ahk
Created June 12, 2014 05:55
Posted using AHK Studio
#Persistent
#SingleInstance,Force
ctrl:=new xbox()
;ctrl.mouse({controller:0,stick:2,invert:-1,R:"RButton"}) ;L for right toggle.
ctrl.Mouse({controller:0,stick:2,invert:-1}) ;stick 1=left 2=right 3=both
buttons:=["A","B","X","Y","Back","Start","LeftShoulder","RightShoulder","LeftThumb","RightThumb","Up","Down","Left","Right"]
axis:={LThumbx:["A","D"],lthumby:["S","W"]}
Alt:={LTrigger:{Up:"R",X:3,Y:4,B:5,A:6},RTrigger:{Up:"R",X:7,Y:8,B:9,A:0}} ;Alternate keys when holding the main
dead:={LThumbX:70,LThumbY:70,LTrigger:50,RTrigger:50}
keys:={Y:"1",B:"2",X:"F",A:"Space",LeftShoulder:"RButton",RightShoulder:"LButton",Left:"Q",Right:"E",Start:"M",Back:"Escape",UP:["shift","RButton"],Down:"S",Left:"A",Right:"D",RightThumb:"Tab"}
@maestrith
maestrith / treeview.ahk
Created June 15, 2014 13:00
Posted using AHK Studio
#SingleInstance,Force
Gui,Add,TreeView,w200 h600 Checked AltSubmit gcheck
Loop,4
{
top:=TV_Add("Item " A_Index)
loop,4
child:=TV_Add("Item " A_Index,top,"Vis")
loop,4
grandchild:=TV_Add("Item " A_Index,child,"Vis")
loop,4
@maestrith
maestrith / AddGame.ahk
Created June 28, 2014 17:12
Posted using AHK Studio
addgame(){
addgame:
InputBox,profile,New Game,New Game Title?,,200,150,,,,,WASD
if ErrorLevel||profile=""
return
if settings.ssn("//Profile[@name='" profile "']")
Return m("Profile Already Exists")
default:=Default(),def:=default.ssn("//*"),main:=settings.ssn("//*")
main.appendchild(def),def.SetAttribute("name",profile)
LV_Add("Select Vis Focus",profile)
@maestrith
maestrith / Stuff.ahk
Created June 28, 2014 23:29
Posted using AHK Studio
#SingleInstance,Force
SplitPath,A_AhkPath,,dir
url:="mk:@MSITStore:" dir "\AutoHotkey.chm::/docs/Objects.htm#Usage_Associative_Arrays"
Gui,+Resize
Gui,Add,ActiveX,w800 h500 vstuff hwndhwnd,explorer
Gui,show
stuff.navigate(url)
return
GuiClose:
ExitApp
@maestrith
maestrith / Snippet.ahk
Created July 29, 2014 09:51
Posted using AHK Studio
Msgbox hello