Jump to content

A few questions


Tharkis
 Share

Recommended Posts

I have some questions about a project that I am currently working on. I am most certainly an autoit noob, so bear with me here.

Essentially what I want to do is open up a telnet session (I can do this with console telnet perfectly). Perform some functions, then wait. It might take up to 2 hours for the process to complete, then log back into the telnet app, and perform another function and wait again for another 15 minutes.

My question for this part is what adverse effects might an extended (2 hours) sleep have? Is it better to just create a script for each function and run them with task scheduler?

Secondly, the second part of this process requires entering in an incremental number which increments every time I run the first function. What is the best way of going about keeping track of this incrementing number?

Thanks!

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

When you search the forum you will find a few threads about working with telnet.

I'm sure what you try to do can be done using AutoIt.

How do you know that the processing on the other machine has finished?

To store the incremental number you can simply use a file (use functions FIleRead, FileWrite) or an Ini-File (use functions IniRead, IniWrite).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Well the processing ususally only takes about 15 minutes to complete. By waiting 2 hours, I am garanteed that the process is completed. I technically won't know for sure that it completed though since it happens in the background. It's a sort of data collection routine that we basically have to keep checking to see if it is done. Or just wait for about an hour and we know it is done.

I thought about using an INI/Config file to store the data but I wasn't sure if there was another/better way to do it. Thanks for the help Water

Link to comment
Share on other sites

"data collection routine" sounds like a company application. If the purpose of your script is to check that the application ran successfully you need to take into account that the applciation crashes or hangs.

Can the "data collection routine" delete a file (created by the last run), process the data and create a new file when finished? If the file exists you know that the application ran successfully.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

It's a little more complicated than that. First you have to go in and run the "Collection" and wait. Then you have to go in and tell it to write that collected data to a file. If the data somehow fails to be collected, then it will throw an error message when I kick off the routine to write the file. The data collection routine can not delete a file. If for some reason it fails, I would have to call the vendor to clear out the global manually and run it again after they figured out what caused it to fail. I will say, I can't see a reason why it would ever fail to collect.

To be fair, I am just testing this right now. I want to make sure I can get it to function as if I was just typing it in myself. I'll put checks in for failure after I get the basic functionality working correctly.

Link to comment
Share on other sites

Good luck :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...