Link to home
Start Free TrialLog in
Avatar of s_raj93
s_raj93Flag for India

asked on

In gmail windows , when click on 'compose' button. a New message opens. my queston is what is called that windows. either modal window, or child windows or other etc

I am writing a program in python for finding the windows handle but through this code I am unable to find handle for dialog box (which opens in same windows like gmail compose window)


import win32gui
import win32con
import time
import subprocess
hwnd = 528728
buffer = ''
def all_ok(hwnd,param):
    print hwnd
    return True
def find_windows(starttext):
    win32gui.EnumChildWindows(hwnd,all_ok,None)
def find_forground_win():
    win = win32gui.GetForegroundWindow()
    hwnd = win
    print hwnd
    global hwnd
def find_parent_windows(title):
    print hwnd
    win = win32gui.GetWindowText(hwnd)
    #control_id = win32gui.GetDlgCtrlID(hwnd)
    #print control_id
    #dialog_id = win32gui.GetDlgItemText(hwnd,win32con.WM_GETTEXT)
    #dialog_id = win32gui.GetDlgItem(hwnd,0)
    #print dialog_id
    print win
def main():
    find_forground_win()
    find_windows('')
    find_parent_windows('')
while True:
    main()
    time.sleep(5)
Avatar of mrwad99
mrwad99
Flag of United Kingdom of Great Britain and Northern Ireland image

Gmail within a browser doesn't use standard Windows controls, so the compose window you see doesn't have a 'handle' as such.  Instead, the *illusion of a window* is given by clever use of Javascript or similar scripting language.

Similarly, all the push buttons, radio buttons and text boxes you see on web pages are not controls, they are actually bitmaps designed to look the same as Windows controls.
Avatar of s_raj93

ASKER

i had asked what is called called opened window in gmail compose. u guys will not give proper answer, I think answer is given by Robot.
ASKER CERTIFIED SOLUTION
Avatar of mrwad99
mrwad99
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of s_raj93

ASKER

Thanks , i got your point.
Avatar of s_raj93

ASKER

Thanks so much. i understood.