So I have this very long and complex script. It was developed under a 11 version of eggplant. I recently was forced to upgrade to the newest and greatest. Well now I’m having ST errors popping up everywhere. 1st one is I was removing parentheses from a string that has the following in it without the quotes of course “(0,0,0,0,0)”. In version 11 I used
delete every occurrence of "(" from string
delete every occurrence of ")" from string
That worked great. Now on version 12, it throws a fit on the 2nd part. It’ll delete the first parenthesis just fine. When it gets to the 2nd part it errors and complains about not being able to understand the command. SO, I tried “Delete ANY” without the “occurrence”. SAME THING. I ended up only with
delete "(" from string
delete ")" from string
Ok, so I’m passed that, even though it’s stupid that it didn’t recognize it. Now onto the one that really ticks me off. I’m trying to copy a file from one location across a network to another location. Written in version 11, I had no issues with this. Now that I’m in 12, it’s freaking out, but what I think is the “quotes”. Because once I remove all the variables and the quotes, I am left with "can’t understand “file” at or near 10. Now I am hoping that’s not the case and it’s the damn “tilde ~”. I’m tired of troubleshooting this script and doing workarounds. Help. The line is this.
This returns: STFileSystemException Failed to copy file or folder ~/Documents/GifCentral/ScreenCapture.gif (Error: The operation couldn’t be completed. No such file or directory)
copy file "~/Documents/GifCentral/ScreenCapture.gif" to folder global VolumeFolder&global WebFolder&"/OCR_Profiles/"&global profileID&"/ScreenCapture/"
without the variables it returns: STFileSystemException: Failed to copy file or folder ~/Documents/GifCentral/ScreenCapture.gif (Error: The operation couldn’t be completed. No such file or directory)
copy file "~/Documents/GifCentral/ScreenCapture.gif" to folder "/volumes/wwwroot/OCR_Profiles/Joe/ScreenCapture/"
without the quotes: Syntax Error at line 1: Syntax Error - can’t understand “file” at or near character 10
copy file ~/Documents/GifCentral/ScreenCapture.gif to folder /volumes/wwwroot/OCR_Profiles/Joe/ScreenCapture/
BOTH FILE AND FOLDER EXIST!