the back slash is an "escape" character inside text calculations in Filemaker. \" is one way to include a double quote character inside a quoted string. "this \"example\"" would evaluate as this "example".
To use the backslash inside your expression, use two:
"imagewin:/" & Substitute( $file ; "\\" ; "/" )
I just tried revising the expresion to "imagewin:/" & Substitute( $file ; "\\" ; "/" ) and it now sets the script function without an error but when i run it it does not switch all the "\" with "/", they still output with the old "\".
By the way, the $file is C:\Users\hobbies4life\Desktop\Pictures which is a windows directory format and the filemaker requires the"\" slashs instead of "/" which i can't change for some reason.
Sorry, it worked, forgot to save the edited script.
Thanks for all your help, I appreciate all your help!
Better check your data carefully.
When I tested this in a test file, I got: imagewin:/C:/Users/hobbies4life/Desktop/Pictures
which would appear to be exactly what should be returned by this calculation.
You might also want to use "imagewin:/" & Get ( DesktopPath ) & "Pictures"