Skip to content

Instantly share code, notes, and snippets.

View hoppfrosch's full-sized avatar

hoppfrosch hoppfrosch

  • Hesse, Germany
View GitHub Profile
@hoppfrosch
hoppfrosch / UpdateGermanAHKHelp.ahk
Created March 1, 2017 06:41
Update local german helpfile for AutoHotkey - *Author*: SAPlayer, Ragnar_F - http://ahkscript.org/boards/viewtopic.php?f=10&t=34
# 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 October 29, 2021 06:25
Recipe for Singleton class wit AutoHotkey
;~ 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 November 20, 2018 12:33
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…
; 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 September 25, 2015 05:07
ListGlobalVars() - list of all variables
; 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 September 25, 2015 05:30
Args.ahk - Returns command line parameters as array
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 October 21, 2022 03:36 — forked from budRich/GoToTilla.ahk
GoToTilla - jump to tokens within AHK sourcecode #ahk #script
/*
#####################
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 August 29, 2015 14:13 — forked from textarcana/git-log2json.sh
git-log2json #git #script
#!/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 January 23, 2024 05:15
Auto Clicker - auto-clicks when the left mouse button is held down. . #ahk #script #snippet
# 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 April 24, 2014 05:31
ListView: Icons in more than first column example #ahk #function
; 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 March 25, 2014 11:28
CornerNotify #ahk #function
;---------------------------------------------------------------
; 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