[GRANTED]Shorthand alias variable

Features wanted...
Post Reply
bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

[GRANTED]Shorthand alias variable

Post by bdeshi »

I make extensive use of aliases to portablize paths and so on, for example, <get alias programs>\autoit\au3.exe, <get alias projects>\xyahklivefilter etc
but it's tedious.
Can you give us me a shorter shortcut for calling aliases, such as <@aliasname[ params]> please? :)
so I can use <@programs>\autoit\au3.exe instead.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Shorthand alias variable

Post by TheQwerty »

AFXY ATM but can't you already do this with a goto?

Code: Select all

goto '@programs \autoit\au3.exe';
(Unless your goal was to retrieve the value only then... use a UDF.)

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Shorthand alias variable

Post by bdeshi »

that's unavailable in say, CFIs. And the variable form is cleaner in POM (less scripts, the icon is automatically detected too).
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

binocular222
Posts: 1416
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: Shorthand alias variable

Post by binocular222 »

+1
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Shorthand alias variable

Post by nerdweed »

+1. Will be usable in Copy To, Move To dialogs as well.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Shorthand alias variable

Post by bdeshi »

throw-in :ball:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

murdock01
Posts: 55
Joined: 08 Nov 2010 19:35

Re: Shorthand alias variable

Post by murdock01 »

Why use aliases? Since all my portable programs are on the same drive as XYplorer, I use ? or <xydrive> to root my paths to a location.
So in your case you could use ?:\programs\autoit\au3.exe or <xydrive>\programs\autoit\au3.exe (assuming all your portable stuff is together like mine and on the same drive as XYplorer). I have no hard coded drive letters or paths in my config.
I have not used aliases yet so I guess I will look into them.

You could also use the "get" function to help resolve paths. Get will resolve a volume label to a drive letter and even perform path substitution on the results.
for help file:

Code: Select all

echo <get driveletter "Fun" "C:\Windows">; //F:\Windows
This is something that I suggested as a wish and was added to XYplorer, Thanks Donald!

Hope that helps
Last edited by murdock01 on 22 Feb 2016 14:42, edited 1 time in total.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Shorthand alias variable

Post by bdeshi »

that makes my paths absolute again, with only the drive letter part remaining portable.
I use aliases as a sort of environment variables: change the alias once, and zillion paths all over XYplorer get updated. I stand by my original wish. 8)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Shorthand alias variable

Post by admin »

An alias for an alias... hmmm... it might be hybris, but I'll give it a shot.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: [GRANTED]Shorthand alias variable

Post by bdeshi »

Thank you <get alias Don>;
Thank you <@Don> ! :tup: :biggrin: :tup:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

murdock01
Posts: 55
Joined: 08 Nov 2010 19:35

Re: [GRANTED]Shorthand alias variable

Post by murdock01 »

I see what you are doing. I like it and will have to try (aliases) but I do the same thing with perm variables.
I set paths in permanent variables and like you, change once and updates everywhere.
But as I said before the drive is determined with a ? or a <xydrive>, then the path comes from my perm variables, then the folder or file name.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: [GRANTED]Shorthand alias variable

Post by bdeshi »

Sure, permavars are another great alternative.

Aliases in XYplorer aren't just plain old stand-in-for-other-text, but much more! (Stefan's @@-trick is brilliant!)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply