Sign in to follow this  
Followers 0
roofninja

@SW_LOCK

7 posts in this topic

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 !!!

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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 !!!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

No. Are you are looking to issue multiple commands from a single console window?

Edited by Wruck

Share this post


Link to post
Share on other sites

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 !!!

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Wruck

Share this post


Link to post
Share on other sites

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


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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