Dialog editor error, 2018B

Started by guuzendesu, January 11, 2022, 11:27:14 PM

Previous topic - Next topic

guuzendesu

I'm using 2018B. I haven't done too much with dialogs but I'm certain I've both saved and loaded dialogs in the past with this version, both to the clipboard and the hard drive. Now no matter what I try, I get the error: "A correctly formatted dialog function was not found. The template cannot be loaded."

Is this a known bug? Is it an easy fix or workaround? I'm using the latest Windows 10. Thanks in advance.

td

There are no known "bugs" in Dialog Editor. You need to first try the "Open with WIL..." menu options. If that does not work, fix your template by adding a properly formated Dialog function to the script making sure that there are no nonprintable characters embedded in your script.

[edit] If you provide an unaltered copy of your dialog template we will check for any Dialog Editor problems. You can send the file directly to support@you-know-the-rest.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

guuzendesu

td, you are correct of course. The problem was that I assumed "Open from clipboard" should be the inverse of "Save to clipboard," and that "Open with WIL" and "Open from clipboard with WIL" would open the code in the WIL editor rather than the dialog editor.

That said, what is the purpose of the "Open from clipboard" and "Open" functions in the dialog editor, if they don't load dialog-generating code?

td

Open loads a dialog template from a file and Open from clipboard loads a dialog template from the clipboard.  From the What's New Webpage:

"The Dialog Editor now loads and parses dialog templates without the assistance of the
WIL interpreter DLL. Substitution is no longer performed on template string literals and
the substitution syntax is preserved when embedded in the dialog's title, or a control's
name and text attributes.",

"It is possible to still load templates into the Dialog Editor using the WIL interpreter
DLL by using one of the two new File menu items:
Open with WIL                - Loads a template from a file with the assistance of the
WIL interpreter DLL.
Open from Clipboard with WIL - Loads a template from the clipboard with the assistance
of the WIL interpreter DLL.",

and

"When these two menu options are used, substitution is performed on the dialog templates
so any substitution syntax will not be preserved when the loaded template is
saved to the clipboard or a file."

From the somewhat sparse documentation in the help:

https://docs.winbatch.com/mergedProjects/WinBatch/WINBATCH_F__002.htm
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade