Jump to content

Recommended Posts

Posted

I'm trying to close a calculator window and I've tried a half a dozen different ways using class and various title/text combinations, nothing seems to work.

Here are a few of the things I've tried *with and without #requireadmin*

Run("Calc")

WinClose("Calculator")

Run("Calc")

WinClose("Calculator", "0")

Run("Calc")

WinClose("Calculator", "")

Run("Calc")

WinClose("[class:CalcFrame]")

Run("Calc")

WinClose("[CLASS:#32770; INSTANCE:1]")

I suppose I could try other methods like PID and other things that I've seen in the help file but I want to find out what I'm doing wrong here. Any suggestions ?

Any help would be much appreciated. I'm running windows 7.

Posted

Use WinWait to give it a chance to open before the close command.

Run("calc")
WinWait("Calculator")
WinClose("Calculator")
GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Posted

  On 7/18/2010 at 10:04 PM, 'sleepydvdr said:

Windows' calculator isn't actually a window, is it? It's an executable. How about using ProcessClose?

wat
Posted

I ran:

$wTitle = "Calculator"
WinClose($wTitle)

And the calculator closed just fine for me. Windows Vista, administrator account and UAC is off. For what that's worth to you.

Posted

The mistake in dierpepsi's script was that it tried to close the calculator window before it was opened.

Yoriz's solution works just fine

Posted

  On 7/18/2010 at 10:32 PM, 'Info said:

The mistake in dierpepsi's script was that it tried to close the calculator window before it was opened.

Yoriz's solution works just fine

:blink: I should have known that. Thank you guys for the help.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...