Can't open file
J. Landman Gay
jacque at hyperactivesw.com
Tue Apr 5 15:51:53 EDT 2005
On 4/5/05 2:25 PM, Trevor DeVore wrote:
> On Apr 5, 2005, at 12:02 PM, J. Landman Gay wrote:
>
>> If I do this on Win98 it works:
>>
>> get pathToMyFile() -- returns "C:/My Documents/myfile.txt"
>> open file it
>> write "1234" to file it
>> close file it
>>
>> But if I do this, I get "can't open file":
>>
>> get pathToMyFile()
>> put "1234" into url ("file://"&it)
>>
>> Why?
>
>
> I don't think you are supposed to have the "//" after "file:" are you?
Urk. Thanks. It was a brain fart I guess, but the funny thing is that it
has been in my script for a couple of weeks and works okay on Mac OS X
(which is why I didn't catch it, I suppose.)
So now that I have that working, I want to make the file invisible. Any
ideas why this standard snippet is failing:
replace "/" with "\" in tPath -- this contains what "it" had before
put "attrib"&& quote & tPath & quote && "-h" into tCommand
set the hideConsoleWindows to true
put shell (tCommand) into theError
I get no error, but the file remains visible. The command doesn't work
from the DOS prompt either.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list