Page 1 of 1

Need help - user button to run program

Posted: 18 Mar 2012 02:05
by jacksonmacd
Following (similar) directions from another post in this forum, I created a User button, and assigned this to its Run property:
run ("C:\Program Files\FreeFileSync\FreeFileSync.exe")

It displays an error when I click the button. "System cannot find the file specified." Yet when I paste the same thing into the Win7(64) Run box (of course, without the Run and parens), it runs properly. What do I need to change to get XY to run it?

Second question:
the FreeFileSync program accepts two folder names as commandline parameters. I would like to launch the program with the foldername of the Left and Right Panes respectively. Are those names available as variables to embed in the Run command?

Getting this to run would enable a capability that I was used to in PowerDesk before I discovered XY.

Thanks in advance.

Jack

Re: Need help - user button to run program

Posted: 18 Mar 2012 02:12
by highend

Code: Select all

    $path = tab("get", "path");
    run """C:\Program Files\FreeFileSync\FreeFileSync.exe"" ""$path""";
Uses the path of the current focused tab.

Re: Need help - user button to run program

Posted: 18 Mar 2012 02:32
by jacksonmacd
Thanks for the fast reply. That launches the program with one of the folders.
Is there a similar command for the path on the unfocused pane?

Re: Need help - user button to run program

Posted: 18 Mar 2012 03:03
by highend
active pane:

Code: Select all

 get("path", a);  //active pane's path
inactive pane:

Code: Select all

 get("path", i);  //inactive pane's path

Re: Need help - user button to run program

Posted: 18 Mar 2012 03:19
by jacksonmacd
Thanks very much!!

$path = tab("get", "path");
$pathi = get("path", i);
run """C:\Program Files\FreeFileSync\FreeFileSync.exe"" ""$path"" ""$pathi""";


Jack