Hi,
It seems exists() was updated a few months ago, and its (theory of) relativity was broken…
So even this example from the manual doesn’t work anymore (outputs 0):
echo exists("XYplorer.exe");
I probably missed discussions about this, but I guess it’s not intended.
Have a nice day,
Flux
[Solved] SC exists() not <xypath> relative anymore
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
[Solved] SC exists() not <xypath> relative anymore
Last edited by FluxTorpedoe on 05 May 2019 17:43, edited 1 time in total.
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
Re: SC exists() not <xypath> relative anymore
It was done as part of a drive to bring consistency in path parsing of various scripting commands. Here's the discussion: viewtopic.php?f=5&t=19998
My view is that the current path should be taken as base path in scripts; the software being a file manager, the current location should always be the default scope of all operations.
My view is that the current path should be taken as base path in scripts; the software being a file manager, the current location should always be the default scope of all operations.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: SC exists() not <xypath> relative anymore
Well, that seems sound and logical! I’d definitely second that.SammaySarkar wrote: ↑19 Apr 2019 17:35My view is that the current path should be taken as base path in scripts
Besides, for scripts where the old behavior is needed, it’s not much work to prefix relative paths with <xypath>.
So I guess my post doesn’t really belong in the "Bug Reports" section anymore (it’s more about updating the manual).
Thanks for the info.
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: SC exists() not <xypath> relative anymore
I'll update the Help...
FAQ | XY News RSS | XY Twitter
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: SC exists() not <xypath> relative anymore
Hi’
Since everyone is on the same page —and it’s neither a bug nor a regression per se—, I marked the thread as [Solved].
Have a nice day,
Flux
Since everyone is on the same page —and it’s neither a bug nor a regression per se—, I marked the thread as [Solved].
Have a nice day,
Flux
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...