Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ungrayed ungreyed
e.g., When I execute a menu option that loads a report in a document window, as long as that data is loading, the close button, "X", in the upper right corner remains greyed out. When the load has finished, the button is painted black.
How can I set Winbatch up to wait for the close button to change from grey, (waiting), to black, (ready).
To wait for the application close box to ungray...
while 1 SCCLOSE=61536 MFBYCOMMAND=0 hwnd=DllHwnd("WinBatch Studio") ;Window Title of desired window goes here sysmenu=DllCall(strcat(DirWindows(1),"USER32.DLL"),long:"GetSystemMenu",long:hwnd,long:0) rslt=DllCall(strcat(DirWindows(1),"USER32.DLL"),long:"GetMenuState",long:sysmenu,long:SCCLOSE,long:MFBYCOMMAND) if (rslt & 1) == 0 then break ; item no longer grayed TimeDelay(2) ; wait somemore endwhile Message("Close box","no longer grayed")
Article ID: W13375
Filename: Recognize when a Windows Close Box has Ungrayed.txt
File Created: 2001:01:08:12:19:02
Last Updated: 2001:01:08:12:19:02