Asked — Edited
Resolved Resolved by JustinRatliff!

Bug Report: Script Error Using \ Combination

I was trying to set a string to a directory path and found when the combination of the characters " comes up it seems to be interpreted as a token of some sort. For example:


 $TheFilePath ="F:\Images\"

Will give a Missing quotes or invalid expression error when it's run. I tried a work around for it by establishing a slash character variable:


#Since there is no To Char or Char function, I did it like this:
$SlashChar =GetCharAt("\A",0) 

#So then I could do this:
$TheFilePath  ="F:\Images"+SlashChar

Same error.


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#9  

I'm not sure I would call it a "bug" I view it as more of syntax peculiarity to which there are many you might find. I think it's because in the Script help, it always shows a complete path and file name, in my mind it was probably only intended for a file or .exe path to be listed rather than a break down to respect just a path directory. That's a guess of course.

#10  

@JustinRatliff You may be right, but it's been my experience that anything goes as long as it's between quotation marks. Keywords, operators, reserved words, whatever. So I still think this a bug. The script help does leave a lot to be desired, so not being in there isn't particularly meaningful. The only way to find out Script behavior on many issues is just to try it and see what happens. I've been doing that as I go. Adding to the help file for my own reference. But, what the heck, it can even be fun trying to find ways around the little buggy critters. Just another good mental exercise.

#11  

I totally agree experimenting and trying new things is the way to go. In some ways I look at what we do as helping push the limits of what the EZb/ARC can do and we all get to help each other along the way.

#12  

@JustinRatliff I waited a few days to see if there was going to be any official response to thie problem, but I guess not. Anyway, it's time to close it out and give credit where credit is due. Thanks so much for your suggestion, it filled the bill for a good work-around.

#13  

You are welcome @WBS00001, glad I could help. :)