Opening a New Tab in XY from Rainmeter.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Opening a New Tab in XY from Rainmeter.

Post by sl23 »

Basically I want to include a link to the root of each drive in a Rainmeter skin.

I've looked in the XY help file and found command line switches, which work as standalone shortcut.lnk files, but refuse to work in a Rainmeter skin. I suspect that the issue is with Rainmeter, but no one there has been able to solve the issue.

Can I get some assurance that I'm using the correct syntax please.

The shortcut I am trying to use is:

Code: Select all

D:\Path\to\XYplorerPro\XYplorer.exe XYplorer.exe /path=D:\
Is there a reason this won't work in Rainmeter or is it that the Rainmeter syntax is just incorrect?

Thank you.
Last edited by sl23 on 10 Nov 2021 23:47, edited 1 time in total.

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

Re: Opening a New Tab in XY from Rainmeter.

Post by highend »

Does that look like a valid path to XYplorer.exe to you? oO

Type it into a command prompt and test it^^
One of my scripts helped you out? Please donate via Paypal

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

lol nope, it's just an example path :biggrin:

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Opening a New Tab in XY from Rainmeter.

Post by autocart »

I think what highend is saying is that the command line you pasted cannot work if it has XYplorer.exe twice in there.
Try just D:\Path\to\XYplorerPro\XYplorer.exe /path=D:\.

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

Ok, I'll give that a try, thank you :tup:
But then why does the Shortcut.lnk file work :?:

EDIT: that didn't work, but thank you for trying to help.

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Opening a New Tab in XY from Rainmeter.

Post by autocart »

True, I don't know, even from command line the wrong syntax works.
I also admit that the help file is a bit confusing there. Still, the correct syntax is with only one XYplorer.exe.
Let us know if it works with the correct syntax.

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Opening a New Tab in XY from Rainmeter.

Post by autocart »

How do you include the path in the Rainmeter skin?
I have Rainmeter installed but can't figure it out.

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

I finally got it working without the extra XYplorer.exe! I did wonder if that was required or not, but I've tried so many variations that I couldn't understand why it worked in the .lnk file, so assumed it was necessary! :oops:

Thanks for your help, very much appreciated. :tup:

Btw, in case anyone else wants this, the correct syntax is:

Code: Select all

Path to XYplorer...
XY=#PROGRAMPATH#..\..\MyApps\XYplorerPro\XYplorer.exe

LeftMouseUpAction=[#XY# /path=D:\]
I just noticed I had this commented out in the Rainmeter skin:

Code: Select all

;LeftMouseUpAction=["#XY#" "#Disk1#:\"]
That explains why I thought the extra 'XYplorer.exe' was needed, as this didn't work. But it's the quotes causing the problem, I have no idea why that is though.

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Opening a New Tab in XY from Rainmeter.

Post by autocart »

Ok, got it.
I added some quotes like this, to be on the safe side:
LeftMouseUpAction=["#xy#" /path=D:\]
Works fine too.
Of course the XY path's variable definition must be under the [Variables] section of the corresponding ini file of the Rainmeter skin component, as you know. Otherwise it would not work. Just saying that, in case someone else wants to try it. Download of Rainmeter: https://www.rainmeter.net/

WirlyWirly
Posts: 195
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

Re: Opening a New Tab in XY from Rainmeter.

Post by WirlyWirly »

Looks like you got a solution, but just thought I'd chime in with a couple examples and good-to-knows for future readers. I've been using a custom Rainmeter launcher alongside xyPlorer for over a year now and have had no issues: SkyBar: A Hotkey Launcher

My Rainmeter folder and xyPlorer folder are both in the same directory and follow this folder hierarchy: A:/PortableApps/PortableApps/[Application Folder]/[Application].exe

You can use absolute paths, relative paths, system variables, xyPlorer variables, as well as Rainmeters built in variables in your .ini file: Built-in Rainmeter Variables

Since I run xyPlorer and Rainmeter as portable, I prefer using relative paths and variables so that my code works across computers.

Example 1: Open the current User's download folder
#PROGRAMPATH# is a built-in Rainmeter variable that points to the folder that contains "Rainmeter.exe", so I then use .. to go up a folder and then into the xyPlorer folder. %userreal% is an xyPlorer variable

Code: Select all

LeftMouseUpAction = ["#PROGRAMPATH#..\XYplorer\XYplorer.exe" "%userreal%\Downloads"]
Example 2: Open a directory in xyPlorer
#PROGRAMDRIVE# is a built-in Rainmeter variable that returns the drive letter that Rainmeter is running from. Instead of going up a bunch with .., this lets me hop straight to the root and keep my code readable.

Code: Select all

LeftMouseUpAction = ["#PROGRAMPATH#..\XYplorer\XYplorer.exe" "#PROGRAMDRIVE#\PortableApps\PortableApps\GitPortable\Data\home\"]
Example 3: Open a drive in xyPlorer
Pretty self-explanatory...

Code: Select all

LeftMouseUpAction = ["#PROGRAMPATH#..\XYplorer\XYplorer.exe" "A:\"]

; Alternatively, using xyPlorer commands...

LeftMouseUpAction = ["#PROGRAMPATH#..\XYplorer\XYplorer.exe" /path=A:\]

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

@autocart: thanks for your help. I was told on the Rainmeter forum about dropping the XYplorer.exe, but I thought it was correct due to the lnk shortcut working. But your help solved the issue, so thank you very much for that. :tup: :biggrin:

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

@wirlywirly: thanks for clarifying. I tried the last example originally, the one where you have the path to XYplorer in quotes and then the command line also in quotes, but that wouldn't work for me for some reason! Strange indeed. Appreciate your input though, thanks :tup:

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

Has anything changed wrt command line switches recently? Because this has stopped working for me!

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Opening a New Tab in XY from Rainmeter.

Post by autocart »

sl23 wrote: 18 Nov 2021 00:03 Has anything changed wrt command line switches recently? Because this has stopped working for me!
It still works for me. XY version 22.40.0233.

From my Rainmeter module 1 Disk.ini file:

Code: Select all

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
; Path to XYplorer...
XY=P:\ath\to\XYplorer.exe

[meterValueDisk1]
LeftMouseUpAction=["#xy#" /path=D:\]
Same as before.
Maybe your path changed and you forgot to update?
Maybe you did update but now have spaces in the path and did not quote the #xy#?

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: Opening a New Tab in XY from Rainmeter.

Post by sl23 »

Thanks for your reply.

That's just it, nothing has changed. I haven't moved any apps or edited the Rainmeter paths. Just all of a sudden none of the Rainmeter skins open any folders, not even drive root?!

The only thing that has changed is that I updated XYplorer. Hence I wondered if something changed in that? I checked the update page but couldn't see anything regarding command line, but may have missed it as there's a great deal to go through.

I'll look at it again tonight, see if I can find out what happened.

Post Reply