Sign in to follow this  
Followers 0
jojosgotmojo

Window close then power off

12 posts in this topic

Ok so i'm downloading something from the net and i want my pc to power off when its finished so i was wondering will this do or will it need more

If WinClose ( "Downloads" )
    then shutdown(9)
EndIf

If WinActive ( "Downloads" )
    then sleep( 10000 )
EndIf

Share this post


Link to post
Share on other sites



Ok so i'm downloading something from the net and i want my pc to power off when its finished so i was wondering will this do or will it need more

If WinClose ( "Downloads" )
    then shutdown(9)
EndIf

If WinActive ( "Downloads" )
    then sleep( 10000 )
EndIf
If Not WinExists() Then

Shutdown(8+1)

EndIf


When the words fail... music speaks

Share this post


Link to post
Share on other sites

If Not WinExists() Then

Shutdown(8+1)

EndIf

Will that shutdown pc and turn off once download is finished?

Share this post


Link to post
Share on other sites

Will that shutdown pc and turn off once download is finished?

Put them in a while loop and set parameters for WinExists.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Put them in a while loop and set parameters for WinExists.

Yeah prolly should note: IM A VB NOOB!

Share this post


Link to post
Share on other sites

Yeah prolly should note: IM A VB NOOB!

VB ?

Share this post


Link to post
Share on other sites

Visual Basic, isnt that what the main scripting auto it uses?

Share this post


Link to post
Share on other sites

I use Firefox and this is the window that appear when I download something.

When this window doesn't exist then download process is finished.

You can check with WinExists if that window exists or not.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

im confused can u pls just speak like ur speaking to an asian man, slowly and with simple words. Well im using safari atm and the window is called downloads

any better?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Visual Basic, isnt that what the main scripting auto it uses?

If I understand your question correctly you mean that AutoIt is written in VB?

It is written in C++, but the Syntax from AutoIt is like VB.

Use the Code from Andreik:

While 1
If Not WinExists("downloads") Then
Shutdown(8+1)
EndIf
Wend
Edited by bluelamp

Share this post


Link to post
Share on other sites

ok so thats all i need? just making sure

Share this post


Link to post
Share on other sites

ok so thats all i need? just making sure

If you cannot understand me (I`m not a very english speaker), you can look in the help file to give you some details about doing things.


When the words fail... music speaks

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