SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Getting Text from StatusBar VB6 in -- help please

    Hi-- I'm new on here but Have looked on this forum about this topic. I can't seem to get mine to work.

    In my object.vbs file where all objects are created and properties are set, I have:

    Set Lablename = description.Create()
    Lablename("progid").value = "MSComctlLib.SBarCtrl.2"
    Lablename("vbname").value = "stbStatus"

    I'm trying to get the text out of my statusbar and put it into a variable.

    What I been using or tried a lot of ways but I'm thinking this is somewhere down the lines of where I should be:

    Dim statusbar
    Call Lablename("stbStatus")
    Set statusbar = .ActiveX(Lablename/stbStatus).GetVisibleText

    And I'm not sure where I should go with this. I am new with vb6 and have been doing just fine but one thing I noticed when I was using object spy on this window was it did not have a vbname. CAn anyone be of any help? I would really appreciate it.
    I am also using Windows 7 ( i read somewhere that the GetVisibleTExt may not work but can someone correct me if so -- I've even tried doing in XP, still nothing works.)
    THanks---

  2. #2
    Member
    Join Date
    Jan 2008
    Posts
    284
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    Browser("B").Page("P").Link("L").FireEvent "onfocus"
    MsgBox Browser("B").Object.StatusText

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    This didn't work... :/

    I've also tried this as was told by my automation expert but it didn't work as well.

    Call D_Dialog("Attorneys")
    With Dialog(Dlg_Generic)
    Call lablenm("pnlStatus")
    New1 = .ActiveX(lablename1).GetVisibleText()
    Print New1
    End With


    what do you think? Any ideas what's causing these failures? Maybe windows 7, but I'm even trying on windows xp.

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    The script does work in XP. Thank you Jyoo!

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    Jyoo ( or anyone who can answer this)

    should this work in Windows 7 if I used this? B/c I can't get it to work... [img]/images/graemlins/frown.gif[/img]

    I don't know what to use to get the status bar text to read.
    I've tried using the GetROProperty()-- maybe I need to pass in something correctly??

    I'm noob. still learning. =(
    any more help will be appreciated.
    Thanks again all-

  6. #6
    Advanced Member Anshoo Arora's Avatar
    Join Date
    Oct 2007
    Location
    New Delhi, India
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    foodMe: What is the current code that you have executed? It seems like the code provided to you and what you mentioned in your reply are different..
    Regards,

    Anshoo Arora
    Relevant Codes

  7. #7
    Junior Member
    Join Date
    Mar 2010
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting Text from StatusBar VB6 in -- help please

    This is the code that I have working in XP.
    Call D_Dialog("Attorneys")
    With Dialog(Dlg_Generic)
    Call lablenm("pnlStatus")
    New1 = .ActiveX(lablename1).GetVisibleText()
    Print New1
    End With

    But the line in which I get the actual text , GetVisibleText, does not work in windows 7/vista, due to qtp's known issues with this method and some other ones.

    I have tried working around it by doing...
    .ActiveX(labelname1).GetROProperty(not sure what to pass in)

    I read somewhere that I should use .GetText() or .GetText, but that didn't work either.

    btw: Why is it that some scripts, i see .GetVisibleText and some .GetVisibleText() . They both work but when do I know which to use.

    Thanks so much for replying...and thank you for your help in advance.

 

 

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 02:19 PM.

Copyright BetaSoft Inc.