Page 1 of 1
Open with arguments - is there some real example of use
Posted: 26 Sep 2015 12:08
by hogaty
Note about use: Open the selected List item(s) with command line arguments of your choice.
There is no real example of use Open with arguments. Could someone to supply example of use ?
Or is the command nowadays not used and is de facto replaced with command Open with ?
Hogaty
Re: Open with arguments - is there some real example of use
Posted: 26 Sep 2015 13:10
by armsys
Are you referring to Open Selected Item?
Re: Open with arguments - is there some real example of use
Posted: 26 Sep 2015 17:55
by hogaty
No. I am referring to Open with arguments...
Without assigned keyboard shortcut.
armsys wrote:Are you referring to Open Selected Item?
Re: Open with arguments - is there some real example of use
Posted: 26 Sep 2015 18:33
by admin
For example I select XYplorer.exe and do this:
Re: Open with arguments - is there some real example of use
Posted: 26 Sep 2015 20:22
by hogaty
I wanted to open one selected excel file (D:\test.xlsx) in read only mode like that:
"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" -r D:\test.xlsx
It really works in OS.
Extension xlsx is associated with C:\Program Files\Microsoft Office\Office12\EXCEL.EXE in OS.
I select D:\test.xlsx in list and do this:
File -> Open with arguments...
I entered "-r" into dialog Open with arguments.
But with quoting or without quoting passed argument is result the same: D:\test.xlsx is opened with excel only in normal no read only mode.
It seems that argument -r is not passed and added after excel executable before D:\test.xlsx .
But second kind of use is OK:
Then I select C:\Program Files\Microsoft Office\Office12\EXCEL.EXE in list and do this:
File -> Open with arguments...
I entered "-r D:\test.xlsx" into dialog Open with arguments. (without quotes)
D:\test.xlsx was opened with excel in read only mode.
admin wrote:For example I select XYplorer.exe and do this:
Re: Open with arguments - is there some real example of use
Posted: 27 Sep 2015 10:34
by admin
I checked it. The argument is correctly passed to Windows but Windows apparently ignores it when a non-executable file is to be opened.
So "Open with arguments" apparently only works as expected when an executable is focused.
I'm not happy with this function. It was added many years ago on user demand, but then it got totally forgotten. Nobody seemed to use it until you came. And now it does not even work well. Need to think...
ADD: OK, the next version has a change that might give you what you need...

Re: Open with arguments - is there some real example of use
Posted: 27 Sep 2015 11:24
by PeterH

that is: if selected is a non-executable file
- get associated program
- call it, with (selected file *and* given parms) as parms
At least I think this could be a valid solution?
Re: Open with arguments - is there some real example of use
Posted: 27 Sep 2015 12:45
by admin
PeterH wrote: 
that is: if selected is a non-executable file
- get associated program
- call it, with (selected file *and* given parms) as parms
At least I think this could be a valid solution?

Where did you get that information? I must have a leak somewhere...

Yes, exactly!
Re: Open with arguments - is there some real example of use
Posted: 27 Sep 2015 15:36
by hogaty
Thank you for a very quickly added functionality.
I can now to use Open with Arguments for described purpose.
Remark: Parameters are passed only in the case when is selected only one item.
admin wrote:I checked it. The argument is correctly passed to Windows but Windows apparently ignores it when a non-executable file is to be opened.
So "Open with arguments" apparently only works as expected when an executable is focused.
I'm not happy with this function. It was added many years ago on user demand, but then it got totally forgotten. Nobody seemed to use it until you came. And now it does not even work well. Need to think...
ADD: OK, the next version has a change that might give you what you need...
