SPONSORS:






User Tag List

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

    Descriptive programming + scope

    Hello collegues,

    I encountered following ennoying problem.
    I created an object repository myself -based on a lecture about pro's and cons about shared OR- with the Description.Create() statements.
    I put all my objects in one action.
    Then I would access one of the created objects

    for example: Browser(brBrowser).Exist

    Then my script failed with the very "clear message".
    "Script failed due to unknown error".

    So it seems that I cannot access the previous created objects in another action?

    I hope that my thoughts are not true otherwise I'm in big problems....

    So please has somebody encountered the same problem.
    If yes, how did you solved it?
    If no, do you tips, tricks so that I can use my created objects over the actions.

  2. #2
    Junior Member
    Join Date
    Sep 2004
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive programming + scope

    You can source out your descriptions in a .vbs file.
    Then it is possible to add this file as a library to your action.

    Test --> Settings --> Resources --> Associated library files:

    Now your descriptions are available in your action.

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive programming + scope

    funny, i have the same problem today.
    I have a .vbs file, which is included in the library.

    I have had:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Public Desktop
    Public TM

    Set TM= JavaWindow(&quot;Label:=TM- Version.*&quot
    Set Desktop = JavaWindow(&quot;Label:=TM - Version.*&quot.JavaButton(&quot;Label:=Desktop&quot</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I hoped that i can use this objects in my action.
    The TM.Exist is true, the Desktop.Exist is false. In case a ask this in the vbs, all is true.

    After this i tried to define a class in the vbs file. When i call it in a action, QT is telling me i have my class not defined.


    Whats wrong with my VBS? Mercury told me to use registry... but this i will not do. Thats... ugly ;-)

    do you have suggestions for this?
    Cheers
    Chris

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive programming + scope

    Don;t think its your VBS Chris I think it may be the values not the names in your name:value pairs in the Desktop statement, double-check these with the object spy.

    On another note as you have already defined TM why not define your objects as follows:

    Set TM= JavaWindow("Label:=TM- Version.*")
    Set Desktop = TM.JavaButton("Label:=Desktop")

    Mark Smith.

  5. #5
    Junior Member
    Join Date
    Oct 2004
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Descriptive programming + scope

    Ah thanks for the tip-
    my propertys where ok, but "Desktop" seems to be a reserved word or something like that. Now it works- just had to change the variable name.

    this was very expensiv [img]images/icons/frown.gif[/img] i had a long-time search.

    Thanx + cheers
    chris

 

 

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 11:45 AM.

Copyright BetaSoft Inc.