gettingstarted
[Top] [All Lists]

Re: RBScript help

To: "Getting Started" <gettingstarted at lists dot realsoftware dot com>
Subject: Re: RBScript help
From: Will Leshner <leshner at ljug dot com>
Date: Sun, 23 Nov 2003 19:33:16 -0800
References: <799d07ab34 dot 7ab34799d0 at gwu dot edu>

On Nov 23, 2003, at 5:24 PM, Daniel Weber wrote:

rbscript.source="MsgBox "+chr(34)+"Hello"+chr(34)
rbscript.run

What is wrong with that?


RBScript can't show message boxes. But you can you use a context object and get it to show the message box for you. Any method in the context object becomes a global method in your rb object. So you can create a ShowMsgBox method in, say, your window and then set the RBScript's context object to be your window. Then you can call ShowMsgBox in your script in place of MsgBox and you should be good to go.



- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>