SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    GetChildren method

    I am working with the VB application. There are some labels at the window which I want to verify are enabled or disabled. I want to get each label in the window using the GetChildren method and then to verify if they are enabled. Is there any of the easiest way? I tried somethinng like that but labels are not printing out:
    [ ] lsDecs = ExtensionOfCreditParalend.GetChildren()

    [-] for each wWin in lsDecs
    [-] if wWin.class==VBLabel
    [ ] ListAppend (lsLinks, wWin)
    [ ] print (wWin)


    thank you for any advise.

  2. #2
    Senior Member
    Join Date
    Dec 2001
    Location
    Boston,MA, USA
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetChildren method

    look up the IsOfClass() function in the help and use instead of <font class="small">Code:</font><hr /><pre>if wWin.class==VBLabel </pre><hr />
    -Shree

    *************************************************
    The more I learn, the more I realize how little I know!

  3. #3
    Senior Member
    Join Date
    Dec 2001
    Location
    Boston,MA, USA
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetChildren method

    forgot to add one more thing - when you add a code snippet to your post, please use the [ code ] [ /code ] tags to preserve formatting. It is hard to discern how your code looks if the posting does not maintain indentation.

    Also, dont you want to print(lslinks) instead of wWin?
    -Shree

    *************************************************
    The more I learn, the more I realize how little I know!

  4. #4
    Senior Member
    Join Date
    Apr 2006
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetChildren method

    The more optimized (by speed) way is:
    <font class="small">Code:</font><hr /><pre>
    [ ] INTEGER i=1
    [ ] lsLinks = {}
    [ ]
    [+] while( ExtensionOfCreditParalend.AnyWin("[VBLabel]#{i}").Exists() )
    [ ] ListAppend(lsLinks,ExtensionOfCreditParalend.AnyWi n("[VBLabel]#{i}"))
    [ ] Print(ExtensionOfCreditParalend.AnyWin("[VBLabel]#{i}"))
    [ ] // Here you may check is this window is enabled
    [ ] i++
    </pre><hr />

 

 

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 04:21 PM.

Copyright BetaSoft Inc.