IBMlogo
IBM eNetwork Communications Server for Windows NT
Host Publisher Feature, Version 6.01
[Next|Previous|Contents]

Host Publisher Hints and Tips

Simple macro explanation

The connect macro created in the simple example looks something like this (without the line numbers). It might be a little different in your version of Host Publisher.
 1  screenDesc.Clear();
 2  screenDesc.AddCursorPos(20,16);
 3  ps.WaitForScreen(screenDesc,10000);
 4  ps.SendKeys("userid[tab]password[enter]");
 5  oia.WaitForInput();
 6  screenDesc.Clear();
 7  screenDesc.AddCursorPos(23,1);
 8  ps.WaitForScreen(screenDesc,10000);
 9  ps.SendKeys("[clear]");
The comment lines at the end of the macro have been omitted here. Please do not change them.

Lines 1-3 go together and are used to describe and wait for a screen. screenDesc.Clear() removes any previous screen description that a macro might have set up. screenDesc.AddCursorPos(20,16) says that the screen you're going to wait for has its cursor positioned at 20,16. ps.WaitForScreen(screenDesc,10000) waits for that screen, for up to 10 seconds (10,000 milliseconds).

Line 4 ps.SendKeys("userid[tab]password[enter]") sends the userid and password and presses Enter.

Lines 5-8 should look familiar; they wait for the next screen.

Finally, line 9 sends a Clear keystroke.

If you recorded a connection to your host and did not need to use Clear, your macro will probably not contain the lines 7-10 shown here.


[Next|Previous|Contents]
IBM eNetwork Communications Server for Windows NT
Host Publisher Feature, Version 6.01