/* CMDCALL (STD) -- Execute Command Call Sequence */ /* CMDCALL (STD) -- Kommandosequenz ausfuehren */ /* -- INTENDED FOR KEY-CALL USE (SHIFT-CTRL-R) -- */ /* // Copyright (c) 2010-2012 Oliver Bartels F+E, Muenchen // Author: Roman Ludwig // Changes History: // rl (120427) RELEASED FOR BAE V7.8. // rl (101214) ORIGINAL CODING. // // DESCRIPTION // // The cmdcall User Language program queries the input of a command sequence // and executes this sequence. Command sequences of BAE menu functions are // documented in the reference manuals (brgar.htm, brgcam.htm, brgcv.htm, // brgged.htm and brgsc,.htm). This is basically the same behaviour as // Run User Script with the difference that the BAE window has the input // focus and not a seperate dialog box window. This enables remote controlled // BAE operation with tools like StrokeIT for mouse gesture program control. // The cmdcall program is preconfigured for hotkey SHIFT-CTRL-R, thus a remote // controlled function call can be triggerd by input of SHIFT-CTRL-R followed // by the command sequence and ENTER. */ // Includes #include "std.ulh" // User Language standard include // Disable undo state request #pragma ULCALLERNOUNDO // INI file parameter name definitions #define PAR_VISKEYS "VISCMDKEYS_STD" // Visible command keys flag // Main program void main() { string cmdstr = "" /* Command string */; char c /* Character buffer */; switch (bae_iniintval(PAR_VISKEYS,1)) { case 2 : // Query command via edit box line input cmdstr=bae_readedittext("? ","",1000); break; case 1 : // Query command via message line input cmdstr=bae_readtext("? ",1000); break; default : // Query command via keyboard input while ((c=getchr())!=0x0a && c!=0x0d) cmdstr+=c; } // Execute command ulsystem(cmdstr,0); } // User Language program end