Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

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
Posted

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

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
×
×
  • Create New...