Hi, I wonder if someone could help me with this fab program.
I dont really understand how to use variable's or indeed if i need to use one to acheive my goal.
what im trying to do is get automise to read a log file for example ( c:\test\mylog.log ) and insert the contents of that file into the body of an email.
I have managed without problem to attach the logfile to an email and get automise to fire that off, which works fine.
I presume if I actually want the contents of that logfile to be 'pasted' ( for want of a better word ) into the body of the email rather that just attached i would need to read the file to a variable ?
could any of you kind people explain in simple english ( ish ) how i do that ?
Many thanks
Ben
PS - I have tried to read the helpfile but get totally confused about variables and how to use them
You can use the Read Text file action to do this. Define a project variable, call it LOGDATA. Then add the Read Text File action, point it to the log file and check the “Put contents into variable” option and select the LOGDATA variable in the list.
Now in your email action, in the message body, you can insert the variable where you want the log file contents, e.g:
Aha I have since found that if I try the above manaully ie from windows run command telnet to the router, login and type "reload" the router then gives me the prompt:
Proceed with reload? [confirm]
to which I need to press "y" then enter.
So i presume i need a 3rd line in my script ? such as:
3rd line = WaitFor "Proceed with reload? [confirm]", Script Text "y", Timeout "2000", Enabled (ticked)
Or am i getting this wrong?
If I click the "new" button on the script entry page of the Telnet client options I can fill in the entry above for the 3rd command however when i click "ok" it replaces my 2nd line (WaitFor "MoIP-HA#", Script Text "reload", Timeout "2000", Enabled (ticked)) rather than create a 3rd entry.
Not sure why that is?
Many thanks again - really appreciate your help on this