Toad World® Forums

Toad Data Modeler Programming Language

Hi all,

I've been trying to get to grips with the programming language used to create scripts in Toad Data Modeler. Can anybody tell me what language it is? And where can I find resources to learn it?

Thanks

Andy

Hi Andy,
there are three possibilities. JScript, VBScript and Internal Script. My recommendation is use JScript. There are a lot of examples in TDM system packages. You also can use Referencial Guide to see object methods and properties.
If you have any particular questions, don't hesitate contact us by this forum.

Petr

Hi Petr,

Thanks for the prompt reply, Does the Referencial guide contain a list of Objects and their methods available in jscript and the syntax for them? If so, where do I find the guide?

Thanks Again

Andy

Hi Andy,
First got to Main Menu-Settings-Options-General and switch on "Expert Mode".
You will see new item in Main Menu "Expert Mode". Under this menu item is Reference Guide.
if you would like to try some small pieces of code I recommend "Scripting Window". See screenshot

Petr

Hiya Daril,

Thanks for the reply, much appreciated...

Here is an example of some code that was written to add the tablespace name to selected objects. I downloaded it as a package off the Toad website. What programming language is this written in? I cannot find any reference to e.g System.CreateForm in jscript online.

var form, lblHelp, cbTablespace, Tablespace;

form = System.CreateForm('Form', 'Tablespace Assign', 300, 180);
form.ExecuteScriptName = 'TablespaceAssignmentMacro';
form.ExecuteMethodName = 'Assign';
form.CloseAfterExecute = true;

lblHelp = form.AddControl('lblTablespaceNameCtr', 5);
lblHelp.Caption = 'Select existing tablespace:';
lblHelp.Left = 10;
lblHelp.Top = 8;

cbTablespace = form.AddControl('cbTablespaceCtr', 8);
cbTablespace.Style = 0;
cbTablespace.Width = 250;
cbTablespace.Left = 10;
cbTablespace.Top = 25;
cbTablespace.Enabled = true;

Thanks Again

Andy

Hello Andy,
the language itself is JScript - it's close relative of JavaScript but from Microsoft. (here is an article that describes the differences: https://www.educba.com/javascript-vs-jscript/ ).
Those conscructs you've mentioned are part of Toad Data Modeler API and you can find reference to those in Reference Guide (Daril mentioned that in his post above). You can also find some examples in your help (Help > Help topics and here search for term Automation or Macros).

Hope this helped.

Michal

Hi Michal,

That's been a great help... I have now found what I'm looking for.

Thanks Again to Daril and Yourself for you continued help.

Andy