Thursday, 27 August 2009

Launching OI tools from code




Did you know that from OpenInsight version 7.0 onwards, Revelation have enabled you to launch OpenInsight tools from within BASIC+ code. This is achieved through the use of the RUNTOOL message which handles all of the details with regards to building the correct command line for launching the tools. The calling sequence for the message is:

Send_Message("SYSTEM", "RUNTOOL", WINDOW, TOOL.NUMBER, TOOL.COMMAND)

In the above command WINDOW is the name of the active window that is initiating the call. TOOL.NUMBER is the number associated with the OpenInsight tools, for example the Form Designer is 1 and you would use 2 for the System Editor. TOOL.NUMBER is the command line options that are used by the tool to open a specific entity.

Examples are:
* Start up the Form Designer.
Send_Message("SYSTEM", "RUNTOOL", "", 1)
* Invoke the System Editor and open the BALANCED stored procedure.
Send_Message("SYSTEM", "RUNTOOL", @WINDOW, 2, "/TN=SYSPROG*STPROC**BALANCED")


I’d like to thank my colleagues at Sprezzatura for providing the content of this posting.

No comments:

Post a Comment