OO verbessert und ahk hinzugefügt.

This commit is contained in:
2023-04-14 08:47:18 +02:00
parent cf8c655361
commit a7cd44016f
4 changed files with 69 additions and 10 deletions

View File

@@ -0,0 +1,34 @@
#Requires AutoHotkey v2.0
;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
;Ermittelt den aktuellen Pfad
GetPath(_hwnd)
{
for w in ComObject("Shell.Application").Windows
if (w.hwnd = _hwnd)
{
path := StrReplace(w.LocationURL, "file:///")
return StrReplace(path, "%20", " ")
}
}
;Schreibt die Datei
CreateFile(path)
{
file := path "/NewFile.txt"
if FileExist(file)
{
MsgBox "NewFile.txt bereits vorhanden"
return
}
FileAppend "", file
}

View File

@@ -41,7 +41,7 @@ P016 -
A001 +
A002 +
A003 +
A004 +
A004 -
A006 -
A005 +
P007 +