Die Nummerierung hängt sowohl vom TC als auch vom AHK ab, man muss halt verschiedene ausprobieren.

Roman
Moderators: Hacker, Stefan2, white
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
; Default shortcut is Win-A
$#a::
ControlGetText, PathInTC, TMyPanel3, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
; Default shortcut is Win-A
$#a::
ControlGetText, PathInTC, Window7, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
; Default shortcut is Win-A
$#a::
ControlGetText, PathInTC, Window8, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
{
SendMessage 1074, 1000, 0, , ahk_class TTOTAL_CMD
MsgBox Answer from TC, active panel (1=left, 2=right) : %ErrorLevel%
return
}
; WM_USER+50 = 1074
; Default shortcut is Win-A
$#a::
ControlGetText, PathInTC, Window8, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
$#a::
ControlGetText, PathInTC, Window8, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
{
SendMessage 1074, 1000, 0, , ahk_class TTOTAL_CMD
MsgBox Answer from TC, active panel (1=left, 2=right) : %ErrorLevel%
return
}
; WM_USER+50 = 1074
; Default shortcut is Win-A
Danke für den neuen Code (siehe untenstehend)!ghisler(Author) wrote:... Sorry, hatte noch nicht die Zeit das zu testen...
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
$#a::
ControlGetText, PathInTC, Window8, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
Return
{
SendMessage 1074, 21, 0, , ahk_class TTOTAL_CMD
ControlGetText, PathInTC, %ErrorLevel%, ahk_class TTOTAL_CMD
StringReplace, PathInTC, PathInTC, >, \
SendInput, {Raw}%PathInTC%
return
}
; WM_USER+50 = 1074
; Default shortcut is Win-A
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
; Default shortcut is Win-A
$#a::
WinGetText, TCWindowText, ahk_class TTOTAL_CMD
RegExMatch(TCWindowText, "(?<=\n).*(?=>)", PathInTC)
Send, {Raw}%PathInTC%\
Return
Vor welchem Dateinamen?im Moment wird vor dem Dateinamen nur ein "\" Backslash ergänzt
Code: Select all
#IfWinExist, ahk_class TTOTAL_CMD
; Default shortcut is Win-A
$#a::
WinGetText, TCWindowText, ahk_class TTOTAL_CMD
; RegExMatch(TCWindowText, "\n(.*)>", PathInTC)
RegExMatch(TCWindowText, "(?<=\n).*?(?=>)", PathInTC)
Send, {Raw}%PathInTC%\
Return