For the MacOS X side; as far as I know you'll have to use the Accessability API. You can also do this via AppleScript/AppleEvents. In either case, the user will have to manually enable "Allow Access for Assistive Devices" in the Accessability system prefs.
I have used this system to obtain a list of window names for each open program and bring a selected window to the front. But I did it with AppleScript so performance was less than stellar as far as updating the list of window names. A few of these reference pages may help; http://developer.apple.com/documentation/UserExperience/Accessibility-date.html Hope that helps, ~ Tomis --- GregO <[EMAIL PROTECTED]> wrote: > I'm trying to get the name of the frontmost window of the frontmost > application in Windows and Mac OS X. So far, I am fighting with the > Windows side. Can anyone tell me why the following doesn't work? > > Declare function GetForegroundWindow Lib "user32.dll" As Integer > Soft Declare Function GetWindowTextA Lib "User32" ( hwnd As > Integer, lpString As PString, nMaxCount as integer ) as Integer > Soft Declare Function GetWindowTextW Lib "User32" ( hwnd As > Integer, lpString As PString, nMaxCount as integer ) as Integer > Try > maxlen = GetWindowTextW(GetForegroundWindow(),str,255) > Catch > maxlen = GetWindowTextA(GetForegroundWindow(),str,255) > End > > I get the correct maxlen, but the name is not returned in the str > variable. > > Greg > > P.S. - If anyone has an idea about how to get it on Mac OS X that > would be cool too! > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
