All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.ibm.hi.customizer.beans.scci.SCFactory
Examples:
to create a SCMacro that sends the "F1" host function key and executes no SCMacroCommands, use:
SCMacro macro1 = SCFactory.createMacro(null, SCMacro.F1_STR); //pass in null for the SCMacroCommands Vectorto create a SCMacro to start a user applet called "testApplet" and sends no functionKey, use:
java.util.Vector v1 = new Vector(); //create a vector to contain SCMacroCommands v1.addElement(SCFactory.createMacroCommand(SCMacroCommand.RUN_APPLET, "testApplet")); //run applet SCMacro macro2 = SCFactory.createMacro(v1, null); //pass in null for the functionKeyto create a SCMacro that starts an applet, opens a new session, and sends a user name, password, and the "Enter" functionKey, use:
java.util.Vector v2 = new Vector(); //create a vector to contain SCMacroCommands v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.RUN_APPLET, "testApplet")); //run applet v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NEW_SESSION, null)); //start a new session v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NO_COMMAND, "user", 1536, 8)); //send user name v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NO_COMMAND, "pass", 1630, 8)); //send password SCMacro macro3 = SCFactory.createMacro(v2, SCMacro.ENTER_STR); //send Enter key
public SCFactory()
public static SCMacroCommand createMacroCommand(int commandType, String argument)
commandType
- type of command, see SCMacroCommand
for commandType definitions.
argument
- the argument required for some commandTypes,
pass in null
for no argument
public static SCMacroCommand createMacroCommand(int commandType, String argument, int position, int length)
commandType
- type of command, see SCMacroCommand
for commandType definitions.
argument
- the argument required for some commandTypes,
pass in null
for no argument
position
- the host position
length
- the host length
public static SCMacro createMacro(Vector commands, String functionKey)
commands
- a java.util.Vector
of SCMacroCommands
functionKey
- the function key to send after
executing all the SCMacroCommands, see
SCMacro
for functionKey definitions
All Packages Class Hierarchy This Package Previous Next Index