Jump to content

How to know when none of the windows active?


Recommended Posts

Hey all, first let me say i'm sorry if this has been answered a thousand times, I looked and could not find the help I was looking for.

All i was trying to do is to show some system information as tool tip near the mouse pointer.one of those informations is what window we are looking at.The script is working fine as long as some window is active,the moment i minimize all the window the tool tip starts increasing in size yet it dont tell me what exactly i am looking at.[it should be desktop].

i'm sure you'll have an idea once you take a look at the code..so here it is

==================================================================================================

#include <Date.au3>

While 1

$sShortDayName = _DateDayOfWeek( @WDAY, 1 )

$sJulDate = _DateToDayValue (@YEAR, @MON, @MDAY)

$title=WinGetTitle("")

$pos=MouseGetPos()

$mem=MemGetStats()

sleep(10)

If $title <> "" Then

ToolTip($pos[0] & "," & $pos[1] & @CRLF & "Free Memory : " & $mem[2]*100/$mem[1] & " %"& @CRLF & $sShortDayName & " (" & _DateTimeFormat( _NowCalc(),0) & ")" & @CRLF & "You are looking at : " & $title,$pos[0]+10,$pos[1]+10)

Else

ToolTip($pos[0] & "," & $pos[1] & @CRLF & "Free Memory : " & $mem[2]*100/$mem[1] & " %"& @CRLF & $sShortDayName & " (" & _DateTimeFormat( _NowCalc(),0) & ")",$pos[0]+10,$pos[1]+10)

EndIf

WEnd

====================================================================================================

Thnx a mil for any help that i can get ...

1.au3

Link to comment
Share on other sites

Thnx.. for the Super fast reply .. it's really the best thing about this community. ;) I'm using vista.probably I should try the script on my work machine to figure out whether it works in XP.But at least now I have an idea that it works in Win 7.

[Cant afford Win 7 right now :P]

Thnx once more.

Link to comment
Share on other sites

I managed to get Windows 7 for $10 through MSI ;) anyways, I'd say just try messing with different values or something... like some different format, and it may help somehow. I've noticed, in testing scripts that between windows xp and Vista there was differences in line break formatting, and stuff. I dunno, I'm kinda rambling now

But there's definitely differences between OS's

We ought not to misbehave, but we should look as though we could.

Link to comment
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
 Share

  • Recently Browsing   0 members

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