rogerguay at centurytel.net
Thu Nov 6 14:46:36 EST 2003
Thanks very much, Klaus but I get the same result with your script. My
file is still on the desktop . . . is that OK?
> Message: 11
> Date: Thu, 6 Nov 2003 20:04:24 +0100
> From: Klaus Major <klaus at major-k.de>
> Subject: Re: revGoURL help
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <0997F1E4-108C-11D8-A360-000A27B49A96 at major-k.de>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
> Hi Roger,
>> I've got a file "Gen.html" on my desktop (OS X) along with my RunRev
>> The following script will open "Gen.html" while in Runtime but the
>> Standalone does not work:
>> on mouseUp
>> set the itemDelimiter to "/"
>> put (item 1 to -2 of the effective fileName of this stack)&"/" into
>> get "file:"&myFolderName&"gen.html"
>> revGoURL it --- This works in Runtime but not in standalone
>> end mouseUp
>> I do have Internet Script Libraries checked in the Distribution
>> Builder. Can anyone help?
> Sounds like a path problem...
> On OS X things are a little different than on other platforms ;-)
> When in dev-mode "item 1 to -2 of the effective fileName of this stack"
> will return
> what you exspect...
> But when you build a standalone this will return something what you
> don't exspect... (And now to something completely different! :-)
> You have to see it to believe it ;-)
> Control-Click your standalone and select "Show contents" (or something
> like this...)
> Then this folder will open and reveal another folder "Contents"...
> Another doubleclick will reveal 2 more folders and some files...
> Open the folder "MacOS" and you will find a file named "Revolution"...
> Now THIS is your original stack you build the standalone from, with the
> wrapped around it...
> And THIS FOLDER (Appname.app/Contents/MacOS/)!!! is what
> "item 1 to -2 of the effective fileName of this stack"
> will return in an OS X standalone...
> So what can you do?
> In this case "the directory" will be the right place :-)
> A.k.a "the defaultfolder" or "the folder"
> Try this (i do it all the time and it works fine :-D)
> on mouseUp
> set the itemDelimiter to "/"
> if the environment = "development" then
> put (item 1 to -2 of the effective fileName of this stack)&"/"
> into myFolderName
> get "file:"&myFolderName&"gen.html"
> get "file:gen.html"
> ##no need to specify a folder, since we ARE in the correct
> end if
> revGoURL it --- This works in Runtime but not in standalone
> end mouseup
> See the RR dictionary for "environment"
> Hope that helps...
>> Thanks, Roger
> Klaus Major
> klaus at major-k.de
More information about the Use-livecode