Embedding command line parameters

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
RalphM
Posts: 2089
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Embedding command line parameters

Post by RalphM »

I tried before to put some info in the title bar to identify different instances of XY (i.e. the local installed one on C:\ and a portable one on a removable drive)

So, yes, the titlebar being fully XY-var aware would be a nice addition for me.
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

admin
Site Admin
Posts: 66350
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Embedding command line parameters

Post by admin »

RalphM wrote:I tried before to put some info in the title bar to identify different instances of XY (i.e. the local installed one on C:\ and a portable one on a removable drive)

So, yes, the titlebar being fully XY-var aware would be a nice addition for me.
You could simply write "portable" into the titlebartemplate of your portable one.

RalphM
Posts: 2089
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Embedding command line parameters

Post by RalphM »

Not if both instances use a copy of the same ini.
If I used different ini's, I could name them appropriately, which would solve that problem as well, but I rather just create a copy of the whole XY installation on the removable drive...
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

admin
Site Admin
Posts: 66350
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Embedding command line parameters

Post by admin »

RalphM wrote:Not if both instances use a copy of the same ini.
If I used different ini's, I could name them appropriately, which would solve that problem as well, but I rather just create a copy of the whole XY installation on the removable drive...
I see. OK, I add the whole bunch of XY vars then. The whole thing is a non-documented tweak anyway...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Embedding command line parameters

Post by TheQwerty »

Kind of disappointing that you only made the command go one way....
I think there's much more use for an absolute to relative command in scripting, especially if you're trying to write scripts for the community that require some configuration.

admin
Site Admin
Posts: 66350
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Embedding command line parameters

Post by admin »

TheQwerty wrote:Kind of disappointing that you only made the command go one way....
I think there's much more use for an absolute to relative command in scripting, especially if you're trying to write scripts for the community that require some configuration.
I don't even have code for this in XY. :) Never ever used absolute to relative. Do you have an example?

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Embedding command line parameters

Post by TheQwerty »

admin wrote:
TheQwerty wrote:Kind of disappointing that you only made the command go one way....
I think there's much more use for an absolute to relative command in scripting, especially if you're trying to write scripts for the community that require some configuration.
I don't even have code for this in XY. :) Never ever used absolute to relative. Do you have an example?
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

The best use case for it is any of these scripts that require user configuration and ask for the path to an executable or location. They can then more easily use InputFolder/File to prompt the user for the path and this function to convert that path into a relative one that would work correctly when using XY portably.

Otherwise, it requires more complicated scripting to convert the path ourselves or an additional edit field to allow the user to make it a relative path themselves.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Embedding command line parameters

Post by jacky »

TheQwerty wrote:The best use case for it is any of these scripts that require user configuration and ask for the path to an executable or location. They can then more easily use InputFolder/File to prompt the user for the path and this function to convert that path into a relative one that would work correctly when using XY portably.

Otherwise, it requires more complicated scripting to convert the path ourselves or an additional edit field to allow the user to make it a relative path themselves.
Right(, that's why I have something like that in my common-jacky, both ways. [/shameful_plug]) Useful indeed for scrips to save paths relative and keep portability working.
Proud XYplorer Fanatic

Post Reply