SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Apr 2008
    Posts
    187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Defining and using a DLL - JScript

    I'm trying to replicate this VBSctipt code (from QTP) into JScript code for TC. The DLL that I'm trying to use is already registered. Here is the working VBScript code:
    <font class="small">Code:</font><hr /><pre> Set objMD5 = CreateObject("XStandard.MD5")
    hash1 = objMD5.GetCheckSumFromFile("C:\tmp\common1.qfl")
    hash2 = objMD5.GetCheckSumFromFile("C:\tmp\common2.qfl")
    Log.Message(hash1)
    Log.Message(hash2)
    Set objMD5 = Nothing </pre><hr />

    I've looked at the DLL tutorial in TC, and it's just not making sense to me. So many steps, it's pretty confusing. Anyone who is really good at JScript care to take a whack at this? I'm just looking for the equivalent code to do this.

  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: Defining and using a DLL - JScript

    Change "CreateObject" to "Sys.OleObject" and, as long as it is a registered COM object in the system, you can use it from there.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  3. #3
    Senior Member
    Join Date
    Apr 2008
    Posts
    187
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Defining and using a DLL - JScript

    WooHooo! Thanks Robert, that was exactly what I needed. I suppose I should have seen it (as the tutorial talks about OLE all over the place). This is better (I think) than the hashmap from Files like you mentioned before. Files.hashmap isn't really supported any longer.

 

 

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 11.54%
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:24 AM.

Copyright BetaSoft Inc.