scythetleppo Posted June 15, 2006 Share Posted June 15, 2006 How can this be done? Echoing off turns the echo off but there's still a black window. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 15, 2006 Moderators Share Posted June 15, 2006 How can this be done? Echoing off turns the echo off but there's still a black window.Use @SW_HIDE as the flag for the run command, like so. Run("filename", "", @SW_HIDE) Link to comment Share on other sites More sharing options...
NELyon Posted June 15, 2006 Share Posted June 15, 2006 i thought run could only run .exe's and .com file. i didn't know it could to .bat Link to comment Share on other sites More sharing options...
scythetleppo Posted June 16, 2006 Author Share Posted June 16, 2006 ok yeah that does work but now I have another problem. Now that the window is hidden, this doesn't work: Run ( "C:\temp.bat", "", @SW_HIDE) WinWaitActive ( "Installing" ) WinActivate ( "Installing" ) Sleep ( 500 ) Send ( "1" ) Sleep ( 500 ) Send ( "{ENTER}" ) Sleep ( 500 ) because it never becomes active. any ideas on how to send it 1 and then enter like that? Link to comment Share on other sites More sharing options...
scythetleppo Posted June 16, 2006 Author Share Posted June 16, 2006 anyone? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 16, 2006 Moderators Share Posted June 16, 2006 (edited) anyone?Why not just try If WinExists()? And use ControlSend() rather than Send() Edited June 16, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MHz Posted June 16, 2006 Share Posted June 16, 2006 What are you Sending to? Using WinWaitActive before WinActivate is going to accomplish little as WinWaitActive is waiting for the window to be active. This may help WinWait( "Installing" ) If Not WinActive( "Installing" ) Then WinActivate ( "Installing" ) EndIf WinWaitActive ( "Installing" ) Link to comment Share on other sites More sharing options...
new2autoit Posted June 16, 2006 Share Posted June 16, 2006 (edited) Hello Everyone !scythetleppo, what OS are you running? I looked at your code and try this to exit the black screen in the back. I don't think you can hide it because if you do then the "WinWaitActive" is never going to execute. Try this to exit the background. Also you might want to read thisdim $root run("cmd") $root= EnvGet("systemroot") Send("{space}") ;exits cmd send( "chdir /d" & $root & "{enter}" & "cd \ {enter}" & "test.bat {enter} exit {enter}" ) ;use your winwaitactive here. Hopefully it worksHope it works. Edited June 16, 2006 by new2autoit 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