JLC123 Posted November 9, 2004 Share Posted November 9, 2004 OK, making good progress, but I hit a wall! Here's what I need to do, but can't figure out: I need an inputbox where the user will enter a desired number, that number needs to be passed to a batch file as the desired switch. i.e. dothis.bat 123 where 123 is the value entered by the user. Make sense? I hope so, cuz I'm getting a headache. Two wrongs don't make a right, but three lefts do Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted November 9, 2004 Share Posted November 9, 2004 You want to edit a DOS file and add 123 to it? Link to comment Share on other sites More sharing options...
JLC123 Posted November 9, 2004 Author Share Posted November 9, 2004 No, the 123 is a switch (actually a variable) required by the batch file I'm calling. the syntax of the batch file is dothis.bat ???? - I need the user to give me the ???? Two wrongs don't make a right, but three lefts do Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted November 9, 2004 Share Posted November 9, 2004 I don't understand, sorry. Link to comment Share on other sites More sharing options...
JerryD Posted November 9, 2004 Share Posted November 9, 2004 OK, making good progress, but I hit a wall! Here's what I need to do, but can't figure out:I need an inputbox where the user will enter a desired number, that number needs to be passed to a batch file as the desired switch. i.e. dothis.bat 123 where 123 is the value entered by the user. Make sense? I hope so, cuz I'm getting a headache.<{POST_SNAPBACK}> Why don't you use the commands the batch file uses within the AutoIT script? If the batch file is looking for a paramater on the command line, it will appear as %1 in the batch file. If the batch file says:command1 %1command2 %1use $Ret = InputBox( "title", "Prompt") to get the user's input, then use RunWait like this:RunWait ( @ComSpec & " /c path\command1 " & $Ret, path, @SW_HIDE )RunWait ( @ComSpec & " /c path\command2 " & $Ret, path, @SW_HIDE )and you won't get any DOS box flashing or appearing on the task bar. Link to comment Share on other sites More sharing options...
JLC123 Posted November 9, 2004 Author Share Posted November 9, 2004 Thanks! Headache's gone now. Two wrongs don't make a right, but three lefts do 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