Skip to content

Instantly share code, notes, and snippets.

Avatar

hoppfrosch hoppfrosch

  • Hesse, Germany
View GitHub Profile
@hoppfrosch
hoppfrosch / UpdateGermanAHKHelp.ahk
Created Mar 1, 2017
Update local german helpfile for AutoHotkey - *Author*: SAPlayer, Ragnar_F - http://ahkscript.org/boards/viewtopic.php?f=10&t=34
View UpdateGermanAHKHelp.ahk
# Script to update local german help for AutoHotKey
# Authors: SAPlayer, Ragnar_F - see http://ahkscript.org/boards/viewtopic.php?f=10&t=34
#
#SingleInstance ignore
#NoEnv
TmpDir := A_Temp
if(!A_IsAdmin){
Run *RunAs "%A_ScriptFullPath%",, UseErrorLevel
@hoppfrosch
hoppfrosch / Singleton.ahk
Last active Nov 25, 2016
Recipe for Singleton class wit AutoHotkey
View Singleton.ahk
;~ This is a singleton class - taken from: http://www.programering.com/a/MDN4YDMwATU.html
class Singleton
{
;~ Single cases registered property
static _myInstance := 0
;~ Instantiation counts
static _instanceCount := 0
;~ test property
@hoppfrosch
hoppfrosch / WinGetPosEx - Example.ahk
Last active Nov 20, 2018
With the introduction of the Desktop Window Manager (DWM) and Aero themes in Windows Vista, the size and position of windows has never been the same. The OS says that the window is one size but when displayed, the window can be another (usually larger) size. The WinGetPosEx function is an attempt to help the developer to identify the correct pos…
View WinGetPosEx - Example.ahk
; Credits: jballi - https://autohotkey.com/boards/viewtopic.php?f=6&t=3392
#NoEnv
#SingleInstance Force
;;;;;ListLines Off
;-- Initialize
Caption :=True
ToolWindow :=False
Resize :=False
Theme :=True
@hoppfrosch
hoppfrosch / ListGlobalVars.ahk
Created Sep 25, 2015
ListGlobalVars() - list of all variables
View ListGlobalVars.ahk
; Written by Lexikos - see: http://www.autohotkey.com/board/topic/20925-listvars/#entry156570
Loop {
tick := A_TickCount
ToolTip % ListGlobalVars()
}
ListGlobalVars()
{
static hwndEdit, pSFW, pSW, bkpSFW, bkpSW
@hoppfrosch
hoppfrosch / Args.ahk
Last active Sep 25, 2015
Args.ahk - Returns command line parameters as array
View Args.ahk
Args( CmdLine := "", Skip := 0 ) { ; By SKAN, http://goo.gl/JfMNpN, CD:23/Aug/2014 | MD:24/Aug/2014
Local pArgs := 0, nArgs := 0, A := []
pArgs := DllCall( "Shell32\CommandLineToArgvW", "WStr",CmdLine, "PtrP",nArgs, "Ptr" )
Loop % ( nArgs )
If ( A_Index > Skip )
A[ A_Index - Skip ] := StrGet( NumGet( ( A_Index - 1 ) * A_PtrSize + pArgs ), "UTF-16" )
Return A, A[0] := nArgs - Skip, DllCall( "LocalFree", "Ptr",pArgs )
@hoppfrosch
hoppfrosch / GoToTilla.ahk
Last active Sep 18, 2018 — forked from budRich/GoToTilla.ahk
GoToTilla - jump to tokens within AHK sourcecode #ahk #script
View GoToTilla.ahk
/*
#####################
GoToTilla v0.22 by hoppfrosch - Added parsing of properties (AHK > 1.1.16.*)
http://www.autohotkey.com/board/topic/95536-gototilla-a-combination-of-goto-and-tillagoto/
GoToTilla v0.21 by budRich
http://www.autohotkey.com/board/topic/95536-gototilla-a-combination-of-goto-and-tillagoto/
A combination of: GoTo by Avi Aryan
http://www.autohotkey.com/board/topic/95009-goto-hotkeys-hotstrings-functions-and-labels-in-any-editor/
and TillaGoto by TheGood
http://www.autohotkey.com/forum/viewtopic.php?t=41575
@hoppfrosch
hoppfrosch / git-log2json.sh
Last active Aug 29, 2015 — forked from textarcana/git-log2json.sh
git-log2json #git #script
View git-log2json.sh
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
@hoppfrosch
hoppfrosch / NewAutoClicker.ahk
Last active Feb 26, 2021
Auto Clicker - auto-clicks when the left mouse button is held down. . #ahk #script #snippet
View NewAutoClicker.ahk
# Source http://slanter-ahk.blogspot.de/2009/02/ahk-new-auto-clicker.html
# This is a new 5-line autoclicker made possible with the release of AHK 1.0.48. Use Insert to toggle it on and off.
LButton::
While GetKeyState("LButton","P")
Send {LButton}
Return
Insert::Hotkey, LButton, Toggle
@hoppfrosch
hoppfrosch / LV_SetSI.ahk
Created Apr 24, 2014
ListView: Icons in more than first column example #ahk #function
View LV_SetSI.ahk
; Set Icon for row "subItem" within Listview
;
; Author: Tseug (http://www.autohotkey.com/board/topic/72072-listview-icons-in-more-than-first-column-example/)
;
LV_SetSI(hList, iItem, iSubItem, iImage){
VarSetCapacity(LVITEM, 60, 0)
LVM_SETITEM := 0x1006 , mask := 2 ; LVIF_IMAGE := 0x2
iItem-- , iSubItem-- , iImage-- ; Note first column (iSubItem) is #ZERO, hence adjustment
NumPut(mask, LVITEM, 0, "UInt")
NumPut(iItem, LVITEM, 4, "Int")
@hoppfrosch
hoppfrosch / CornerNotify.ahk
Created Mar 25, 2014
CornerNotify #ahk #function
View CornerNotify.ahk
;---------------------------------------------------------------
; CornerNotify.ahk
; http://www.autohotkey.com/board/topic/94458-msgbox-replacement-monolog-non-modal-transparent-message-box-cornernotify/
;---------------------------------------------------------------
; CHANGELOG
;v1.12 2014-05-04 CHANGED BY LAGOMORPH
;Added additional "p" parameter for secs to make the popup persist until destroyed via CornerNotify_Destroy()
;Changed GUI name to CornerNotify instead of default GUI to avoid conflicts with other GUIs