Files
winconfig/configs/autohotkey/NewTxt.ahk
2023-04-21 07:17:37 +02:00

26 lines
484 B
AutoHotkey

#Requires AutoHotkey v2.0
#Include Lib.ahk
#NoTrayIcon
;Mit Strg, Shift + M wird ein leeres Textfile erzeugt.
#HotIf ("ahk_class CabinetWClass")
^+m::
{
WinID := WinGetID("ahk_class CabinetWClass")
CurrentPath := GetPath(WinID)
CreateFile(CurrentPath)
return
}
#HotIf
;Schreibt die Datei
CreateFile(path)
{
file := path "/NewFile.txt"
if FileExist(file)
{
MsgBox "NewFile.txt bereits vorhanden"
return
}
FileAppend "", file
}