Trouble with 'there is a'

Pete pete at mollysrevenge.com
Fri Jan 27 12:35:19 EST 2012


Hi Ken,
You're saving my life on these Mac/Windows issues, thank you!  One question
on this.  What do the ask/answer file/folder dialogs return on Windows?
 Does LC convert the "\" chars to "/" before putting it into the it
variable, or just pass whatever the os returns?
Thanks,
Pete


>
> Right. If you *do* need to construct a "\"-delimited path for external use
> (for example, if you're creating a VBScript in LiveCode that you want to
> execute with "do … as VBScript"), then do your "/"-to-"\" conversions *just
> before* you use it, and do the conversion on a variable that's not going to
> be used again in that handler (like a temporary copy of a variable or one
> that is solely for the purpose of passing off to VBScript). For example:
>
>   put specialFolderPath("desktop") & "MyFile.txt" into tFile
>   -- maybe some other code goes here
>   put replaceText(tFile,"/","\") into tTempFile
>   -- construct VBScript using the tTempFile variable -- keeps tFile safe
> if you need to work with it later
>
>
>



More information about the use-livecode mailing list