exists(file on my computer) not doing very well

Richmond richmondmathewson at gmail.com
Tue Sep 2 02:14:27 EDT 2014


On 1.09.2014 23:46, Klaus major-k wrote:
> Hi Richmond,
>
> Am 01.09.2014 um 21:21 schrieb Richmond <richmondmathewson at gmail.com>:
>
>> In a card of my upcoming "Grendel" for Anglo-Saxon, Gothic and other warped
>> Germanic languages/writing-systems I have this script:
>>
>> on preOpenCard
>>    set the title of stack "grendel" to the short name of this card
>> ##  if exists(url("file:" & "GrendelBackUp.rtf")) then
> not sure about the syntax for EXISTS and FILE, but -> url("file:"...) is surely not the way to go!
> Why not just use: if there is a file xyz...?
>
>>       put "exists"
>>       set the RTFText of fld "store" to URL ("file:" & "GrendelBackUp.rtf")
>>    else
>>       put "nope"
>>       end if
>> end preOpenCard
>>
>> Now the file GrendelBackUp.rtf is present where I saved it earlier, from the stack,
>> in the default folder.
>>
>> So would be glad if somebody could tell me why I keep getting "nope" in my Message Box.
> See above!
>
>> Richmond.
> Best
>
> Klaus
>

Thanks, I'll give it a try.

Richmond.




More information about the use-livecode mailing list