General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Dialogs Requesting Author Input
-
andyleslie March 26, 2013 at 7:14 am
Dialogs Requesting Author Input
March 26, 2013 at 7:14 amParticipants 0Replies 1Last Activity 9 years, 10 months agoHello,
How easy is it to write a macro to launch a pop up dialog requesting author input within XMetaL ?
Thanks
Andy
Derek Read March 26, 2013 at 8:21 am
Reply to: Dialogs Requesting Author Input
March 26, 2013 at 8:21 amThe simplest would be a single line of code similar to the following example:
[code]//Example showing how to obtain user input and store the
//return value (what the user enters) in a JScript variable.
//First argument is the display text (the “prompt”).
//Second, and optional, argument is suggested text the user may opt to type over in the text area.
var myVariable = Application.Prompt(“Enter some text”, “default text”);[/code]You can also launch a custom XFT dialog (XFT is XMetaL's own binary compiled version of a dialog, similar but not the same as those you might create using Visual Basic). These are designed using the XMetaL Forms Toolkit (form designer) that comes with XMetaL Developer. That APIs related to launching such a form are documented in the Programmers Guide and are CreateFormDlg() and DoModal().
-
AuthorPosts
- You must be logged in to reply to this topic.