Previous Topic

Next Topic

Book Contents

Book Index

Using expect’s record feature to capture an interactive session

Once Expect is installed, from a terminal session you can immediately begin creating your scripts without any formal scripting knowledge by entering the command "autoexpect –p". Every key stroke you enter will be entered into a local text file called "script.exp" until "exit" is typed. After you terminate the autoexpect session you will have a script in "script.exp" that is able to replay the session. You can use this to record common tasks and/or capture character cell menu sessions. Furthermore you can import the newly created script into a Schedule Job with command "schedule insert {jobname} script.exp".

Simple example:

autoexpect -p

schedule insert myexpectjob script.exp

ISE Windows Gui Client

Here is an example of a GE Centricity/IDX menu session that was recorded with autoexpect:

See Also

Appendix C - Using expect with EnterpriseSCHEDULE

General guidelines

Common edit changes made to Autoexpect recorded scripts

What to remove from the expect line?

Breaking expect Jobs into reusable pieces using include within a Job

Creating Expect prototype Job Templates