FileReader


the problem was with event.preventDefault in document.ontouchstart.  is there a way to not prevent that some events.  I want the Enter key to launch the file browser, but I will not be selected when I press the buttons on the text my css3 buttons.  is it possible to do an if statement based on the upcoming event in the ontouchstart function?

UPDATE *.

use the following text:

document.ontouchstart = function(event)
{
     if(event.target.id != 'txtFile') event.preventDefault;
}

This allows me to identify simply her "Choose file" button in the entry, and given that the default is not prevented, I'm able to ignore everything else, but always show the file Explorer.

Tags: BlackBerry Developers

Similar Questions

  • WebWorks FileReader API differs from Cordova

    This problem just kill my whole day.

    Whether it is short:

    ---------------------------------------------------------------------------------

    Ref: http://developer.blackberry.com/html5/apis/beta/cordova_file_file.md.html#FileReader

    The doc says this FileReader readAsText / readAsDataURL etc. function accepts the parameters of the object file.

    and the sample is:

    function win(file) {
        var reader = new FileReader();
        reader.onloadend = function (evt) {
            console.log("read success");
            console.log(evt.target.result);
        };
        reader.readAsDataURL(file);
    };
    
    var fail = function (error) {
        console.log(error.code);
    };
    
    entry.file(win, fail);
    

    but can anyone work?

    MOM

    After the hours test, I found that on webworks 2.0 beta, fileReader only accepts the FileEntry object. which cannot be disposed of as file.

    Ref: File.slice)

    slice
    
    Return a new File object, for which FileReader returns only the specified portion of the file. Negative values for start or end are measured from the end of the file. Indexes are positioned relative to the current slice.
    

    -----------------------------------------------------------------------------------------

    Test code:

    URL that can be read by invoking picker.like file: /accounts/1000/shared/test.txt

    blackberry.io.sandbox = false;
    window.requestFileSystem(window.PERSISTENT, 0, function(fileSystem) {
        futils.fs.root.getFile(URL, null, function(fileEntry) {
            var reader = new FileReader();
            reader.onloadend = function(evt) {
                console.log("read success");
                console.log(this.result);
            };
            reader.onerror = function(e) {
                console.log('error ' + e);
            };
            reader.readAsText(fileEntry);
        }, function(e) {
            console.log(e);
        });
    }, function(f) {
        console.log(f);
    });
    

    This code can read the contents of the file. Why?

    what it should be is so obtained fileEntry, use fileEntry.file () to get a file, cut the file, read the file into slices.

    Fix this A.S.A.P.

    Hello

    Thanks for reporting this! You are absolutely correct that FileReader and FileWriter should accept objects files.

    It is actually a bug in the plugin file Cordova itself. For the SDK WebWorks, we import the plugin and documentation of Apache.

    I opened a session in this case for the follow-up. Someone here will attempt from inside.

    https://issues.Apache.org/jira/browse/CB-6013

  • Help me! java.io.FileReader does not support on blackberry

    I want to import a Jar file in current blackberry application. My in standard java jar file use a RandomAccessFile, BufferedReader, FileReader class... But there is no support on blackberry. Help me! Thank you very much

    This can be done... However, you can write your own library using the API limited including blackberry gives... No way to get classes not supported here because RIM has give app on their phones for these APIs work

    See you soon...

  • Using HTML5 FIleReader / FileWriter on BB10 dev alpha

    Is this supported? Apart from the examples PhoneGap and w3c, I can find no information on the implementation of webworks of it and despite all my efforts, I can't work properly. I can list files and writing files seems to work (for example does not error) but I can't read them again. My code to read files:

    function readFile(filePath, success, error, progress) {
        window.requestFileSystem(window.PERSISTENT, 0, function(fs) {
            fs.root.getFile(filePath, {},
                function(file) {
                    var reader = new FileReader();
                    reader.onloadend = function(e) {
                        success(e.target.result);
                    };
                    reader.onerror = function(err) {
                        if (err.code == FileError.NOT_FOUND_ERR)
                            success(null);
                        else if (_.isFunction(error))
                            error(getFileReaderError(err));
                    };
                    reader.readAsText(file);
                },
                function(err) {
                    if (err.code == FileError.NOT_FOUND_ERR)
                        success(null);
                    else if (_.isFunction(error))
                        error(getError(err));
                });
        });
    }
    

    Can someone point me to some examples of work?

    Forget it, please ignore this message. After weeks, I finally realized, I spent a fileEntry at the fileReader, not the file object. Labour below code:

    function readFile(filePath, success, error, progress) {
        window.requestFileSystem(window.PERSISTENT, 0, function(fs) {
            fs.root.getFile(filePath, {},
                function(fileEntry) {
                    fileEntry.file(
                        function(file) {
                            var reader = new FileReader();
                            reader.onloadend = function(e) {
                                success(e.target.result);
                            };
                            reader.onerror = function(err) {
                                if (err.code == FileError.NOT_FOUND_ERR)
                                    success(null);
                                else if (_.isFunction(error))
                                    error(getFileReaderError(err));
                            };
                            reader.readAsText(file);
                        },
                        function(err) {
                            if (err.code == FileError.NOT_FOUND_ERR)
                                success(null);
                            else if (_.isFunction(error))
                                error(getError(err));
                        });
    
                },
                function(err) {
                    if (err.code == FileError.NOT_FOUND_ERR)
                        success(null);
                    else if (_.isFunction(error))
                        error(getError(err));
                });
        });
    }
    
  • Not available in Eclipse Java.io.FileReader?

    http://www.BlackBerry.com/developers/docs/5.0.0api/Java/IO/FileReader.html

    I am trying to impliment a XML parser, however, this FileReader library is not available for import.

    I read on another thread that it was not allowed.  But then I read the link, and it is said that there are in 5.0.0.

    I use 5.0.0.

    Is there something wrong?  Is there an alternative?

    java.io.FileReader is reported in the javadocs as existing but is not included in the library of net_rim_api.jar RIM API 5.0.0.

    Create java.io.InputStreamReader instance on the file you want and use it instead of FileReader.

  • Treat the AVL ATF error file in the opening AVL recorder data

    We test our engines with AVL testbed. After the series of tests, we got the result of the test stored as FAT filesystem. According to AVL test bench specifications, Puma Open settings and data are stored in format ASAM ODS (Open Data Services). This means that the data structure conforms to the ASAM standards.

    But while we try to use the Diadem software for process AVL data file, we found something strange. The problem is that the tiara can open all other groups of the AVL ATF file as "AND" "EM" etc except the recorder group. Test data recorded by AVL Puma cannot open the Diadem software. The tiara channel shows "Novalue".

    Could someone tell me the reason and the solutions?

    Thank you

    While the file is readable by itself, it contains certain constructs that are not loadable using the submatrices.

    Use the attached code to load.

    Option Explicit

    If (FileNameGet ("ANY", "FileRead", DataReadPath, "the file ATFX (*.atfx;")) *. (ATF), *.atfx; *.ATF") ="IDOk") then

    "atf (x) open file
    Dim param: param = "" & replace (FileDlgFileName, "&", "&") & ""
    Dim store: store set = navigator. ConnectDataStoreByParameter ("ATFX", param)

    «get the submatrices to load»
    protected subMatrixEntity: subMatrixEntity = store. Model.Entities ("AoSubmatrix"). SubTypes (1). Name
    Dim sms: sms the value = store. GetElementList (subMatrixEntity, "")

    ' Load with the default configuration
    Call Navigator.LoadData (sms, "Load", Navigator.Settings.CreatePropertyImportSet (store))

    End If

  • How to load. A01. A02. A03... Files in DIAdem

    I am writing a script to allow a user to create a data set by loading a series of ASCII files.  The files are. A01. A02. A03, etc file extensions  I can manually load these files individually, but I can't seem to the load via the program coding.  The code below is what I was trying to use to load one of the files, however DIAdem 11.0 running on a Windows 7 machine just stops and DIAdem 10.0 running on a Windows XP computer will appear to run the script... but no data actually loaded on the data portal.

    Call MSGBOXDISP ("Please select first data file")
    Call FILENAMEGET ('DATA', "FileRead")
    If DLGSTATE = "IDOk" Then
    DATADRVUSER = FILEDLGDIR
    Call ASCIIConfigLoad ("C:\Users\wi3083\Desktop\BH-OB29\RoughRoad ASCII Import.STP")
    Call ASCIILoad (DATADRVUSER & FILEDLGFILE, 0)
    End If

    Another option, I tried is:

    Call MSGBOXDISP ("Please select first data file")
    Call FILENAMEGET ('DATA', "FileRead")
    If DLGSTATE = "IDOk" Then
    DATADRVUSER = FILEDLGDIR
    Call the ASCIIAssocSet(".) A01 ', ' C:\Documents and Settings\administrator\Desktop\BH - OB29\RoughRoad Import.STP ASCII')
    Call ASCIILoad (DATADRVUSER & FILEDLGFILE, 0)
    Call the ASCIIAssocDel(".) A01")
    End If

    Any ideas would be appreciated!

    Hi CrshTstr,

    I enclose a use I wrote for 23 data files submitted.  Simply detach the *. The URI of the file and double-click on it with the Windows Explorer to register the use with your computer.  You can then run this kind of code to call:

    Call DataDelAll

    FilePath = 'C:\NICS\Discussion Forum\CrshTstr\BH-OB29\BH-OB29AS. A.

    FOR i = 1 to 23

    n = Right ("00" & i, 2)

    IF i = 1 THEN call DataFileLoad (FilePath & n, "CrshTstr")

    IF i > 1, THEN call DataFileLoadSel (FilePath & n, "CrshTstr", "[1] / [1]")

    NEXT ' I

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • path of excel file

    Hello world

    I am writing and reading data to an Excel (see code) file and it works but I need to specify the path of the script, and if I want to change the file I need to change the path of the code.

    I would like to create a window that appears and prompts the user to choose the excel file it wants to work, copy the path and replace

    'C:\Users\Public\Documents\National Instruments\DIAdem 2012\Documents\Constant Radius\USED\Test.xlsx' by this way.

    I hope someone can give me a hand with this...

    Thank you

    Leo

    Dim Excel, Excel Set = New Excel.Visible file = TRUE Excel.Workbooks.Open("C:\Users\Public\Documents\National Instruments\DIAdem 2012\Documents\Constant Radius\USED\Test.xlsx") call a = Excel.ActiveSheet.Cells (1,1). Value Excel.ActiveSheet.Cells (1,4). Value = RV1 (1) Excel.ActiveSheet.Cells (2,4). Value = RV1 (2) Excel.ActiveSheet.Cells (3,4). Value = RV1 (3) Excel.ActiveSheet.Cells (4.4). Value = RV1 (4) Excel.ActiveSheet.Cells (5.4). Value = RV1 (5) Excel.ActiveSheet.Cells (6.4). Value = RV1 (6) Excel.ActiveSheet.Cells (7.4). Value = RV1 (8) Excel.ActiveSheet.Parent.Saved = FALSE Excel.Quit = Nothing Set Excel

    Hi Leillo,

    I think that's what you're looking for:

    DlgTitle = "insert a file dialog title here...". »
    StartPath = ProgramDrv & "Examples\Data\".
    FileExts = ' *.» XLSX, *. XLSX»
    FileExts = "Excel files *.» XLSX; *. XLS '.
    Call FileNameGet ("All", "FileRead", StartPath, FileExts, "No", True, DlgTitle)
    IF DlgState = "IDCancel" THEN call AutoQuit
    DataFilePath = FileDlgFileName
    MsgBox DataFilePath

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Copy of a dataset of new channels within a script

    Hello

    I am trying to copy specific data between two sets of values (which are specified in the script) X and then draw a curve regression for them.

    I managed to set the values of cursor and create a group, but the only way I can see to copy is to define indicators and to copy the data points that can be made in a script (as far as I see)

    Research on the forum suggested using the value of the coordinate x to find the line but the data I use has several values of Y to coordinates X which means it won't work as it only returns the row in the first finds it.

    Any suggestions? Copy data to the new channels would be the most useful solution, but if I can calculate a regression between the two x values line then I might be able to work with it.

    Here is the code as it is:

    Dim MyFileNames, iCount, sheet, space, graphics, curve, chlength
    Call FileNameGet ("ANY", "FileRead", DataReadPath, "data TDM (*.tdm)", *.tdm ","All.lst", True,"data selection"")
    MyFileNames = Split(FileDlgFileName,"|")
    ICount = 0 to Ubound (MyFileNames)
    Call DataFileLoad (MyFileNames (iCount))
    Next

    Call View.LoadLayout ("view1")

    Set the sheet = View.Sheets (1)
    Set area = Sheet.Areas (1)
    Area.DisplayObjType = "CurveChart2D".
    Graph of the value = Area.DisplayObj
    Call Graph.Curves.RemoveAll
    Define the curve = Graph.Curves.Add ("Y_Accel", "Strg_Angle")

    Sheet.Cursor.Type = 'band '.
    Sheet.Cursor.X1 = - 0.1
    Sheet.Cursor.X2 = 0.1

    "This is where I would copy the flags data points

    Chlength = CL ("CopyYStrg_Angle")

    Call ChnApprXYCalc ("CopyXY_Accel", "CopyYStrg_Angle", "Y_Accel_Strg_Torq_approx", "Strg_Torq_approx", "Full score area", Chlength, 1).

    Set the sheet = View.Sheets (1)
    Set area = Sheet.Areas (1)
    Area.DisplayObjType = "CurveChart2D".
    Graph of the value = Area.DisplayObj
    Define the curve = Graph.Curves.Add ("Y_Accel_Strg_Torq_approx", "Strg_Torq_approx")

    And the plot so you can see what I need to complete (automatically good!)

    Thanks a lot for your help

    I managed to do this without the help of flags by manually setting data in new channels with an if function, according to Brad code here http://forums.ni.com/t5/DIAdem/Can-I-copy-data-points-from-a-VBScript/m-p/1048090#M11359

    Just changed the if function to check if the data was between certain values rather than checking if they had reported (could not get the chnflagset command to work)

  • Error permissions if the Script is run more than once with close Diadem

    I'm in REAL trouble here and need HELP...

    I get a permissions error message when I try to run my scripts multiple times with close Diadem 2011.

    Call scriptinclude ("D:\_Calterm_Configuration_Files\Technical_Information\DIAdem_Scripts\Importing Logs_CaltermIII_Local.VBS data")

    Error is around this part of the script:

    '-------------------------------------------------------------------------------------
    ' * GetFilePaths() * * NEW feature *.
    '-------------------------------------------------------------------------------------
    Function GetFilePaths (DefaultDir, ExtFilter, MultipleDir, Msg)
    Dim i, k, f, fso, iMax, FileListPath, StartIdx, CurrFiles, list of files
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    "Promt the user select the ASCII files to load with a file dialog box
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    FileListPath = AutoActPath & "FileDlgList.asc".
    Set fso = CreateObject ("Scripting.FileSystemObject")
    StartIdx = 0
    ReDim FileList (0)
    Do "to ensure that (DlgState ="IDCancel")
    Call the FileNameGet ('ALL', ' FileRead "DefaultDir, ExtFilter, FileListPath, 1, Msg" ")
    IF (DlgState = "IDCancel") THEN Exit Do
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'Read in the saved list or file selected in the file dialog box in FileList()

    This next line is where the ERROR occurs

    The value of f = fso. OpenTextFile (FileListPath, 1, True) ' f.ReadAll returns the content of the file
    CurrFiles = Split (vbCRLF & f.ReadAll + "\n") ' set the lines of the file into an array
    f.Close ' close the file
    iMax = UBound (CurrFiles)
    IF iMax > 0 AND Trim (CurrFiles (iMax)) = "" THEN
    iMax = iMax - 1
    ReDim Preserve CurrFiles (iMax)
    END IF
    Call BubbleSort (CurrFiles) ' sort the array of file names in alphabetical order
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    "Append current file any previous file dialog selection dialog box selections"
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    IF iMax< 1="" then="" imax="">
    ReDim Preserve FileList (k + iMax)
    FOR i = 1 TO iMax
    k = k + 1
    FileList (k) = CurrFiles (i)
    NEXT ' I
    IF MultipleDir <> TRUE, THEN Exit Do ' force 1 only dialog box, good, if all desired files are in the same folder
    Loop "until it as (DlgState ="IDCancel")
    GetFilePaths = list of files
    End Function ' GetFilePaths()

    266 error 18:18:34:
    Error in (line: column 8: 1):
    Error in (line: 140, column: 5):
    Permission denied

    I can send the script and the file I'm loading if it would help.

    OK, I played with it a little more and found that if I used global Sun (autoactpath) and then specified what that has been set.  All my problems went away.  I just added at the beginning of my first script and I have 15 different texts, I throw the box of a dialogue and now all glitches little with that I was just to the top went.  everything that I used autoactpath with has been fixed.

    Thanks for the help.

  • smooth a channel group

    Hello

    I need help with the smooth commnad.

    I have this script:

    Dim MyFileNames, iCount, date, line,.
    Call FileNameGet ("ANY", "FileRead", "D:\BOF-MIU\BOF Dim", "data CSV (*.)") ("CSV), *.csv", "All.lst", True, "data selection")
    MyFileNames = Split(FileDlgFileName,"|")
    ICount = 0 to Ubound (MyFileNames)
    FileName = NameSplit (MyFileNames (iCount), "N")
    Call GroupCreate (FileName)
    Call GroupDefaultSet (GroupCount)
    Call the DataFileLoadSel (MyFileNames (iCount), "CSV", "[1] / [3-4]" "")
    ChnName (CNoXGet (GroupCount, 1)) = "opening strength."
    ChnName (CNoXGet (GroupCount, 2)) = 'trip '.

    "so far, it's ok, but after that, I try something, but with no success"
    '-------------------------------------------------------------------------------
    «Call the ChnSmooth (CNoXGet (GroupCount, 1), 'Force opening', 12, "maxNumber") '...» Y, E, SmoothWidth, SmoothType
    «Call the ChnSmooth (CNoXGet (GroupCount, 2), "Distance", 12, "maxNumber") '...» Y, E, SmoothWidth, SmoothType
    "R1 = CMax (Ch ("race")).
    "Line = PNo ("race", R1)
    ' Call the DataBlDel ('Distance travelled', line, 2000, 1).
    '----------------------------------------------------------
    ' Call the PicLoad("D:\BOF-MIU\Scripts\BForce_Multiload.TDR").
    "Call the PicUpdate."
    '-----------------------------------
    next

    Please tell me how can I smooth a group channel?

    How can I delete data from a group channel max value?

    Thanks for your time.

    Marius

    Hi guy,

    The problem is in the SEO of your channel.  When you ask DIAdem to do something or with a data channel and only provide channel (no group information) Tiara name simply finds the first string in the DataPortal that corresponds to this channel name.  If you have been a loop across all groups, but several operations always manipulating channels of the first group.  Code here is referenced by channel number which seems to work fine on my computer loading 3 files:

    ICount = 0 to Ubound (MyFileNames)

    FileName = NameSplit (MyFileNames (iCount), "N")

    Call GroupCreate (FileName)

    Call GroupDefaultSet (GroupCount)

    Call the DataFileLoadSel (MyFileNames (iCount), "CSV", "[1] / [3-4]" "")

    ForceCh = CNoXGet (GroupCount, 1).

    TravelCh = CNoXGet (GroupCount, 2)

    ChnName (ForceCh) = "opening strength."

    ChnName (TravelCh) = 'trip '.

    Call ChnSmooth (ForceCh, ForceCh, 12, "maxNumber")

    Call ChnSmooth (TravelCh, TravelCh, 12, "maxNumber")

    R1 = CMax (TravelCh)

    Line = PNo (TravelCh, R1)

    Call DataBlDel (TravelCh, line, 2000, 1).

    "Call ("D:\BOF-MIU\Scripts\BForce_Multiload.TDR"PicLoad."

    "Call the PicUpdate."

    Next "iCount

    Brad Turpin
    Tiara Product Support Engineer
    National Instruments

  • How to read strings from a file data?

    Hello

    I have a little. CSV files, which were inside the trees channels (load force, opening force, distance) captured from both engines.

    I want to load multiple CSV files and analyze only two strings (opening force and distance of travel) and send them to a report (go the distance on the x-axis and opening force to the y-axis), but in this report as all channels of all CSV files I have loaded. (make a multiple load)

    My question is how can I read csv files the channels I'm interested and then analyze?

    I use this example to HELP to load the data:

    Dim MyFileNames, iCount
    Call FileNameGet ("ANY", "FileRead", "D:\BOF-MIU\BOF Dim", "data CSV (*.)") "CSV), *.csv", "All.lst", True, "data selection".
    MyFileNames = Split (FileDlgFileName, "|")
    ICount = 0 to Ubound (MyFileNames)
    Call DataFileLoad (MyFileNames (iCount))
    Next

    "and then I try to analyze, but I don't know how to divide the csv file to get only the channels I want."

    Call ChnSmooth ("filedlgfile &" [1] / axis 1: Position (uu) "," / smoothed ', 12, "maxNumber" "...) Y, E, SmoothWidth, SmoothType

    Thank you for your time.

    HI Maria,

    Here is the approach to file dialog you asked--use it instead of the "FilePaths = GetNaviSelFiles()' in the command script I sent you:

    DlgTitle = "insert a file dialog title here...". »

    StartPath = ProgramDrv & "Libr\Dat\".

    FileExts = ' *.» DAT; *. TDM.

    Call FileNameGet ("All", "FileRead", StartPath, FileExts, "No", True, DlgTitle)

    FilePaths = Split ("|" & FileDlgFileName, "|")

    The trick in the TDR file I sent you was set up for mode "exanding" in the "Page layout settings" dialog box  It is an old display option that can cause problems if used in bad situations, but it seemed that it would make your life easier for this particular task.

    Brad Turpin
    Tiara Product Support Engineer

    National Instruments

  • FileNameGet: Selection of different extensions at once

    Hello

    When I call with a filter "(*.)" (DAT), *. DAT,(*.) TDM), *. TDM,(*.) (TXT), *. TXT,(*.) BMR), *. ,(*. BMR XMR), *. XMR', the user must choose which one he likes to use an extension.

    Is it possible, can I make the dialog box to display different fileextensions both?

    Call the FileNameGet ('all', 'FileRead', "C:\Filetests\", "(*.)") (DAT), *. DAT,(*.) TDM), *. TDM,(*.) (TXT), *. TXT,(*.) BMR), *. ,(*. BMR XMR), *. (XMR","null", True)

    Call FileNameGet ('any', 'FileRead', 'C:\Filetests\","MyFiles(*. DAT; *. TDM; *. TXT; *. BMR; *. XMR), *. DAT; *. TDM; *. TXT; *. BMR; *. (XMR","null", True)

    should make you work.

  • global variables for the XML plugin problem

    Hello world

    recently I started working on a dialog box SOUTH, where the user can load the *.xml files in DIAdem.So much my code for the button looks like this:

    ....

    Call the FileNameGet ('ALL', 'FileRead","*.xml")
    Call DataFileLoad (FileDlgName, "XML_Plugin", "Load")

    ....

    And I must say that it works very well! I am able to load all listed in the devices file. BUT when I tried a number of loading devices, I used a global variable, that I defined in the vbscript file that I load the SOUTH since, I've noticed that global variables, I've defined with GlobalDim are not defined in the vbs.:mansurprised of XML_Pluging:

    Then I started to experiment and so far without success, no matter where I define global variables, in my plugin *.xml all not defined! The native commands even and DIAdem functrions does not work. If I run the script in tiara, it shows no errors, but when I use the plugin to open a file, then it gives an error. For example, MsgBox is not allowed.

    I used the plugin example for *.xml, which was published on the Web site of NOR, and I made a few changes. But overall I have it has not corrupted and I kept the same structure:

    Void ReadStore (File)

    Dim XmlFile: xmlFile = File.Info.FullPath
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'open the file '.
    OpenXMLFile xmlFile

    End Sub

    Void OpenXMLFile (xmlFile)
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Open MS - Xml Parser
    'Create the ActiveX object for the Microsoft XML parser.
    Dim XDoc: set xDoc = CreateObject ("MSXML2. DOMDocument.3.0")

    "Try to load the XML document
    If xDoc.Load (xmlFile) = False Then
    "Failed to load the document XML.
    RaiseError ' unable to load XML document!
    End If

    protected originalLocale: originalLocale = Getlocalte
    "SetLocale" en - us ".

    "The XML document loaded successfully!
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    '----------------------------------------------
    "Read the header information.
    '----------------------------------------------

    Here, I have read some values of the header and then I loop on all devices present in the file!

    So basically I have two subroutines and that's all.

    SetLocale originalLocale

    End Sub

    So what I am doing wrong? Why global variables and other functions do not work. Is it because there is xml code in the script this way or it's a version problem?

    I use DIAdem 10.2. If I use global variables in other vbscripts, I use to draw curves for example I have no problem. Now I'm no *.xml code and no subroutines.

    I'd appreciate any solution that will make my *.xml plugin to work.

    Hi fscommand.

    It is expected all behavior.  Use XML, as all VBScript DataPlugins, runs in a separate VBScript host of the DIAdem VBScript host.  DIAdem VBScript host adds all global variables green and Red controls global to host Microsoft VBScript standard.  Use VBScript host has its own special abilities (file object, root object), but there is NO access to Globals green or red blanket orders in the reception of DIAdem VBScript.  Your SUDialog runs in a third host VBScript, which is separated from the other two and the other two are not capabilities (command SUDialog callback functions), but the SUDialog VBScript host and VBScript tiara share all global variables green and Red orders overall.

    Normally all blue VBScript commands are allowed in all 3 VBScripts hosts, but in the case of the DataPlugins MsgBox and InputBox functions were especially restrained because the dialogues could cause a lot of trouble with the DataFinder.  In fact, they have been allowed to 9.1 tiara which was the latest version of tiara for the DataFinder appear.

    So, why do you want to pass information between the XML use and tiara?  If you want to use to share information with DIAdem, then you should just expose every piece of information as a new property in the data portal, which can read and use the code VBScript DIAdem.  The path of the XML file is already available inside the use of XML.  What other information in the call VBScript DIAdem do you need to share with the use?

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • FileNameGet strangeness in Diadem 11.0

    We use a VBScript script where the user needs to open Excel files.

    I use this line for them to choose the first:

    Call the FileNameGet ('ALL', ' "FileRead", DataDrvUser,"xls SADM (*.xls), *.xls" "," ", False, 'Select a workbook"JIS"')

    In Diadem 9.1 with that this would show a dialog box to open "select a"JIS"workbook", as

    the legend of the dialog box.  In Diadem 11.0, that does not happen.  Legend says

    "Selection of the *.xls files."

    I've attached screenshots to show both.  Is it possible to get the dialog box to

    behave properly in 11.0?

    I really need this legend the as to which file they should open invite.

    JBrandim,

    This seems to be a bug in DIAdem 11.0 and it is set at 11.1 to be released shortly.  If you can't wait for the fix there is a possability that we could slip into the 11.1 beta program after the fact. Also after you play with it for a bit I found that you could controll the message by changing the fifth parameter. However if you chose to do this, comment the code very well, if it never gets work to 11.1 or later, it does not run as expected:

    Call the FileNameGet ('ALL', ' "FileRead", DataDrvUser,"xls SADM (*.xls), *.xls" ', 'PUT YOUR MESSAGE HERE', False, 'Hello')

Maybe you are looking for

  • 4.0 important cookies, history, settings, passwords, etc.from 3.6?

    Version 4.0 installs like another browser or he settled on v3.6? Also if it settles as a separate browser will import 4.0 settings, cookies, history, etc.from 3.6? If this is not the case, what is the best way to get this stuff from 3.6 to 4.0?Thanks

  • Safari crashes whenever I open it. any helpful ideas?

    last night, whenever I try to open safari it gives me a notice of error and stops. any suggestions on what to do to fix? Thanks in advance for the answers that help me solve this problem

  • need help with wifi router & ipos touch 5

    Hi pretty new to this, bought an ipod touch 5, said I need wifi, buy a mofinetwork 3G Router wants to connect my ipod to itunes store continues by saying that I am not connected, but my computer shows me that I am, also keep getting a message to trou

  • I can't update my computer Error 80070426 Dungeon

    I have windows xp family on my sony vaio and it does not update my computer always gives me Error 80070426

  • Disabling or deleting a boot program does not work.

    I tried to remove windows live messenger from my startup programs which seems to be a million times.  the next time I start my computer, it does not start automatically, but the time thereafter, it starts automatically.  I tried to click on 'remove'