home *** CD-ROM | disk | FTP | other *** search
- <*
- *>
- :(mm,#!,())
- :(o,,(
- <**************************>
- <* GENTEACH Common Macros *>
- <**************************>
- ))
-
- :(s,teach.)
-
- :(mm,#!,( :(o,,<* Process TRAC return codes *>)
- ))
-
- :(o,,(
- <***************************************************************>
- <* Get input until recognized prompt or until timer expires *>
- <***************************************************************>
- ))
- :(mm,teach.iwt2,(
- :(s,<0>retval) <* Reset the return value *>
- :(s,<0>timer,:(xcm)) <* Reset timer *>
- :(s,<0>prompt,(<1p>))
-
- <* Loop until we find a prompt *>
- :(pcd,(
- :(s,<0>retval,:(r,<0>retval):(i2)) <* Get data *>
-
-
- :(s,<0>ptest,:(r,<0>retval))
-
- :(tsd,<0>ptest) <* go to end *>
- :(s,<0>ptest,:(pc,(
- :(tai,:(tn,<0>ptest,-1,(:(px))),!,,
- (:(tnd,<0>ptest,1):(tpb,<0>ptest):(pr,0)))
- ),-1))
-
- <* Crop if needed *>
- :(agi,:(tl,<0>ptest),:(tl,<0>prompt),(
- :(tps,<0>ptest,:(as,:(tl,<0>ptest),:(tl,<0>prompt)))
- :(s,<0>ptest,:(tpe,<0>ptest))
- ))
-
- <* Exit if match found *>
- :(ttci,<0>ptest,:(r,<0>prompt),(:(px)))
-
-
- :(ei,<2>,,,(
- <* Timer expired *>
- :(agi,:(as,:(xcm),:(r,<0>timer)),0<2>,(
- :(px)
- ))
- ))
- ),-1)
-
- :(r,<0>ptest)
-
- :(d,<0>timer,<0>retval,<0>ptest,<0>prompt,<0>temp,<0>sflag,<0>tchar)
- ))
-
- :(o,,(
- <***************************************>
- <* Code to handle unrecognized prompts *>
- <***************************************>
- ))
- :(mm,teach.help,(
- :(s,<0>response,:(win_prompt,(How should I respond to "):(r,
- <1>)("?),,,(Abort this script.),(Ignore this prompt.)))
- :(pc,(
- :(ei,:(r,<0>response),(Abort this script.),(
- :(g)
- ))
- :(ei,:(r,<0>response),(Ignore this prompt.),(
- :(px)
- ))
- :(win_sendkeys,:(r,<0>response)(<Enter>))
- ),1)
- ))
-
-
- :(o,,(
- <******************************>
- <* Retrieve the user's userid *>
- <******************************>
- ))
- :(mm,teach.username,(
- :(ei,:(win_username),,(
- :(win_username,:(win_prompt,(Enter your username:)))
- ))
- :(win_username)
- ))
-
- :(o,,(
- <********************************>
- <* Retrieve the user's password *>
- <********************************>
- ))
- :(mm,teach.passcode,(
- :(ei,:(win_passcode),,(
- :(win_passcode,:(win_prompt,(Enter your password:),*))
- ))
- :(win_passcode)
- ))
-
- :(o,,(
- <*********************>
- <* END Common Macros *>
- <*********************>
- ))