Post moved to forum dedicated module.
I'm checking code.
Greetings.
I'm having trouble with the OS_GetCommand function and I hope someone can enlighten me.
I have a script that reads a .nxf file but I am having trouble using it from the context menu. I've associated the .nxf filetype to the script with this command:
C:\thinBasic\thinBasic.exe "c:\thinBasic\UserScripts\nxf2scr.tbasic" %1
and it works fine as long as the filename does not contain a hyphen. Apparently OS_GetCommand uses a hyphen as a parsing character so the full filename doesn't get passed to the program. If I add quotes around the %1, OS_GetCommand(2) returns the full filename but it looks like now I have to strip off the quotes from the string to use it for a filename in file_ commands.
Can anyone explain how to get around the hyphen dilemma?
Thanks much.
Post moved to forum dedicated module.
I'm checking code.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
First, welcome in thinBasic community forum
I've checked source code and effectively we are using the following sequence of chars to determine separators or flag chars:
double quote (")
space ( )
hyphen (-)
underscore char (_)
I suppose this is quite restrictive and an imposition from our side.
For this reason I'm just developing 2 new functions:
- OS_CommandsGetSep, will let you retrieve current set of chars used by OS_Commands... functions
- OS_CommandsSetSep(NewSep), will let you retrieve current set of chars used by OS_Commands... functions and set your preferred one
With those new functions you will be able to adjust depending on your needs.
If you need this asap, I will be able to release this night (CET time) when back from work.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Ok, I had few minutes.
Attached in this post you will find a new version of OS module: thinBasic_OS.dll
Please download it and copy in your \thinBasic\lib\ directory replacing your current one.
I've added the following 2 functions:
CurrentSep = OS_CommandsGetSep
OldSep = OS_CommandsSetSep(NewSep)
You should be able to set the needed chars separators. Default one is: DoubleQuote + Space + Hyphen + Underscore
Let me know if all work as it should.
Ciao
Eros
PS: attached file is only for Win2K or above. It will not work for Win9x systems. It will available in double version when officially released.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks