Sign in to follow this  
Followers 0

auto close program

8 posts in this topic

Posted

Hi... Today, I want make code auto close other program (example: yahoo!messenger) but I can't find it. Any body know it, help me plz.

Thanks

Share this post


Link to post
Share on other sites



Posted

The function you're looking for is ProcessClose or WinClose. Don't be shy to consult the help file for these issues.

Share this post


Link to post
Share on other sites

Posted (edited)

Hi... Today, I want make code auto close other program (example: yahoo!messenger) but I can't find it. Any body know it, help me plz.

Thanks

First try to read the help file before posting the questions. Any way i think below will help you a little

]
if ProcessExists("iexplore.exe") Then
	ProcessClose("iexplore.exe")
EndIf

Assuming Program as Process

Edited by Mecrazycoder

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks

But I want it close after 1hour 15minutes

Edited by BlackCat

Share this post


Link to post
Share on other sites

Posted

Sleep(4500000)
If ProcessExists("iexplore.exe") Then
    ProcessClose("iexplore.exe")
EndIf

Share this post


Link to post
Share on other sites

Posted

Sleep(4500000)
If ProcessExists("iexplore.exe") Then
    ProcessClose("iexplore.exe")
EndIf

Can you show an example that don't freezes the script?

I mean like asycronous timeout to a window.

Share this post


Link to post
Share on other sites

Posted (edited)

The year is 2014! Don't necro old threads please.

Edited by guinness

Share this post


Link to post
Share on other sites

Posted


AdlibRegister('close', 4500000) ; run func every 1h 15m

; your code here
While 1
	; or here
	ConsoleWrite('.')
	Sleep(1000)
WEnd

Func close()
	AdlibUnRegister('close') ; unregister func so it won't close program after next 1h 15m
	If ProcessExists("iexplore.exe") Then
		ProcessClose("iexplore.exe")
	EndIf
EndFunc

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