Hello to all,
it would be helpful, if the cm_ChangeDir could change the path of the active file view and the not active file view.
My suggestion is to put the path of the not active view in the “execution in” field and
change the path of the not active File view if the “execution in” is not empty.
In the example I modify the DC source and create a new command. In the example I split the folders by using the pipe (“|”) character.
Code:
procedure TActs.cm_ChangeMyDir(param: string='');
var
sTempString1,sTempString2: String;
iPosOfPipe: integer;
begin
iPosOfPipe := Pos('|',param);
if(iPosOfPipe=0) then begin
FrmMain.ActiveFrame.CurrentPath := ReplaceEnvVars(param);
end
else begin
sTempString1:=Copy(param, 1, iPosOfPipe-1);
sTempString2:=Copy(param, iPosOfPipe+1, Length(param));
FrmMain.ActiveFrame.CurrentPath := ReplaceEnvVars(sTempString1);
FrmMain.NotActiveFrame.CurrentPath := ReplaceEnvVars(sTempString2);
end;
end;