I have thought 🙂 more convenient to update one topic than three topics
Word Functions Header v2.52
Text Functions Header v1.4
File Functions Header v1.21
1. Function GetParameters moved from WordFunc.nsh to FileFunc.nsh
2. Text Functions LineFind and LineRead
-now last line "-1" instead of "0"
These headers are included with NSIS. See: http://nsis.sourceforge.net/Docs/AppendixE.html#E
WordFunc.nsh + TextFunc.nsh + FileFunc.nsh
49 posts
Word Functions Header v2.6
Text Functions Header v1.4
File Functions Header v1.3
1. "GetDrives" v1.1
-Fixed: depended on drives order
2. "WordFind2X" v2.1
-Loops sorted
3. New: "WordFind3X" v1.0
-Find word, that contain string, between two delimiters.
(Based on Afrow UK idea of Function "StrSortLR" 2003-06-18)
4. "WordFuncExample.nsi" updated.
Text Functions Header v1.4
File Functions Header v1.3
1. "GetDrives" v1.1
-Fixed: depended on drives order
2. "WordFind2X" v2.1
-Loops sorted
3. New: "WordFind3X" v1.0
-Find word, that contain string, between two delimiters.
(Based on Afrow UK idea of Function "StrSortLR" 2003-06-18)
4. "WordFuncExample.nsi" updated.
Word Functions Header v2.6
Text Functions Header v1.5
File Functions Header v1.3
"LineFind" v1.3
-Added "/NUL" option: No output text file (only read InputFile).
Text Functions Header v1.5
File Functions Header v1.3
"LineFind" v1.3
-Added "/NUL" option: No output text file (only read InputFile).
Word Functions Header v2.6
Text Functions Header v1.5
File Functions Header v1.4
1. New: "GetBaseName"
-Get file name without extension.
(Based on comperio idea of Function "GetBaseName" 2005-01-28)
2. New: "GetFileVersion"
-Gets the version information from executable file.
3. New: "VersionCompare" v1.0
-Compare version numbers.
(Based on Afrow UK Function "VersionCheckNew2" 2005-01-24)
His original function isn't included because of wrong results:
${VersionCheckNew2} "2.5.9" "2.5.01" $R0 -Ver2 newer
${VersionCheckNew2} "2.5.09" "2.5" $R0 -equal
Text Functions Header v1.5
File Functions Header v1.4
1. New: "GetBaseName"
-Get file name without extension.
(Based on comperio idea of Function "GetBaseName" 2005-01-28)
2. New: "GetFileVersion"
-Gets the version information from executable file.
3. New: "VersionCompare" v1.0
-Compare version numbers.
(Based on Afrow UK Function "VersionCheckNew2" 2005-01-24)
His original function isn't included because of wrong results:
${VersionCheckNew2} "2.5.9" "2.5.01" $R0 -Ver2 newer
${VersionCheckNew2} "2.5.09" "2.5" $R0 -equal
Why is 2.5.09 equal to 2.5? Just a typo or does the function behave that way?
No. It isn't a typo.
@kichik:
His original function isn't included because of wrong results:read it another time 🙂
${VersionCheckNew2} "2.5.9" "2.5.01" $R0 -Ver2 newer
${VersionCheckNew2} "2.5.09" "2.5" $R0 -equal
Thanks for letting me know 😔
Fixed my function.
-Stu
Fixed my function.
-Stu
Word Functions Header v2.6
Text Functions Header v1.6
File Functions Header v1.4
1. "LineFind" v1.4
-Output file will not be updated if no changes made
-Error flag if output file path isn't exists
-Added: "{No}" callback this line and don't write others
-Variables in callback function changed
2. Added script to simple install WordFunc.nsh, TextFunc.nsh, FileFunc.nsh
Text Functions Header v1.6
File Functions Header v1.4
1. "LineFind" v1.4
-Output file will not be updated if no changes made
-Error flag if output file path isn't exists
-Added: "{No}" callback this line and don't write others
-Variables in callback function changed
2. Added script to simple install WordFunc.nsh, TextFunc.nsh, FileFunc.nsh
Word Functions Header v2.7
Text Functions Header v1.7
File Functions Header v1.5
1. "ClbSet", "ClbGet" removed from WordFunc.nsh
2. "LineRead" v1.2, "LineSum", "FileJoin" v1.4, "TextCompare" v1.2
-Added IfErrors after FileOpen
3. "GetDrives" v1.2
-Added "ALL" along with ""
4. New: "FileReadFromEnd" v1.0
-Read text file from end line by line.
5. New: "DriveSpace" v1.0
-Get total, occupied or free space of the drive.
6. Added: "GetRoot"
(Based on KiCHiK Function "GetRoot")
-Get the root directory.
7. Added: "GetParent"
(Based on sunjammer Function "GetParent")
-Get parent directory.
8. Added: "GetFileName"
(Based on KiCHiK Function "GetFileName")
-Get last part from directory path.
9. Many minor code and documentation improvements
Text Functions Header v1.7
File Functions Header v1.5
1. "ClbSet", "ClbGet" removed from WordFunc.nsh
2. "LineRead" v1.2, "LineSum", "FileJoin" v1.4, "TextCompare" v1.2
-Added IfErrors after FileOpen
3. "GetDrives" v1.2
-Added "ALL" along with ""
4. New: "FileReadFromEnd" v1.0
-Read text file from end line by line.
5. New: "DriveSpace" v1.0
-Get total, occupied or free space of the drive.
6. Added: "GetRoot"
(Based on KiCHiK Function "GetRoot")
-Get the root directory.
7. Added: "GetParent"
(Based on sunjammer Function "GetParent")
-Get parent directory.
8. Added: "GetFileName"
(Based on KiCHiK Function "GetFileName")
-Get last part from directory path.
9. Many minor code and documentation improvements
Word Functions Header v2.7
Text Functions Header v1.7
File Functions Header v1.6
"DriveSpace", "DirState", "GetFileVersion"
-Missing ClearErrors at the beginning.
Text Functions Header v1.7
File Functions Header v1.6
"DriveSpace", "DirState", "GetFileVersion"
-Missing ClearErrors at the beginning.
Word Functions Header v2.7
Text Functions Header v1.8
File Functions Header v1.7
In order to avoid exiting from connected functions,
changed exit value in callback function to "Stop<FunctionName>":
-"LineFind" Stop -> StopLineFind
-"FileReadFromEnd" Stop -> StopFileReadFromEnd
-"TextCompare" StopCompare -> StopTextCompare
-"GetDrives" Stop -> StopGetDrives
Text Functions Header v1.8
File Functions Header v1.7
In order to avoid exiting from connected functions,
changed exit value in callback function to "Stop<FunctionName>":
-"LineFind" Stop -> StopLineFind
-"FileReadFromEnd" Stop -> StopFileReadFromEnd
-"TextCompare" StopCompare -> StopTextCompare
-"GetDrives" Stop -> StopGetDrives
Word Functions Header v2.8
Text Functions Header v1.8
File Functions Header v1.8
1. "Locate" v1.5
-Added "/B=" parameter (when used banner with function)
2. "StrFilter" v1.2
-Missing ClearErrors at the beginning.
Text Functions Header v1.8
File Functions Header v1.8
1. "Locate" v1.5
-Added "/B=" parameter (when used banner with function)
2. "StrFilter" v1.2
-Missing ClearErrors at the beginning.
Word Functions Header v2.8
Text Functions Header v1.8
File Functions Header v1.9
Changes:
"Locate" v1.6
-Fixed: if error appeared in the callback, function don't restore stack after exit.
Text Functions Header v1.8
File Functions Header v1.9
Changes:
"Locate" v1.6
-Fixed: if error appeared in the callback, function don't restore stack after exit.
Word Functions Header v2.8
Text Functions Header v1.8
File Functions Header v2.0
Changes:
New: "GetOptions"
-Get options from command line parameters.
Text Functions Header v1.8
File Functions Header v2.0
Changes:
New: "GetOptions"
-Get options from command line parameters.
Word Functions Header v2.9
Text Functions Header v2.0
File Functions Header v2.3
Changes:
1. Verbosity added (faster compilation time)
2. "Locate" v1.7
-Fixed: Banner support
3. "GetOptions"
-Now required only 2 arguments:
${GetOptions} "[Parameters]" "[Option]" $var
4. "GetTime" v1.2
-Now convert day and month in DD and MM format
5. "TextCompare" v1.4
-Rewrited all code
6. "FileReadFromEnd" v1.2
-Now if the text file cannot be opened, the error flag is set
Text Functions Header v2.0
File Functions Header v2.3
Changes:
1. Verbosity added (faster compilation time)
2. "Locate" v1.7
-Fixed: Banner support
3. "GetOptions"
-Now required only 2 arguments:
${GetOptions} "[Parameters]" "[Option]" $var
4. "GetTime" v1.2
-Now convert day and month in DD and MM format
5. "TextCompare" v1.4
-Rewrited all code
6. "FileReadFromEnd" v1.2
-Now if the text file cannot be opened, the error flag is set
Word Functions Header v3.0
Text Functions Header v2.1
File Functions Header v2.4
Changes:
1. "VersionCompare" moved from FileFunc.nsh to WordFunc.nsh
2. New: "VersionConvert" v1.0
-Convert version in the numerical format which can be compared.
3. New: "ConfigRead" v1.0
-Read value from entry name in config file.
4. New: "ConfigWrite" v1.1
-Write value from entry name in config file.
5. New: "FileRecode"
-Recode text file from DOS to Windows format and vice-versa.
6. New: "GetFileAttributes" v1.1
-Get attributes of file or directory.
7. New: "BannerTrimPath"
-Trim string path for banner.
Text Functions Header v2.1
File Functions Header v2.4
Changes:
1. "VersionCompare" moved from FileFunc.nsh to WordFunc.nsh
2. New: "VersionConvert" v1.0
-Convert version in the numerical format which can be compared.
3. New: "ConfigRead" v1.0
-Read value from entry name in config file.
4. New: "ConfigWrite" v1.1
-Write value from entry name in config file.
5. New: "FileRecode"
-Recode text file from DOS to Windows format and vice-versa.
6. New: "GetFileAttributes" v1.1
-Get attributes of file or directory.
7. New: "BannerTrimPath"
-Trim string path for banner.
Word Functions Header v3.0
Text Functions Header v2.1
File Functions Header v2.5
Changes:
1. "GetDrives" v1.4
-Fixed: Alloc/Free (Thanks nechai)
2. "GetOptions"
-Better option search (complite ignoration in quotes)
3. Renamed example scripts (like in CVS):
...FuncTest.nsi -> ...Func.nsi
...FuncTest.ini -> ...Func.ini
Text Functions Header v2.1
File Functions Header v2.5
Changes:
1. "GetDrives" v1.4
-Fixed: Alloc/Free (Thanks nechai)
2. "GetOptions"
-Better option search (complite ignoration in quotes)
3. Renamed example scripts (like in CVS):
...FuncTest.nsi -> ...Func.nsi
...FuncTest.ini -> ...Func.ini
Word Functions Header v3.0
Text Functions Header v2.1
File Functions Header v2.6
Changes:
1. "GetTime" v1.3
-Fixed: Free structures
2. "GetExeName" and "GetExePath"
-Simplification with "GetLongPathNameA"
3. "BannerTrimPath"
-Added D mode
Text Functions Header v2.1
File Functions Header v2.6
Changes:
1. "GetTime" v1.3
-Fixed: Free structures
2. "GetExeName" and "GetExePath"
-Simplification with "GetLongPathNameA"
3. "BannerTrimPath"
-Added D mode
Word Functions Header v3.1
Text Functions Header v2.1
File Functions Header v2.7
Changes:
1. "WordReplace" v2.1
-Fixed: Incorrect rule for return errorlevel 1 in situation when string beginning with word to replace and its only one word in string and when uses option - deletes all founded words (thanks hemancuso)
2. "GetExeName" and "GetExePath"
-Fixed: Return empty string in Windows 95 (thanks kichik)
Text Functions Header v2.1
File Functions Header v2.7
Changes:
1. "WordReplace" v2.1
-Fixed: Incorrect rule for return errorlevel 1 in situation when string beginning with word to replace and its only one word in string and when uses option - deletes all founded words (thanks hemancuso)
2. "GetExeName" and "GetExePath"
-Fixed: Return empty string in Windows 95 (thanks kichik)
Word Functions Header v3.1
Text Functions Header v2.1
File Functions Header v2.8
Changes:
1. Now "GetRoot" returns not only root drive or UNC:
${GetRoot} "Program Files\NSIS" $R0 # $R0="Program Files" instead of ""
${GetRoot} "\Program Files\NSIS" $R0 # $R0="\Program Files" instead of ""
2. Some typos corrected (thanks Jamyn)
Text Functions Header v2.1
File Functions Header v2.8
Changes:
1. Now "GetRoot" returns not only root drive or UNC:
${GetRoot} "Program Files\NSIS" $R0 # $R0="Program Files" instead of ""
${GetRoot} "\Program Files\NSIS" $R0 # $R0="\Program Files" instead of ""
2. Some typos corrected (thanks Jamyn)
What about UTC (Coordinated Universal Time?)
I need to use UTC (Coordinated Universal Time) instead of Local Time which can be gotten from kernel32::GetSystemTime. Any chance of updating the "official" version of Text Functions Header to incorporate that functionality?
My other option is to hack GetTime() and include it directly in my code. Yuck.
I need to use UTC (Coordinated Universal Time) instead of Local Time which can be gotten from kernel32::GetSystemTime. Any chance of updating the "official" version of Text Functions Header to incorporate that functionality?
My other option is to hack GetTime() and include it directly in my code. Yuck.
Word Functions Header v3.1
Text Functions Header v2.1
File Functions Header v2.9
Changes:
"GetTime" v1.4
-Added support for system time (UTC)
-Added example how to convert time to 12-hour format AM/PM
Text Functions Header v2.1
File Functions Header v2.9
Changes:
"GetTime" v1.4
-Added support for system time (UTC)
-Added example how to convert time to 12-hour format AM/PM
Has the getdrives function been tested on windows 98,
If so does it work?
If so does it work?
Has the getdrives function been tested on windows 98Yes
If so does it work?🙂 Yes
Thanks
Word Functions Header v3.2
Text Functions Header v2.2
File Functions Header v3.0
Changes:
1. "WordReplace" v2.2
-Added options "{", "}", "{*", "}*"
2. "GetOptions"
-Now sets error flag if option does not found
3. "ConfigRead"
-Now sets error flag if entry does not found
4. New case sensitive functions (NSIS 2.14 required):
"WordFindS", "WordFind2XS", "WordFind3XS", "WordReplaceS",
"WordAddS", "WordInsertS", "StrFilterS", "TextCompareS",
"ConfigReadS", "ConfigWriteS", "GetOptionsS"
5. Added program for simple headers install
Text Functions Header v2.2
File Functions Header v3.0
Changes:
1. "WordReplace" v2.2
-Added options "{", "}", "{*", "}*"
2. "GetOptions"
-Now sets error flag if option does not found
3. "ConfigRead"
-Now sets error flag if entry does not found
4. New case sensitive functions (NSIS 2.14 required):
"WordFindS", "WordFind2XS", "WordFind3XS", "WordReplaceS",
"WordAddS", "WordInsertS", "StrFilterS", "TextCompareS",
"ConfigReadS", "ConfigWriteS", "GetOptionsS"
5. Added program for simple headers install
Word Functions Header v3.2
Text Functions Header v2.3
File Functions Header v3.1
Changes:
-Added /NOUNLOAD flag for the system plugin. Functions that uses system plugin calls several times, now 25-75% faster ("GetSize", "DriveSpace", "GetDrives", "GetTime", "ConfigWrite", "FileRecode").
Text Functions Header v2.3
File Functions Header v3.1
Changes:
-Added /NOUNLOAD flag for the system plugin. Functions that uses system plugin calls several times, now 25-75% faster ("GetSize", "DriveSpace", "GetDrives", "GetTime", "ConfigWrite", "FileRecode").
kichik, plz update the CVS 🙂
Hey Instructor,
I have to say that your functions are very cool. I find that I use them almost every chance I get!
Here's an enhancement suggestion for the Locate function:
Currently, there is an option /M=[mask] to add options of what to search for. A cool option might be something like /!M=[mask] to specify what to EXCLUDE.
For example /!M=*.EXE would mean to exclude all dat files from the search.
Using both together, one might use
/M=*.DAT /!M=doofus.dat
which would translate to:
"Include all *.DAT files except the file named 'doofus.dat'"
That's all I have for now. Keep up the great work!👍
I have to say that your functions are very cool. I find that I use them almost every chance I get!
Here's an enhancement suggestion for the Locate function:
Currently, there is an option /M=[mask] to add options of what to search for. A cool option might be something like /!M=[mask] to specify what to EXCLUDE.
For example /!M=*.EXE would mean to exclude all dat files from the search.
Using both together, one might use
/M=*.DAT /!M=doofus.dat
which would translate to:
"Include all *.DAT files except the file named 'doofus.dat'"
That's all I have for now. Keep up the great work!👍