
Aerius
Canada
Asked
— Edited

Exec("C:\Program Files (x86)\RoboRealm\RoboRealm.exe")
generates an error : missing ")" in expression.
I suppose the (x86) within the command generate the problem.
Any suggestion to work around this problem?
just a work around and someone else may have a solution.
1)
Code:
or
2)
Code:
it will depend first how the EZB engine parses and handle escape characters (if it supports)
secondly it depends how the shell command is executed, i'm guessing the string is being passed directly to the shell versus a detailed call (working directory, program path, arguments)
Code:
basically you replaced the long name with a DOS (yes before windows) path name (8 characters):
to obtain DOS PATHs run:
Code:
in the parent directory for each sub-directory.
cheers
Exec("C:\progra~2\RoboRealm\RoboRealm.exe")
Tanks to you both
I had faith that the first option could work too..
option 1 & 2 where giving the error message.
As mention the "~2" did the magic.
by the way what is the #2 for?
@ david
You're right, we can start the SW with the data file directly in the same command.
EX: Exec("C:\progra~2\RoboRealm\RoboRealm.exe","C:\Users\gilles\AVM\face_rec.robo")
before windows, DOS only supported folders or file & folder's names with max 8 characters and extensions with max 3 characters.
to allow old applications (DOS) and other legacy you could access a big file name or path name via an equivalent short path name
so
"c:\progra~2" is the equivalent for "C:\Program Files (x86)"
the short name varies per system, windows by default has 2 paths
"C:\Program Files\" => "progra~1"
"C:\Program Files (x86)" => "progra~2"
at least those two seem to be always present.
There are 2 different directories called Program Files....
This is the second of these two directories, so it caries with it the first 6 characters a ~ and then 2.
It brings me almost back to the vacuum tube legacy.
I logged this bug 5 months ago:
http://www.ez-robot.com/Community/Forum/Thread?threadId=8278
Another bug like that is the combination of a backslash directly followed by a quote slash (\").
I logged it near the same time.
http://www.ez-robot.com/Community/Forum/Thread?threadId=8172&page=1
That thread discusses some work-arounds. Another work-around I have used since is this:
Code:
It was these problems which caused me to write the text scrub program in the first place as a means to overcome both bugs in text incoming from an external source. However, when trying to work-around the bugs from text generated within a script, it becomes complicated, but not impossible to get around.
Something like fixing up a string with a left paren bug might be amenable to an on-the-fly solution like for the backslash-quote bug but I haven't played with that theory as yet. Fortunately, in this case there was an alternative.
That can be a stopper and very annoying when working with strings, it's seems a problem in the parser, must be a priority.
After 5 months are those bugs still open ? Are you sure ?
Well, clearly they haven't been fixed, so I can only surmise they are still open. They may be a lot harder to correct than it might appear and so have been on the back burner in favor of other things. Only the (groundhog's) shadow knows. With luck, it will only be six more weeks until they spring forth in all their updated glory.