SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Mar 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    3,628
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Can I grab all property/value pairs for an object?

    Just wondering if I'm able to grab all the property/value pairs for a given object in VBScript? I know I can use find if I have the property name, but what if I don't? I'd really like to grab realtime snapshots of the properties if that's at all possible.

    Thank in advance.
    Brent
    --------------------
    9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.
    --------------------

  2. #2
    Moderator tristaanogre's Avatar
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA
    Posts
    1,792
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can I grab all property/value pairs for an object?

    Try "Objects.Save".

    For example, if my process P has a window named MainForm, I can call (in DelphiScript)

    Objects.Save(P.VCLObject('MainForm'), 'MyMainForm');

    This will save all properties of MainForm to a Stores.Object called "MyMainForm". I can then reference it later in script code as

    Objects.MyMainForm

    At least, that's the theory... I haven't tried it myself yet but that's the way I udnerstand it should work.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  3. #3
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can I grab all property/value pairs for an object?

    Hi Brent,

    Also, you can enumerate all property names and values of an object by using the aqObject.GetProperties method. There's a sample script in the "aqObject.GetProperties" help topic.
    Jared - AQA Support

  4. #4
    Senior Member
    Join Date
    Mar 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    3,628
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can I grab all property/value pairs for an object?

    Cool, thanks Robert, I never thought of doing it that way, actually.

    I was actually trying to get it how Jared is suggesting. So, thanks, Jared, that's awesome!

    That's at least put me on the right track. I really just have to worry about a couple little issues here and there and I think that would work.

    Hmmmmm, now I don't know which way to go, which to use, lol. That's alright, though, it's like an embarassment of riches when that happens [img]/images/graemlins/smile.gif[/img]
    Brent
    --------------------
    9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.
    --------------------

 

 

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 7.14%
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 05:43 AM.

Copyright BetaSoft Inc.