Script Example Dialog Editor

Greetings!
I have had several attempts to use the dialog editor but unsuccessful thus far.
I have been reduced to reading the instructions (I know I know!) and trying to implement the simple sample script shown in Scripting > Scripting Dialogs > The Dialog Message Loop

I have this setup:

However when I run the script I get his output:

image

Any ideas?
Grateful as always for any replies...

Missing quotes.

1 Like

Thx @Ixp
Quotes fixed I think but still got an error around Dlg.Show.
Noticed from another working script that I have parenthesis after i.e. Dlg.Show()
Getting this error now see below.
Any ideas...?

This test framework below works.
Just throws up a dialog and nothing else.
If I remove line 5 and add line 6 it breaks.
Stuck currently......:slight_smile:

Superfluous brackets.

That's your subconscious telling you, that you actually want to use JScript instead of VBscript :smiley:

4 Likes

I think brackets are needed in VBScript when the function returns a value. But using JScript is a lot easier and avoids having to think about VBScript's ridiculous syntax entirely. :slight_smile:

Did you type your Resources tab by hand? It's malformed in at least two ways I can see.

Delete all of that and use the dialog editor (Dialogs > New Dialog, when on the Resources tab) to generate the resources. You don't need to type anything by hand there.

I think brackets are needed in VBScript when the function returns a value

Actually, at least the example from the help works with and without brackets:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/Simple_Dialogs.htm

So my guess was wrong, sorry.

1 Like