Results 1 to 4 of 4

Thread: Dynamic Parent

  1. #1

    Dynamic Parent

    I have a window that can be invoke two different ways, and each ways has a different parent tag? How can i have to parent tag change dynamically at runtime, i have tried getparent() it was a failure.
    N+ CNA

  2. #2

    Re: Dynamic Parent

    Can you show us the two tags?

    The simplest ways to do it are:

    1. Replace the tag with a function call. Have the function determine which parent to supply based on context.

    2. Prefix the tag with ActiveApp~. In this form the parent window won't matter - anything will match.


  3. #3

    Re: Dynamic Parent

    I have tried the "~ActiveApp/" tag and that was a faliure, don't know why it would fail but it didn't like it at all.

    every time i put a funciton call in the parent tag i get syntx error???

    parent GetActiveParent();

    the two tags are:
    /[VBMDIForm]MAX - ?2003 Return Manager?

    /[VBMDIForm]MAX - ?2003 Return Manager?

    the same i know but the parent tag is differnt for each


    MAX // Name of the AUT
    N+ CNA

  4. #4
    Senior Member
    Join Date
    Nov 1999
    Eagle, ID,USA

    Re: Dynamic Parent

    I've used the following for years with much success. Just use wAnyParent as the parent when a dialog has more than one parent:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    [-] window AnyWin wAnyParent
    [ ] tag GetCurrentParent ()
    [ ]
    [-] STRING GetCurrentParent ()
    [ ] STRING sTheParentTag
    [ ] BOOLEAN bOrigOptVerifyActive
    [ ] sTheParentTag = &quot;&quot;
    [-] do
    [ ] sleep (0.5)
    [ ] sTheParentTag = wnd_GetParent (wnd_GetActive ())
    [-] except
    [ ] sTheParentTag = &quot;*&quot;
    [ ] return (sTheParentTag)
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:49 PM.

Copyright BetaSoft Inc.