Skip to content

Instantly share code, notes, and snippets.

@brigand
brigand / AutoHotkeyTest.java
Created Dec 28, 2011
Using AutoHotkey in a Java program
View AutoHotkeyTest.java
// All depends can be found here: http://apps.aboutscript.com/jhk/JHK.zip
// Video: http://youtu.be/EX0iT0NTTjw
import com.eaio.nativecall.*;
public class AutoHotkeyTest {
private static IntCall exec;
public static void main(String[] args) {
System.out.println("Hello World");
@brigand
brigand / textbox.py
Created Feb 24, 2012
textbox script
View textbox.py
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import sys, os
class TextBox(object):
def delete_event(self, widget, event, data=None):
tb = self.textbuff
@brigand
brigand / AutoBank_Checker.ahk
Created Mar 6, 2012
Learn Internet Explorer COM by checking your balance on an imaginary bank account.
View AutoBank_Checker.ahk
#SingleInstance Force
#Include %A_ScriptDir%\IEFuncs.ahk
pwb := IE("http://aboutscript.com/apps/autobank")
Wait(pwb)
pwb.document.form[0].value := "johny"
pwb.document.form[1].value := "johny123"
pwb.document.form.submit()
Wait(pwb)
@brigand
brigand / inlineCode.css
Created Apr 10, 2012
Inline Code Style
View inlineCode.css
/* Live Demo:
http://jsbin.com/ebuhuz/2/edit#javascript,html,live */
.inlineCode {
background: #FAFAFA;
font-family: Consolas, Monospace;
border-top: 1px #EEE solid; border-bottom: 1px #EEE solid;
font-size: .8em;
padding: .2em 0;
}
@brigand
brigand / AutoExpander.ahk
Created Apr 17, 2012
a script that allows allows you to write AutoHotkey code quicker
View AutoExpander.ahk
; AutoExpander.ahk
/*
Copyright (c) 2012, Frankie Bagnardi
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
View Quizer.ahk
QuizFilePath = %1%
FileRead, Data, %QuizFilePath%
Quiz(Data)
Quiz(Data) {
StringSplit, Data, Data, `n, `r
MsgBox, 4, Quiz, %Data1%
IfMsgBox Yes
{
If Data2 = yes
@brigand
brigand / FindFreeChannels.ahk
Created Aug 4, 2012
Find YouTube channels that are available, example for AutoHotkey ActiveX controls
View FindFreeChannels.ahk
Gui Add, Edit, w600 r1 vURL, aboutscript
Gui Add, Button, x+6 yp w44 Default, Go
Gui Add, ActiveX, xm w600 h540 vWB, Shell.Explorer
ComObjConnect(WB, WB_events) ; Connect WB's events to the WB_events class object.
Gui, Add, Edit, ys vOutput w200 h540
Gui Show
; Continue on to load the initial page:
ButtonGo:
Gui Submit, NoHide
@brigand
brigand / GuiPositioning.ahk
Created Aug 15, 2012
Template for experimentation with AHK GUI positioning.
View GuiPositioning.ahk
i := 1
Gui, Font, s20
Gui, Add, Button, w150 h40 gNull, % "Button" i++
Gui, Add, Button, w150 h40 gNull, % "Button" i++
Gui, Add, Button, w150 h40 gNull, % "Button" i++
Gui, Add, Button, w150 h40 gNull, % "Button" i++
Gui, Show
return
@brigand
brigand / GDIpHelper.ahk
Created Oct 23, 2012
Helper Library for GDIp library Based On Tic's tutorial #1
View GDIpHelper.ahk
JustTheBasics() {
global
; Start gdi+
If !pToken := Gdip_Startup()
{
MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
ExitApp
}
View GDI1.ahk
; Made in http://youtu.be/OPc9kE5Wpec
#Include <GDIp>
#Include <GDIpHelper>
SetUpGDIP()
^h::
StartDrawGDIP()
ClearDrawGDIP()