VBScript / Microsoft Script Control

I would like to call VBScript from TestStand using Automation Server Microsoft Script Control 1.0.
Which class I have to use to call a procedure or function in a .vbs file ? Where do I have to specified the .vbs file used ?

Hi,
I think this is explained following this link: http://digital.ni.com/public.nsf/allkb/99A8713C51A​4DE368625700D005BD795?OpenDocument
Regards
Jean-Luc D. NI France
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
Journées techniques : du contrôle d'instruments aux bancs de test
Du 4 au 13 juin : Grenoble - Pari...

Similar Messages

  • Microsoft Script Control

    I am importing a json file to Excel using Microsoft Scripting Controls.
    I am trying to set up several sheets within the workbook, where only one piece of data is the variant between sheets. However I can't get the Script Engine to reset from sheet to sheet. What do I need to do to have the script engine reset each time? Thanks
    Public Sub InitScriptEngine()
    Set ScriptEngine = New ScriptControl
    With ScriptEngine
    .Language = "JScript"
    .AddCode "function getProperty(jsonObj, propertyName) { return jsonObj[propertyName]; } "
    .AddCode "function getSubProperty(jsonObj, podId, propertyName) { return jsonObj.gallery.podCache[podId][propertyName]; } "
    .AddCode "function getKeys(jsonObj) { var keys = new Array(); for (var i in jsonObj.gallery.podCache) { keys.push(i); } return keys; } "
    End With
    End Sub

    I am trying to load different json from a web page into Excel. I want to use a different sheet for each zip code in one workbook. When I change the URL for the next webpage, example change
    http://www.coupons.com/ajax/init?zipcode=77477" to
    http://www.coupons.com/ajax/init?zipcode=33317"
    The data remains the same in the new Excel sheet.
    This is the complete code.
    Option Explicit
    Private ScriptEngine As ScriptControl
    Public Sub InitScriptEngine()
    Set ScriptEngine = CreateObject("MSScriptControl.ScriptControl")
    ScriptEngine.Language = "JScript"
    ScriptEngine.Reset
    With ScriptEngine
    .AddCode "function getProperty(jsonObj, propertyName) { return jsonObj[propertyName]; } "
    .AddCode "function getSubProperty(jsonObj, podId, propertyName) { return jsonObj.gallery.podCache[podId][propertyName]; } "
    .AddCode "function getKeys(jsonObj) { var keys = new Array(); for (var i in jsonObj.gallery.podCache) { keys.push(i); } return keys; } "
    End With
    End Sub
    Public Function DecodeJsonString(ByVal JsonString As String)
    Set DecodeJsonString = ScriptEngine.Eval("(" + JsonString + ")")
    End Function
    Public Function GetProperty(ByVal JsonObject As Object, ByVal PropertyName As String) As Variant
    GetProperty = ScriptEngine.Run("getProperty", JsonObject, PropertyName)
    End Function
    Public Function GetKeys(ByVal JsonObject As Object) As String()
    Dim Length As String
    Dim KeysArray() As String
    Dim KeysObject As Object
    Dim Index As String
    Dim Key As Variant
    Set KeysObject = ScriptEngine.Run("getKeys", JsonObject)
    Length = GetProperty(KeysObject, "length")
    ReDim KeysArray(Length - 1)
    Index = 0
    For Each Key In KeysObject
    KeysArray(Index) = Key
    Index = Index + 1
    Next
    GetKeys = KeysArray
    End Function
    Public Sub GetCoupons77477()
    Dim JsonString As String
    Dim JsonObject As Object
    Dim Keys() As String
    Dim Output() As Variant
    Dim lRow As Long
    Dim lCol As Long
    InitScriptEngine
    With CreateObject("MSXML2.XMLHTTP")
    .Open "GET", "http://www.coupons.com/ajax/init?zipcode=77477", False
    .send
    JsonString = .responseText
    End With
    Set JsonObject = DecodeJsonString(CStr(JsonString))
    Keys = GetKeys(JsonObject)
    ReDim Output(1 To UBound(Keys) + 1, 1 To 6)
    For lRow = 0 To UBound(Keys)
    Output(lRow + 1, 1) = ScriptEngine.Run("getSubProperty", JsonObject, Keys(lRow), "brand")
    Output(lRow + 1, 2) = ScriptEngine.Run("getSubProperty", JsonObject, Keys(lRow), "summary")
    Output(lRow + 1, 3) = ScriptEngine.Run("getSubProperty", JsonObject, Keys(lRow), "details")
    Output(lRow + 1, 4) = ScriptEngine.Run("getSubProperty", JsonObject, Keys(lRow), "expiration")
    Output(lRow + 1, 5) = ScriptEngine.Run("getSubProperty", JsonObject, Keys(lRow), "isuff")
    Output(lRow + 1, 6) = "77477"
    Next lRow
    ThisWorkbook.Sheets("Zip77477").Cells(1, 1).Resize(UBound(Output), UBound(Output, 2)).Value = Output
    End Sub

  • Does QTP/UFT support "Microsoft.Windows.Control" (one type of wpf control)?

    Hello,
    I have a challenge automating WPF Application in which they used new type of Wpf Data GridControl i.e "Microsoft.Windows.Control". We cannot access all the properties of this control(RowCount,GetCelldata). Can Anyone get this issue and provide me details of any patch that can resolve this issue?
    Please let me know if you need more info and provide resolution ASAP

    Hello,
    I have a challenge automating WPF Application in which they used new type of Wpf Data GridControl i.e "Microsoft.Windows.Control". We cannot access all the properties of this control(RowCount,GetCelldata). Can Anyone get this issue and provide me details of any patch that can resolve this issue?
    Please let me know if you need more info and provide resolution ASAP

  • Running Microsoft Script Editor after installing Office 2010

    As per this link:
    http://office.microsoft.com/en-us/excel-help/use-office-excel-2010-with-earlier-versions-of-excel-HA010342994.aspx
    Microsoft Script Editor is installed along with Office 2010, even though it cannot be accessed from the UI. However, I cannot find it. I've looked in the installation folder, and in Program Files\Common Files for MSE7.EXE, and could not find it.
    Previously, when I encountered a Javascript error, I would get a window prompting me to choose a debugger. Now I get a window saying no debuggers are found.
    I would use IE8's built-in developer tools, but that doesn't help when debugging an HTA or under WSH.
    I am using Office 2010 Professional Plus on Windows XP SP3.

    Microsoft Script Editor (MSE) seems has been removed from Office 2007 and Office 2010.
    That means MSE will not install when you have installed office 2010.
    Microsoft Script Editor (MSE) has been removed from Office 2010 from what I can tell; however, it is still installed in Office 2007. There isn't a default botton configurationm to bring it up like in Office 2003. If you want to access it make sure it is installed
    with the installation of Office 2007 and make a shortcut going to "%programfiles%\Common Files\Microsoft Shared\OFFICE12\MSE7.EXE". If anyone finds where it is in office 2010 please let me know or has a definitive "no it is not a feature."
    Thanks.

  • HMLDB2.0: script control (I don't  find it)

    think thats no bug, its perhaps another kind of getting script control.
    but I don't find any information in HELP2.0, but you will find in HELP1.6.
    short question: how to do script control (in 1.6. there was an element for it)

    Hope you have TimeMachine backup.
    Reinstall OS X 10.10 Yosemite from App store.
    Best.

  • SAP-Script Control on a Dynpro

    Hello to all
    I am trying to implement a SAP-Script control on a Dynpro (a PA-Infotype) using the class CL_GUI_SAPSCRIPT_EDITOR.
    Basically this works pretty smooth but I am facing an odd problem:
    How can I determine that the user made changes to the text and I therefor need to save the Infotype and the content of the control? I found this suitable looking method IS_MODIFIED of said class which seems to return a boolean value that indicates wether there have been changes made or not.
    Sadly though this method always returns false.
    Has anybody a clue as to what needs to be done here?
    Cheers
    Markus

    I think, one should flush the changes before requesting the modification status.

  • Error when including SAP Scripting Control

    Hello,
    I was using SAP Scripting Control in VB with SAPGUI 620 without any problems. I upgraded my SAPGUI to 640 (patch level 8). Now, I am not able to include the SAP Scripting Control (sapfewse.ocx) in Visual Basic. Whenever I try to include it, I get an error "Circular dependencies between modules". Am I doing something wrong?
    I also installed the patch level 20 but I still get the same error.
    Any help would be highly appreciated.
    Thanks.

    Hi Vishal,
    please upgrade to the latest 640 patch. The problem was fixed, I think patch 11 should work fine.
    Best regards,
    Christian

  • Problem with ActiveX control, Microsoft Toolbar Control, version 6.0

    Hi everyone,
    I built a virtual machine on my desktop and installed Windows and Labview.  Everything looks fine. Then when I tried to insert ActiveX control, Microsoft Toolbar Control, version 6.0, in Labview, it says "Class is not licensed for use". 
    By the way, it works perfectly at my desktop enviroment.
    Any idea? Thanks a lot for any help.
    Anne

    There are two different licenses for those controls: a development license and a run-time license. Did you at some point have Visual C/C++/Basic 6.0 installed? If so, that would have installed the development license. That's the license you're missing on the virtual machine. This KB article discusses this issue: http://support.microsoft.com/kb/318597. It relates to using the controls in Visual Studio 2005, but it applies to LabVIEW as well.

  • ActiveX for Microsoft MAPI Control

    I want to use Microsoft MAPI Control to send mail.

    You need 2 controls :
    - MAPISession1
    - MAPIMessages1
    Call:
    - MAPISession1.SignOn
    - MAPIMessages1
    .MsgIndex = -1
    .RecipDisplayName = "SendTo"
    .MsgSubject = "Subject"
    .MsgNoteText = "Message"
    .SessionID = MAPISession1.SessionID
    .Send
    - MAPISession1.SignOff
    Hope this helps

  • Add New Node - Adobe Director Microsoft Treeview Control 6.0 xtra?

    Can some one help me on how to add new node to TreeView Control provided as xtra with Adobe Director. Tried using sprite(1).Nodes.Add but not working. Please assist

    Right, I am accessing the control via Insert  ->Controls -> ActiveX -> Microsoft Treeview. (unable to find any documentation)
    I am actually trying to make a treeview and on selection do some stuff.
    I have tried using CxtraPopup to create the same but when publishing it says unregistered version.
    Can you please suggest any xtra that supports Menu.
    Thanks

  • SAP Script : Control Commands for printing Label (barcode) by Zebra Printer

    Hello,
    I would like to know the control commands in sap script for Zebra Printer. The purpose of task is to print a field in barcode format in Right Bottom of the label.
    The sample code is placed below. Kindly have a look at it. The problem now i am facing is, the barcode for Customer PO is printing on the wrong place (Left Bottom, the text & barcode are overwriting). Can anyone suggest a possible way or can any one send the document for Barcode commands in SAP Script for Zebra Printer.
    Sample script code:
    Initialization and reset Barcode
    XAMCY^XZ
    Start
    ^XA
    Barcode setup
    ^BY3,2.7,2.2
    Set label home position
    ^LH
    ^FWN
    FO385,025A0R,40,50FDPN: &VBAP-MATNR&FS
    FO385,725A0R,40,50FD&VBAP-ARKTX&FS
    FO385,1710A0R,40,50FDRtns: &zsntsc-contr&FS
    FO345,025A0R,40,50FDService Order# &AUFK-AUFNR&FS
    FO345,725A0R,40,50FDSerial# &EQUI-SERNR&FS
    FO345,1710A0R,40,50FDRepair Order# &VBAP-VBELN&FS
    FO245,025B3R,N,90,N,NFD&AUFK-AUFNR&FS
    FO245,725B3R,N,90,N,NFD&EQUI-SERNR&FS
    FO245,1710B3R,N,90,N,NFD&VBAP-VBELN&FS
    FO138,1710A0R,40,35FDCustomer PO# &VBKD-BSTKD&FS
    FO98,025A0R,40,50FDWrnty: &W_WARRANTY&FS
    FO98,605A0R,40,50FDRoute: &W_ROUTE&FS
    FO58,025A0R,40,35FDShip-to-name: &W_NAME1&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO18,885A0R,40,35FDReported By: &QMEL-QMNAM&FS
    FO18,1710B3R,N,90,N,NFD&VBKD-BSTKD&FS
    ^XZ
    Thanks in Advance,
    Ramasamy

    HI
    GOOD
    GO THROUGH THIS
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes. 
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor. 
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    GO THROUGH THESE LINKS
    http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm
    THANKS
    MRUTYUN

  • Powershell Script, Control Remote Computer's Speaker Volume

    how are you getting the function to the remote session?

    I'd like to be able to control the volume of a remote computer's speakers and I'm having some trouble. I found a function that works perfectly, but it doesn't work remotely. This may just be a limitation of sendkeys.http://stackoverflow.com/questions/22083674/calling-a-function-within-a-function-with-invoke-command...So I've tried to use this in a couple ways. I've been able to send functions through before as a whole script block, but I'm having no success with this.This is the format that normally works for me
    Invoke-Command -ScriptBlock ${Function:Set-Speaker} -Argumentlist $intVolume -ComputerName $strComputerI've also tried to do this through Enter-PSSession and dump the whole function in and run it, it doesn't work. I'm not getting any errors.When I run the same thing on a local session on that pc, it has no problems. Let me know...
    This topic first appeared in the Spiceworks Community

  • Microsoft Script Debugger

    Hello !
       I have DIAdem11.0 & Microsoft Visual C++ 2005 express edition. I want to debug the .vbs scripts, which is unfortunately not possible. Please let me know why this is so (the help says that if script debugger is there, then it should be possible to use the debug mode) and more importantly, how I can circumvent this situation.
      Es gibt ein paar diskussions über dieses Thema hier. Aber mein Deutsche ist leider nicht gut. Deshalb habe ich nur etwas verstanden. Ist eine Übersetzung auf Englisch möglich?
    Mit freundlichen Grüßen / With warm regards,
    Saurav Mukherjee
    Message Edited by Mukherjee on 08-12-2008 09:00 AM
    Solved!
    Go to Solution.

    Hello Saurav!
    You have the same OS. This is not the reason for the problem. Can you try to download on another machine?
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Oracle AIX pre-requist script controls

    Dear Oracle fellows
    I would like to know if it is possible to use the pre-checks built in OUI in a command line script for AIX in order to control the swap, the bos packages and etc values.
    Any idea?
    Thanks

    Before 10g there was a special unix script for checking pre-requirements.
    You can check metalink Note 189256.1 "UNIX: Script to Verify Installation Requirements for Oracle 8.0.5 to 9.2 versions of RDBMS
    As oui is java, then probably You can try to debug which jar files and what parameters are executed in order to check are all packages installed.
    Or simply make Your own script based on my mentioned one, just add needed checks for concrete operating system.
    But why can't You simply run ./runInstaller and then just adjust if something is forgetted.

  • Action Script - Controlled Loop

    I know the most basic command in ActionScripts to keep my
    Flash video from looping (stop();). Can I apply that command
    if I want
    to end on a scene used previously in the movie (as in the
    example in
    the
    notes)? How does that work such that my movie doesn't stop
    after the
    initial use of that scene and go no further?
    Ideally, I would like to use the same scene as an opening and
    closing
    sequence to my movie. However, after the second use, I would
    like to
    have text saying "The End." Is there an if/then statement
    that defines
    if this has played before or something?

    for smooth scrolling like your website you would control the
    _y property of a movieclip and yes, that can be done with
    actionscript.

Maybe you are looking for

  • Is Apple still signing 6.1.3 for iphone 4?

    Hello, Something like one month ago i decided to go from 6.0.something to 6.1.3 because my iphone 4 was running too slowly. At first i thought about restoring but i got lazy, and thought i would just update through itunes, since itunes always tries t

  • MenuBar submenu display

    when i go on a root menu element of a menubar, automatically i display a submenu element, if it exists. May I make a condition to decide to see the submenu or no. thanks

  • Problem Downgrade from Win8 x64 to Win7Pro x64 - HP Sleekbook 14 b051TU

    Dear all, I'm experiencing some problems while trying to downgrade this HP Sleekbook 14 b051TU machine from 32 bit to 64bit. It keeps showing me error message off unable to load the driver for the storage device. What I've done: 1. I have downloaded

  • Can't access Home page on XP, with sqlplus connection is OK

    Version: Oracle 10g Expression Edition OS:XP DB connect with sqlplus : OK Home page access failed: I tried http://127.0.0.1:8080/apex http://localhsot:8080/apex http://<myIp>:8080/apex I can use it before, but one day it doesn't work. There is a Mcaf

  • Getting data from r3

    Hi All, We have a scenario, where a program generates in R3 and gives an output in the spool. From there data is dumped in excel and compared with some data in BW report. Any idea as how to make this automated rather how to run a reconciliation repor