Skip to content

Instantly share code, notes, and snippets.

@brigand
brigand / AutoHotkeyTest.java
Created December 28, 2011 06:26
Using AutoHotkey in a Java program
// 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 February 24, 2012 20:08
textbox script
#!/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 March 6, 2012 20:21
Learn Internet Explorer COM by checking your balance on an imaginary bank account.
#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 April 10, 2012 01:59
Inline Code Style
/* 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 April 17, 2012 19:55
a script that allows allows you to write AutoHotkey code quicker
; 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.
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 August 4, 2012 03:32
Find YouTube channels that are available, example for AutoHotkey ActiveX controls
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 August 15, 2012 20:28
Template for experimentation with AHK GUI positioning.
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 October 23, 2012 20:28
Helper Library for GDIp library Based On Tic's tutorial #1
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
}
; Made in http://youtu.be/OPc9kE5Wpec
#Include <GDIp>
#Include <GDIpHelper>
SetUpGDIP()
^h::
StartDrawGDIP()
ClearDrawGDIP()