Select a file with XYplorer

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
noembryo
Posts: 100
Joined: 13 Apr 2022 21:40

Select a file with XYplorer

Post by noembryo »

In an app of mine (Python 2.7) I have the option for someone to click to the path of the selected track and open the explorer having the actual audio file selected.
The command to do that is this: explorer /select,"path/to the/file.mp3" (I'm using Popen in Python)
I don't want to hard-code Explorer like this, and I do want to support XYplorer too, so:
Does anyone knows of a more generic way to do it, that supports more file managers?
If not, how should I go if I want to support XYplorer only?
Check my free programs here..

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Select a file with XYplorer

Post by highend »

Scan the registry for applications (e.g. HKCU\Software\Classes\Directory\Shell) or otherwise scan it for registered applications that are file manager and use the necessary arguments for each of them (in your app)
One of my scripts helped you out? Please donate via Paypal

noembryo
Posts: 100
Joined: 13 Apr 2022 21:40

Re: Select a file with XYplorer

Post by noembryo »

highend wrote: 12 May 2022 23:26 ... and use the necessary arguments for each of them (in your app)
Yes, but can you share the arguments that are needed for XYplorer (as was the original question)?
Check my free programs here..

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Select a file with XYplorer

Post by highend »

The help file contains it^^

Configuration - Command Line Switches
One of my scripts helped you out? Please donate via Paypal

noembryo
Posts: 100
Joined: 13 Apr 2022 21:40

Re: Select a file with XYplorer

Post by noembryo »

highend wrote: 12 May 2022 23:44 The help file contains it^^
As I already told you, I can't read the help because I can't make it dark (Win7) and I have an actual eye-condition that makes it really impossible to read in white background.
I'll try to convert some pages of it in html and then maybe...
Thanks for the help though.
Check my free programs here..

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Select a file with XYplorer

Post by highend »

%windir%\hh.exe has a switch to decompile a help file into pure text. Load that into an editor with a dark theme^^

/select="<path>"
One of my scripts helped you out? Please donate via Paypal

noembryo
Posts: 100
Joined: 13 Apr 2022 21:40

Re: Select a file with XYplorer

Post by noembryo »

highend wrote: 13 May 2022 00:03 %windir%\hh.exe has a switch to decompile a help file into pure text. Load that into an editor with a dark theme^^
Seems helpful, thanks.
What i just did is, right click the page of interest, select "View Source" and that opens the html of the page in my editor so I can save it. :idea:
Converted "Scripting" and "Scripting Commands Reference".
I can now read them fine!! :party:
/select="<path>"
Yes, I had found it, thank you..

EDIT: to add an even better way to convert the "XYplorer.chm" help file to html: Calibre!!
Just drop the file, select it, press C (or Convert) and select "htmlz" (a zip containing the html) as Output! :tup:
Check my free programs here..

Post Reply