PrgSkidmark Posted January 19, 2006 Posted January 19, 2006 I am trying to get the statusbar text in Mozilla Thunderbird so I know when it's "Loading Message". Right now I'm using Sleep, and some messages are so long that it starts hitting menus. Then my script is thrown off. This is what I have expandcollapse popupIf WinWaitActive("Advance", "", 2) Then $AdvWinTitle = WinGetTitle("Advance") If (StringInStr($AdvWinTitle, "Inbox") = 1) Then $CurHome = "Inbox" Else $CurHome = StringMid($AdvWinTitle, StringLen($AdvWinTitle)-4, 4) EndIf Send("{ENTER}") _FileWriteLog("proclog.txt", "Moving to folder " & $CurHome) ; increase this sleep time for lag Sleep(4000) Send("^o") ; increase this sleep time for lag Sleep(4000) $CurWinTitle = WinGetTitle("") Else If WinExists("Advance") Then WinActivate("Advance") $AdvWinTitle = WinGetTitle("Advance") If (StringInStr($AdvWinTitle, "Inbox") = 1) Then $CurHome = "Inbox" Else $CurHome = StringMid($AdvWinTitle, StringLen($AdvWinTitle)-4, 4) EndIf Send("{ENTER}") _FileWriteLog("proclog.txt", "Moving to folder " & $CurHome) ; increase this sleep time for lag Sleep(4000) Send("^o") ; increase this sleep time for lag Sleep(4000) $CurWinTitle = WinGetTitle("") Else ; Emails without a home $CurHome = "Inbox" ExitLoop EndIf EndIf
PrgSkidmark Posted January 19, 2006 Author Posted January 19, 2006 After Reading the post about the Firefox statusbar, I decided to use the PixelCheckSum on the status bar Opt( "WinTitleMatchMode", 2 ) Opt('MouseCoordMode', 2) Opt('PixelCoordMode', 2) $MozWindowSize = WinGetClientSize("Inbox - Thunderbird") $MozClientHeight = $MozWindowSize[1] $MozStatusBarTop = $MozClientHeight - 18 $MozStatusBarBottom = $MozStatusBarTop + 16 While 1 Sleep(250) Local $CheckSum = PixelChecksum(30, $MozStatusBarTop, 130, $MozStatusBarBottom) _FileWriteLog("c:\proclog.txt", $CheckSum) WEnd After letting it go for awhile I can see that "891663552" is "Loading Message" 2006-01-19 14:10:05 : 1991130957 2006-01-19 14:10:05 : 1991130957 2006-01-19 14:10:06 : 1991130957 2006-01-19 14:10:06 : 1991130957 2006-01-19 14:10:06 : 1991130957 2006-01-19 14:10:07 : 891663552 2006-01-19 14:10:07 : 891663552 2006-01-19 14:10:07 : 891663552 2006-01-19 14:10:07 : 891663552 2006-01-19 14:10:08 : 891663552 2006-01-19 14:10:08 : 891663552 2006-01-19 14:10:08 : 891663552 2006-01-19 14:10:08 : 891663552 2006-01-19 14:10:09 : 891663552 2006-01-19 14:10:09 : 1991130957 2006-01-19 14:10:09 : 1991130957 2006-01-19 14:10:09 : 1991130957 2006-01-19 14:10:10 : 1991130957 2006-01-19 14:10:10 : 1991130957 Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now