Multi-Tech Systems RF310E Universal Remote User Manual


 
Appendix B - Scripting
RF300E/RF310E 117
Example Script:
proc main;
string login_prompt;
string user_name;
string password_prompt;
string password;
string shell_menu;
string shell_menu_response;
integer timeout;
timeout=10;
login_prompt=”login:”;
user_name=”user1”;
password_prompt=”Password:”;
password=”user1”;
shell_menu=”choice:”;
shell_menu_response=”1”;
transmit(“A”);
wait(1)
transmit(“T^M”);
waitfor (“OK”,10);
transmit (“A”);
wait (1);
transmit (“T”);
wait (1);
transmit (“DT963^M”);
if (waitfor (login_prompt,60)) then
transmit (user_name);
transmit (“^M”);
if (waitfor (password_prompt,timeout)) then
transmit (password);
transmit (“^M”);
if (waitfor (shell_menu,timeout)) then
transmit (shell_menu_response);
transmit (“^M”);
else
transmit (“Shell Menu Not Received^M”);
endif
else
transmit (“Password Prompt Not Received^M”);
endif
else
transmit (“Login Prompt Not Received^M”);
endif
Endproc