Attaching macros to your customized keyboard layout can really save time -- for example, I frequently want to see the errors generated by my compile while I'm in SEU, so I set up this simple macro to help automate the task.
To create the macro, go into Edit Preferences Macro/Script and press Customize. Go into the File menu, choose New and select VB Script. Paste the code (below) into the "Macro Statements" box, pull down the File menu and Save As ERROR.
Now attach the macro to the keyboard by pulling down Edit, Preferences, Keyboard and choose Customize. Use the mouse to select the E key by clicking on it, and then use the Macro/Script dropdown to pick out the new ERROR macro. Press the "->" button next to Ctrl to set Ctrl E to run the macro. Pull down File, choose Exit, and click the Yes button to save the changes to the keyboard. Hit OK to leave keyboard setup.
To use the new macro, open a source in SEU and press Ctrl E. The macro presses F15, selects option 2 (spool file), presses Enter, then finds *ERR – the first error in the compile listing.
[PCOMM SCRIPT HEADER]
[PCOMM SCRIPT SOURCE]
autECLSession.autECLPS.SendKeys "f *err"
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.