Skip to content

Instantly share code, notes, and snippets.

@0x4a
0x4a / totalcmd_backup.ahk
Last active December 19, 2015 09:19
Backup Total Commander Settings - requires Array.ahk and 7-zip - #ahk #backup #totalcmd
#NoEnv
#SingleInstance, Force
; http://www.autohotkey.com/board/topic/45876-ahk-l-arrays/
; not needed when placed in library folder
#Include <Array>
SetWorkingDir %A_ScriptDir%
; files to backup
@0x4a
0x4a / truecrypt-mnt-dropbox.ahk
Created July 5, 2013 06:05
run "script.ahk [dis]mount" to mount a predefined truecrypt container #tool #ahk #truecrypt
if 1 = mount
Run "%ProgramFiles%\Truecrypt\truecrypt.exe" /q /l y /v "%A_MyDocuments%\Dropbox\safe.tc"
else if 1 = dismount
Run "%ProgramFiles%\Truecrypt\truecrypt.exe" /q /dismount y
else
Msgbox,,Usage:,
(
%A_ScriptName% <option>
options are "mount" and "dismount"
)
@0x4a
0x4a / ahk-plugin-totalcmd.ahk
Last active March 29, 2022 19:10
use total commander script content plugin with autohotkey scriptsplace files in directory of installed script.wdx, add columns with "[=script.Result]" which will show line number of files - counted by ahk script #totalcmd #ahk
; requires WinScript Advanced Content Plugin for Total Commander: http://totalcmd.net/plugring/WinScriptAdv.html
#NoEnv
#NoTrayIcon
FileEncoding UTF-8
SetBatchLines,-1
file = %filename%
; find file
@0x4a
0x4a / ArduCmd.ahk
Created July 5, 2013 06:46
control the arduino ide from inside your favorite editor/ide - provides commands to: start ide, open, compile and upload a file, start serial monitor #arduino #dev #ahk
; ArduCmd v0.2
; by Daniel Jackel, dev@0x4a.net
; todo:
; file not found error
; return stdout.txt
; %0% contains number of arguments!
; http://www.autohotkey.com/community/viewtopic.php?t=53996
; http://www.autohotkey.com/community/viewtopic.php?t=46226
@0x4a
0x4a / startup.ahk
Last active December 19, 2015 09:19
delay start of #dropbox, autohotkey and keepass until #truecrypt volume X:\ is mounted - compile this script and put in autostart, change paths accordingly #ahk #tool #system
; truecrypt / dropbox delayed startup script
#Persistent
#include y:\0x4a\Code\AHK\lib\notify.ahk
#include y:\0x4a\Code\AHK\lib\Array.ahk
SetTimer, checkDrive, 5000
return
checkDrive:
DriveGet, status, Status, y:\
if (status = "Ready")
@0x4a
0x4a / empty_recycle_bin.ahk
Last active December 19, 2015 09:19
empty windows recycle bin #ahk #tool #system
Msgbox,52,Bitte bestätigen,Soll der Papierkorb wirklich geleert werden?
Ifmsgbox No
ExitApp
Else
FileRecycleEmpty
If %ErrorLevel%
Msgbox,,,something went wrong
ExitApp
@0x4a
0x4a / sort-downloads.ahk
Last active December 19, 2015 09:19
sort downloaded files according to file extension #tool #ahk
; Dateien nach Erweiterung sortieren
#SingleInstance
#NoEnv
;#Include X:\Eigene Dateien\Code\AHK\lib\Array.ahk
SetWorkingDir %A_ScriptDir%
; really sort?
Msgbox,68,Bitte bestätigen,Soll %A_WorkingDir% wirklich sortiert werden?
Ifmsgbox No
@0x4a
0x4a / nachtruhe.ahk
Last active December 19, 2015 09:19
lowers the volume at a certain #time - add compiled script to windows task planner to go silent when your neighbors want to sleep #tool #ahk
; Lautstärke runterregeln
#SingleInstance
#NoEnv
SetWorkingDir %A_ScriptDir%
SoundGet, current
SoundSet, 10
Msgbox,1,,Zimmerlautstärke aktiviert!
Ifmsgbox Cancel
@0x4a
0x4a / fortune.ahk
Created July 5, 2013 06:56
displays a random line from fortune.txt #tool #ahk
FileEncoding UTF-8
Loop,read,fortune.txt
numbers:=A_INDEX
random,rnd,1,%numbers%
FileReadLine,line,fortune.txt,%rnd%
MsgBox your fortune: `n%line%
@0x4a
0x4a / howlong.ahk
Created July 5, 2013 16:52
measures the #time between "howlong.ahk start" and "howlong.ahk stop" #tool #ahk
#SingleInstance, force
#NoEnv
SetWorkingDir %A_ScriptDir%
FileEncoding UTF-8
; measure time
StartTime := A_TickCount
StringLength := StrLen(StartTime) * (A_IsUnicode ? 2 : 1)
TmpFile := A_ScriptDir "\" SubStr( A_ScriptName, 1, -3 ) . "tmp"
WaitClose := 1