HighGuy Posted July 22, 2005 Share Posted July 22, 2005 Is there a default value for the standard_i/o_flag in Run()? If I set it to -1 then some Run()-commands fail to start. Do I set it to 0 everything works fine. For example: Run(@ComSpec, "", @SW_MAXIMIZE, -1) Of course, this is only an optional parameter, but I need to specify a default value for it if I use some kind of MyRun() wrapper function. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 22, 2005 Share Posted July 22, 2005 I would suggest selecting one of the values from the help:standard_i/o_flag [optional]Provide a meaningful handle to one or more STD I/O streams of the child process. 1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream 2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream 4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
DaveF Posted July 22, 2005 Share Posted July 22, 2005 Is there a default value for the standard_i/o_flag in Run()?It's an optional parameter, so if you want the default behavior (no input or output redirected) don't provide an argument at all. Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
SlimShady Posted July 22, 2005 Share Posted July 22, 2005 As an addition to what the people above me said.Here's an example how I do it.Func GlobalVarsDelete($VarName = '', $Section = 'Other') If $VarName = '' Then Return INIDelete(@TempDir & '\GlobalVars.ini', $Section) Else Return INIDelete(@TempDir & '\GlobalVars.ini', $Section, $VarName) EndIf EndFuncYou can change $VarName = '' to $VarName = Default (should work). Link to comment Share on other sites More sharing options...
DaveF Posted July 23, 2005 Share Posted July 23, 2005 We called that a "mave" back when I played MUD games, Slim. Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
quaizywabbit Posted July 23, 2005 Share Posted July 23, 2005 (edited) Of course, this is only an optional parameter, but I need to specify a default value for it if I use some kind of MyRun() wrapper function.Optional UDF parameter variables are usually set to 0 ( i.e. $IOFlags = 0)so long as 0 wouldn't be a valid input for that parameter. Edited July 23, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now