Jump to content

Display Results of a Command


TomTcom
 Share

Recommended Posts

When you pull up the cmd prompt and ping a computer you see the results. I can't figure out the proper way to go about this to see the results in a window for AutoIT such as the ttl and millisecond time as it's happening.

I have used some of the sample snippets on the site but I guess I would ultimately try to create my own network tool that has functions I want specifically and can return the results on screen.

Should I be looking into the gui functions or is there a more simple "results" or "output" window from an inputbox?

I hope I asked that correctly, given my noob status to scripting I'm not sure if I'm asking correctly.

-Tom

Link to comment
Share on other sites

I'm only aware of outputing results to a file:

run ( @ComSpec & " /c ping google.com > C:testtesting.txt 2>&1" )

then you can read from the file:

Pinging google.com [74.125.224.229] with 32 bytes of data:

Reply from 74.125.224.229: bytes=32 time=8ms TTL=51

Reply from 74.125.224.229: bytes=32 time=7ms TTL=51

Reply from 74.125.224.229: bytes=32 time=7ms TTL=51

Reply from 74.125.224.229: bytes=32 time=7ms TTL=51

Ping statistics for 74.125.224.229:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 7ms, Maximum = 8ms, Average = 7ms

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Have a look at the opt_flags of function "Run". You can attach to StdOut and StdErr and access the output from AutoIt. Examples are in the help file.

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

  • Moderators

A GUI definitely makes it easier for you to present the output in a way that is easier for the user to read.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...