I came up with a workaround based on sending keys to the command line. It works for me. For instance, to open %TEMP% in a new tab and show custom column set #6:
Code: Alles auswählen
[Button 4 Normal]
; cm_OpenNewTab
1_Command=3001
; cm_ClearCmdLine
2_Command=2004
; change dir to ...
3_SendInput={Right}cd %TEMP%{Enter}
; SrcCustomView6
4_Command=276
The modifications to the script are simple, starting at line 61:
Code: Alles auswählen
; ### --------------------------------------------------------------------------
; ### execute commands & files & AHK SendInput
Loop {
Current_Command := NewIniRead(Section,A_Index . "_Command")
Current_File := NewIniRead(Section,A_Index . "_File")
Current_SendInput := NewIniRead(Section,A_Index . "_SendInput")
if(Current_Command=="" && Current_File=="" && Current_SendInput=="") {
if(A_Index=="1") {
msgbox,16,No instructions for this button!,No entry in section "%Section%" of "Toolbar.ini".
; msgbox,16,Keine Anweisungen für den Knopf!,Kein Eintrag in Sektion "%Section%" der "Toolbar.ini".
}
break
}
if(Current_Command!="") {
SendMessage,1075,%Current_Command%,0,,ahk_class TTOTAL_CMD
}
if(Current_File!="") {
Current_Parameter := NewIniRead(Section,A_Index . "_Parameter")
Current_Path := NewIniRead(Section,A_Index . "_Path")
StringReplace,Current_Path,Current_Path,`%P,%Parameter_P%,All
StringReplace,Current_Parameter,Current_Parameter,`%P,%Parameter_P%,All
StringReplace,Current_Parameter,Current_Parameter,`%N,%Parameter_N%,All
StringReplace,Current_Parameter,Current_Parameter,`%S,%Parameter_S%,All
Run,"%Current_File%" %Current_Parameter%,%Current_Path%
}
if(Current_SendInput!="") {
SendInput %Current_SendInput%
}
}
ExitApp