Thanks very much, Klaus but I get the same result with your script. My file is still on the desktop . . . is that OK?

Roger


Message: 11 Date: Thu, 6 Nov 2003 20:04:24 +0100 From: Klaus Major <[EMAIL PROTECTED]> Subject: Re: revGoURL help To: How to use Revolution <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> 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
application.
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
myFolderName
  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
obviously
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
engine
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"
else
get "file:gen.html"
##no need to specify a folder, since we ARE in the correct folder
automatically
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

Regards


Klaus Major
[EMAIL PROTECTED]
www.major-k.de


_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to