Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted (edited)

anyone?

Why not just try If WinExists()? And use ControlSend() rather than Send() Edited 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.

Posted (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 this

dim $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 works

Hope it works. :D

Edited by new2autoit

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