roofninja Posted December 10, 2013 Share Posted December 10, 2013 I have a question about @SW_LOCK . The description says "Lock the window to avoid repainting." What does repainting mean here? RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share Posted December 10, 2013 As in redrawing the object on your screen. When you have a lot of items on a control, such as a ListBox or ListView, this can considerably speed things up. Link to comment Share on other sites More sharing options...
roofninja Posted December 10, 2013 Author Share Posted December 10, 2013 so if I have a dos box and I the next command is from a dos box, this will do both commands in the same dos box? RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share Posted December 10, 2013 (edited) No. Are you are looking to issue multiple commands from a single console window? Edited December 10, 2013 by Wruck Link to comment Share on other sites More sharing options...
roofninja Posted December 10, 2013 Author Share Posted December 10, 2013 I'm using the Comspec to issue 3 commands but I would like them all to be in a single window and also to show the command that I am exiquting. RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!! Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share Posted December 10, 2013 (edited) Try something like this and let me know..? Global $strFileName = @TempDir & '\TempFile.bat' ; Declare temp file name Global $hdlFileName = FileOpen($strFileName, 2) ; Open handle to file FileWriteLine($hdlFileName, '@ECHO ON') ; Batch function to show input commands FileWriteLine($hdlFileName, 'TYPE %Temp%\TempFile.bat') ; First Command FileWriteLine($hdlFileName, 'DIR /AD') ; Second Command FileWriteLine($hdlFileName, 'ECHO TestTypeCommand') ; Third Command FileClose($hdlFileName) ; Close the active handle Run(@ComSpec & ' /c ' & $strFileName, @TempDir, @SW_SHOW) ; Do stuff FileDelete($strFileName) ; Cleanup batch file EDIT: Changed posted code to have Run execute based off of declared file name, rather than hard code. EDIT: Also changed the FileDelete to use declared file name. Edited December 10, 2013 by Wruck Link to comment Share on other sites More sharing options...
Gianni Posted December 10, 2013 Share Posted December 10, 2013 also, you can "concatenate" more dos commands in one line by using the & in between of them example 3 commands in one line: cls & dir & ipconfig Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... 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