Sign in to follow this  
Followers 0
autow

_RunDOS

9 posts in this topic

How to get command result whit _RunDos?

Share this post


Link to post
Share on other sites



Return Value

Success: Returns the exit code of the command

Failure: Returns 0 and sets @error to non-zero.

What is the command, and what 'result' is sought?

William

Share this post


Link to post
Share on other sites

Return Value

Success: Returns the exit code of the command

Failure: Returns 0 and sets @error to non-zero.

What is the command, and what 'result' is sought?

William

example:type ipconfig in your dos,you get info,i need this info,you can help me?

Share this post


Link to post
Share on other sites

Read up on StdoutRead in the help file



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Read up on StdoutRead in the help file

But in this case i need use Run,and in my work i cannot show anything in diretor pcs...because this i nedd to use RunDos

Share this post


Link to post
Share on other sites

Here's the function for run Run ( "program" [, "workingdir" [, show_flag[, opt_flag ]]] ) from the help file, see the third parameter "show_flag"? That's where you put the parameter @SW_HIDE that hides the window.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Here's the function for run Run ( "program" [, "workingdir" [, show_flag[, opt_flag ]]] ) from the help file, see the third parameter "show_flag"? That's where you put the parameter @SW_HIDE that hides the window.

yeah but why i get the response?

Share this post


Link to post
Share on other sites

You don't need _RunDos, you can use run.

Proof, the source code for it

; #FUNCTION# ====================================================================================================================
; Name...........: _RunDOS
; Description ...: Executes a DOS command in a hidden command window.
; Syntax.........: _RunDOS($sCommand)
; Parameters ....: $sCommand - Command to execute
; Return values .: Success      - the exit code of the command
;                  Failure      - 0 and sets @Error to non-zero
; Author ........: Jeremy Landes <jlandes at landeserve dot com>
; ===============================================================================================================================
Func _RunDOS($sCommand)
    Local $nResult = RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE)
    Return SetError(@error, @extended, $nResult)
EndFunc   ;==>_RunDOS

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

thanks,now i need help to send/receive information:

1-I need specify a ip address to receive the connection whit TCPlisten?

For now is just this,thanks for all

Share this post


Link to post
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
Sign in to follow this  
Followers 0