SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Dynamic Handling of Dialog Box

    I was using the following function that dynamically closes any window

    Dim Hwnd,lResult,buttonCode
    Const WM_COMMAND = 273 'Converted to decimal from &H111 to avoid QTP syntax error
    Extern.Declare micLong, "PostMessage", "user32.dll", "PostMessageA", micHwnd, micLong, micLong, micLong

    windowTitle ="Microsoft Internet Explorer" 'change it for different dialog box
    buttonCode = 1 '
    Hwnd = extern.FindWindowEx(0,0,vbNullString, windowTitle)
    'MsgBox Hwnd
    lResult = extern.PostMessage(Hwnd, WM_COMMAND, buttonCode, 0)

    Not sure where it is going wrong, I am unable to close any opened dialog with the above code. Please suggest where am I going wrong
    Thanks,
    Mahesh Dasari

  2. #2
    Member
    Join Date
    Aug 2007
    Posts
    238
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    I would choose a different way to handle this.

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    Please let me know how to handle this

    Thanks in Advance
    Mahesh Dasari
    Thanks,
    Mahesh Dasari

  4. #4
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    [ QUOTE ]
    I would choose a different way to handle this.

    [/ QUOTE ]
    Yes, then how would you handle it? "Content free" replies this are not helpful and should be avoided.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    210
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    You need to figure out what does not work. Are you getting a Window handle id (Hwdw)? Are you using a correct button code?

    Igor

  6. #6
    Member
    Join Date
    Dec 2007
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    I could able to rectify the above, Please let me know how to get the text of Dialog like "Please enter name" or so

    Thanks in Advance
    Mahesh Dasari
    Thanks,
    Mahesh Dasari

  7. #7
    Member
    Join Date
    Dec 2007
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    Is there a way to get Dialog box text with the above mentioned way ?

    Please suggest

    Thanks in Advance,
    Mahesh Dasari
    Thanks,
    Mahesh Dasari

  8. #8
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    You mean through APIs? If yes the look at FindWindowEx API in MSDN.

  9. #9
    Member
    Join Date
    Dec 2007
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    Tarun,
    I checked in API of MSDN, but not getting exact answer. Can you please quickly provide the solution for this.
    Thanks,
    Mahesh Dasari

  10. #10
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Handling of Dialog Box

    Give your problem statement again on what you need exactly?

 

 
Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:16 AM.

Copyright BetaSoft Inc.