Page 1 of 1 1
Topic Options
#142900 - 2005-07-05 02:11 AM @LDrive macro update
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
In order to maintain similar functionality I would like to suggest that the @LDrive macro be updated to operate as the other macros that return paths do.

All the macros below return the path without the trailing slash except the @LDrive macro.

Yes it is possible that some scripts may break with this change but if NOTED that this is one of the changes then it should be up to the Administrator that updates his/her version of KiXtart to observe the changes and take note.

Code:
'Logon Drive: ' + @LDrive ?
'Logon Server: ' + @LServer ?
'Home Drive: ' + @HomeDrive ?
'Long Home Directory: ' + @LongHomeDir ?
'Short Home Directory: ' + @HomeDir ?
'Current Directory: ' + @CurDir ?
'LAN Root: ' + @LanRoot ?
'Current Script Dir: ' + @ScriptDir ?



All will return without \ except @LDrive which will give the slash on the end.
 

Top
#142901 - 2005-07-05 02:21 AM Re: @LDrive macro update
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Yes it is possible that some scripts may break with this change



Now there is an understatement!

Granted, the manual is just downright wrong with several incorrect examples, but to change the @LDrive macro would certainly break a lot of scripts. I propose that the manual be revised to clearly explain the trailing hack.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#142902 - 2005-07-05 02:25 AM Re: @LDrive macro update
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Using any one of the many editors available on the Internet, many for free could change 100s of scripts for the change within seconds. Just like many Web Admins do for Web pages. Something changes, they do a search and replace and everything is back up and working as expected.
 


I too have some scripts that would break, but I'm willing to have an oversight corrected and take it upon myself to then correct my scripts as well.
 


Edited by NTDOC (2005-07-05 02:26 AM)

Top
#142903 - 2005-07-05 02:36 AM Re: @LDrive macro update
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, if I'm not wrong, the @LDrive value is not generated by kixtart but is reported by windows.
so, should kixtart modify that value?
say, have a check of somekind and remove the trailing backslash if present?
_________________________
!

download KiXnet

Top
#142904 - 2005-07-05 02:48 AM Re: @LDrive macro update
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Well perhaps Ruud could create a new macro that would strip the \ and deprecate the @LDrive macro so that future scripts would or should use the new macro. That way old scripts would not break either.
 

Top
#142905 - 2005-07-05 02:52 AM Re: @LDrive macro update
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ja, well... Ruud is big on backward compatibility (remember KeyExist/ExistKey) and since @LDrive is not broken, just different... only the manual needs fixing.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 641 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.