Jump to content
Sign in to follow this  
ricky

Run default options

Recommended Posts

ricky

Hello,

I need to create ma own Run function, but can't find the default value for a parameter.

What is the default value for opt_flag?

Nothing appears in the help.

Thanks for your help

Share this post


Link to post
Share on other sites
MikahS

opt_flag - Controls various options related to how the parent and child process interact. You will need to provide the parameter, otherwise it is not specified.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
ricky

Thanks, but normally each value as a Default value, Example below :

workingdir : [optional] The working directory. Blank ("") uses the current working directory. This is not the path to the program.

show_flag [optional] The "show" flag of the executed program:
    @SW_HIDE = Hidden window (or Default keyword)
 

But in the opt_flag nothing is specified. Who can help me?

I have also the same problem for runwait.

Thanks in advance

Edited by ricky03

Share this post


Link to post
Share on other sites
computergroove

If you want to make your own function that always has certain default values then make a function and add variables to send to it and call your function. This sounds pretty easy if you know autoit.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites
BrewManNH

From using it I would assume that the opt_flag is zero and that there is no interaction between the parent and child processes, meaning you get no feedback from the process you ran other than the PID.

Really not that hard to test.


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
MikahS

Everything in the helpfile :)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
ricky

Here is my function :

Func _Run($program, $workingdir = "", $showFlag = @SW_HIDE, $optFlag )

    Local $return = "", $returnError = "", $PID
    $PID = run($program, $workingdir, $showFlag, $optFlag)

    If @error Then
        $returnError = " - Error: " & @error
        $return = ""
    Else
        $return = " (PID: " & $PID & ")"
    EndIf

    _FileWriteLogRC("", "Run" & $return & ": " & $program & $returnError )
    Return $PID

EndFunc

I just want to transfert the default value to the real run function if it's not defined. But the default value is not in the manual!

Share this post


Link to post
Share on other sites
j0kky

Run ; <---- CLICK ME PLEASE

Just click on the link!

[optional] Controls various options related to how the parent and child process interact.
    0x1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream
    0x2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream
    0x4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream
    0x8 ($STDERR_MERGED) = Provides the same handle for STDOUT and STDERR. Implies both $STDOUT_CHILD and $STDERR_CHILD.
    0x10 ($STDIO_INHERIT_PARENT) = Provide the child with the parent's STDIO streams. This flag can not be combined with any other STDIO flag. This flag is only useful when the parent is compiled as a Console application.
    0x10000 ($RUN_CREATE_NEW_CONSOLE) = The child console process should be created with it's own window instead of using the parent's window. This flag is only useful when the parent is compiled as a Console application.
Edited by j0kky

Share this post


Link to post
Share on other sites
MikahS

From using it I would assume that the opt_flag is zero and that there is no interaction between the parent and child processes, meaning you get no feedback from the process you ran other than the PID.

Really not that hard to test.

 

Run ; <---- CLICK ME PLEASE

Just click on the link!

They have given you the answer :)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
ricky

@j0kky : I click 2 times to your link. But it arrives on the manual, but the default value is not mentionned.

If you have a better information (not seen by my eyes), please give me the information and not a link!

Thanks for your help.

Share this post


Link to post
Share on other sites
MikahS

@ricky03 brewman gave you the answer bud. It's zero. see post >#6


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
ricky

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

×