#1 2010-10-11 10:27

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Short aliases for script commands

Hi Denis,

how about the possibility to add kind of 'aliases' for script commands?

I mean i often forget the commands like the following and have to look them up:
WideExtractFileDrive(FilePath)
WideExtractFileDir(FilePath)
WideExtractFileName(FilePath)
WideExtractBaseName(FilePath)
WideExtractFileExt(FilePath)


And they look rather complicated in an script and are too long to write and read.


[C|S]hould there be shorter commands at least for BaseName and FileExtension?
Something like build-in vars like "FileName" nad "FilePath" too:
"BaseName" := WideExtractBaseName(FilePath)
"Extension" := WideExtractFileExt(FilePath)

This both are often needed and it would be nice to have this handier vars at hand.
Would make the script looking easier.


This is open for discus... what do you think?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#2 2010-10-15 19:36

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Short aliases for script commands

Looks good, in fact sometimes I have thought about the posibility.

But they probably would have to work in the the same way that FilePath. I mean, existing, but not affecting the file. So the name would not be update until you do this:

FileName := BaseName + FileExt; // (I would prefere to call it FileExt)

It's easier but, may give some problems to users who could be already using this var in their scripts.
Giving an error of "duplicate identifier". In the cript is easy to solve, but them would need to now why are getting that error, when it was not there before.

But well, in the worst case you could also save your own script-template. roll


If this software has helped you, consider getting your pro version. :)

Offline

Board footer

Powered by FluxBB