Skip to content

Instantly share code, notes, and snippets.

View maestrith's full-sized avatar

Chad Wilson maestrith

View GitHub Profile
0.200.0.4
Added:
-Version checker with auto download prompt
0.200.0.3
Working:
-Load, Save, Export
Not working:
-Import
0.200.0.2
Fixed:
#include SCI.ahk
#singleinstance force
commands =
(
autotrim blockinput clipwait control controlclick controlfocus controlget controlgetfocus
controlgetpos controlgettext controlmove controlsend controlsendraw controlsettext coordmode
critical detecthiddentext detecthiddenwindows drive driveget drivespacefree edit endrepeat envadd
envdiv envget envmult envset envsub envupdate fileappend filecopy filecopydir filecreatedir
filecreateshortcut filedelete filegetattrib filegetshortcut filegetsize filegettime filegetversion
fileinstall filemove filemovedir fileread filereadline filerecycle filerecycleempty fileremovedir
global unused:=0, null:=""
; Title: Scintilla Wrapper for AHK
class scintilla {
static hwnd := ""
__new(param*){
this.hwnd := Add(param*)
}
__call(func, ByRef wParam=0, ByRef lParam=0, param*){
@maestrith
maestrith / gist:3765936
Created September 22, 2012 11:54
AHK XML Parser
#SingleInstance, Force
gui:=new xml("gui","Wierd","acid.xml")
another:=new xml("another")
gui.add("Just_A_Path")
gui.add("Path","","With text")
gui.add("unique",{value:3},"",1)
gui.add("unique",{value:3},"",1)
gui.add("unique",{value:4},"",1,{value:3})
for a,b in {gui:gui,another:another}{
b.add("foo",{this:1})
@maestrith
maestrith / gist:3773023
Created September 23, 2012 20:57
My Wrapper.
#SingleInstance, Force
class sci{
__New(hwnd,x=0,y=0,w=500,h=500){
Static ScintillaIndex:=0
if !DllCall("GetModuleHandle","str","SciLexer.dll")
this.hwnd:=DllCall("LoadLibrary","str","SciLexer.dll")
this.hwnd:=DllCall("CreateWindowEx" ,"int",0x200 ,"str","Scintilla"
,"str","Scintilla" . ++ScintillaIndex ,"int", 0x52310000
@maestrith
maestrith / gist:5601781
Last active December 17, 2015 11:19
Nearly complete.
#SingleInstance,Force
CoordMode,ToolTip,Screen
type:=new xml("types"),OnMessage(0x03,"move")
wmp:=ComObjCreate("WMPLayer.OCX")
ComObjError(0)
global type,wmp,varlist:=[],templist
if type.ssn("//version").text!=2
type.add("version","",2),Compile()
Gui,2:Add,Edit,w800 h400 hwnddebug -Wrap
Gui,2:Show,x0 y0,Debug
@maestrith
maestrith / Imgur_Upload.ahk
Last active December 19, 2015 10:59
Upload an image to Imgur: Instructions Below:
#SingleInstance,force
Menu,Tray,Add
Menu,Tray,Add,Grab,grab
return
grab:
Hotkey,LButton,select,On
Hotkey,RButton,Select,On
Hotkey,^F1,getinfo,On
return
getinfo:
@maestrith
maestrith / github.ahk
Created July 19, 2013 14:36
my description
url:="https://api.github.com/gists"
info:="Code to post goes here" ;Change this to create the new text for the Gist
access_token:="" ;Your Github access token goes here if you want to publish it to your Gist list
filename:="mygit.txt" ;change this to whatever you want your file name to be
desc:="my description" ;This is where you would have a description for your Gist
info:=RegExReplace(info,"([" Chr(34) "\\])","\$1")
StringReplace,info,info,`r,,All
StringReplace,info,info,`n,\n,All
StringReplace,info,info,`t,\t,All
http:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
@maestrith
maestrith / AHK Studio.ahk
Created July 19, 2013 15:32
Posted using AHK Studio
#SingleInstance,Force
v:=[],OnMessage(0x4E,"notify"),OnMessage(0x5,"arrange"),vversion:=new xml("version","lib\version.xml")
startup(),filecheck(),v.lastlist:=[],misc:=new xml("misc")
settings:=new xml("settings","lib\settings.xml"),keywords(),files:=new xml("files"),positions:=new xml("positions","lib\positions.xml"),access_token:=settings.ssn("//@access_token").text
idea:=new xml("idea","lib\ideas.xml")
global v,sci,settings,commands,files,positions,vversion,access_token,misc,idea
menu(),defaults(),gui(),hotkeys(),titlechange()
ControlFocus,Scintilla1,% aid()
if settings.ssn("//ideas").text{
ideas()
@maestrith
maestrith / gist.ahk
Created July 19, 2013 16:38
Posted using AHK Studio
info:="Code to post goes here" ;Change this to create the new text for the Gist
access_token:="" ;Your Github access token goes here if you want to publish it to your Gist list
filename:="mygit.txt" ;change this to whatever you want your file name to be
desc:="my description" ;This is where you would have a description for your Gist
post_gist(info,access_token,filename,desc)
return
post_gist(info,access_token,filename,desc){
info:=RegExReplace(info,"([" Chr(34) "\\])","\$1")
for a,b in {"`n":"\n","`t":"\t","`r":""}
StringReplace,info,info,%a%,%b%,All