?
Solved

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

Posted on 2014-12-26
5
Medium Priority
?
257 Views
Last Modified: 2014-12-26
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)
0
Comment
Question by:s_raj93
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:mrwad99
ID: 40518514
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.
0
 

Author Comment

by:s_raj93
ID: 40518602
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.
0
 
LVL 19

Accepted Solution

by:
mrwad99 earned 1000 total points
ID: 40518922
No, the answer was not given by a robot.  It was given by myself, a software engineer who has tried to do pretty much the same thing as you (except using C++) - getting handles to controls on web pages.

I say again: the compose window is not a "window", it is the illusion of a window provided by Javascript or other scripting.  You cannot get a window handle to it (the type you are looking for is a Win32 opaque data structure called a HWND) because *it is not a window* !
0
 

Author Comment

by:s_raj93
ID: 40519274
Thanks , i got your point.
0
 

Author Closing Comment

by:s_raj93
ID: 40519275
Thanks so much. i understood.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question