How to open and read an external file in Dashboard widget?

I am new to Dashboard widgets and also Javascript. I have written a widget that needs to open and read a file on the local file system. I have searched a lot and have not found any documentation or reference on the internet as to how to do this.
I know it can be done since there is a checkbox in the widget attributes that says "Allow External File Access".
can anyone help me out here?
Thanks

You need to define the AllowFileAccessOutsideOfWidget key to Yes.
You also need to define the AllowFullAccess key.
You may also need to define the AllowSystem key (to Yes of course).
Mihalis.
PS. If you cannot find any other documentation please check http://widgetbook.blogspot.com.

Similar Messages

  • How to release and read another external file

    My vi is set to read an external file (a previously collected force plate signal), then perform a string of analyses on it and finally save the analytical output. Currently, "Read from measurement file" is outside the while loop containing all of my analysis.
    Without completely restarting the vi, I would like to be able to release the file and load another.  How might I do this?  
    Thanks!

    I would do several things to clean up the block diagram.
    whenever you have multiple outputs that are related to each other (PF, F100, F150, F200, F250, etc...) or all of the RFDs and Impulses, you can bundle them together and then display them with one big cluster, or as an array, if that makes sense.  This will reduce your total number of outputs and maybe improve organizaiton.
    If you have a seqeunce of functions that go together, you can combine them into a SubVI to save blockdiagram space and making things more logical.
    If you have several places where the same sort of function is being done, (for example, you have Extract-Statistics-Formula several times and Extract-Integral-Statisics several times) you can make this into a sub-VI and then loop through it.  That way you can execute the function multiple times (with slight changes on each loop), but you only have to have the code written once. It also makes it much easier to improve the code because you only have to make one change instead of four. 
    The attached VI shows two ways of doing something.  On the left is your code, which is four sets of the same thing.  On the right, I've taken this code and put it into a loop so it does the same thing four times.
    Attachments:
    Simplified Code.vi ‏896 KB

  • Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still us

    Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still use Flash Player...
    Is there anyo who can help me with this? I asked in the shop and I was told "yes of course" , but when I contacted Sony directly I was advised to check with Adobe as apparently in the recent months Adobe and Sony haven't been getting along anymore...

    You may be mixing up two entirely different Adobe products.
    1. Adobe Flash Player. Needed to view web pages designed with Flash. Not needed to view PDF files. Not available for Android (not just Sony).
    2. Adobe Reader. Reads PDF files. However, the Android can also read most PDF files without needing Adobe Reader.

  • How to open and read many files from a directory and store contents in 2D array?

    I want to make a VI that opens and reads the data from various files contained in a directory (200 files each with 2 columns) and store these in a single 2D array. For file number 1 I want to store the data from both columns in the 2D array, but for files 2 to 200 I only want to store the second column of each file. Can someone please help?

    Hi Nadav,
    Thanks for your help. I have followed your instructions but i cannot get it to work. I used the LIST DIRECTORY to list the files in the directory - that works. However, how do I read each of the 200 files using READ FROM SPREADSHEET FILE without me having to manually select each of the 200 files? So, if I use LIST DIRECTORY to list all 200 files in an array, how do I get each of these to open and store the data in a 2D array? Here is what I have done (File called read_files.VI) Could you please help me? Thank you very much in advance.
    Attachments:
    read_files.vi ‏18 KB

  • How to open and read pdf and micrsoft word (.doc) files or documents

    My problem is how to use my BB 9800 software version 6.0.0.546 to read/view pdf files and microsoft office documents. I have also bought documents to go from online and have installed it on my phone, but whenever i try to open it I receive a message that it is incompactible. Any help will be greatly appreciated.

    Hi, Sammy.
    Why not install a 3rd party PDF reader and Word Doc reader to help open and read pdf and micrsoft word (.doc) files or documents? You can google it and select one whose way of processing is simple and fast to help you with the related converting work.  It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.
    Best regards,
    Arron

  • How to open and read binary files?

    How do I open and read Binary files?

    Did you  look on The Unarchiver's web site where it has a link to older versions? http://theunarchiver.googlecode.com/files/TheUnarchiver3.2_legacy.zip
    The best thing to do is ask your friends what programs they used to produce these files, or at least what format files they are producing.  Otherwise it's like being shown a car and given a bundle of 200 keys with no idea to which one to use, or even if any of them work with that car.
    Using The Unarchiver will likely not do anything because it too will not know what format files are involved, and they may not even been in an archived format.  If they sent you a Word file without telling you (a favorite of Windows users to do  -- it drives me crazy when they could have just sent them in plain text), The Unarchiver won't open them.  If it's a picture file then using Hexedit will just show you a bunch of unintelligible stuff as shown in an earlier post, though you may see a line of text providing a hint.
    As I said earlier, often .bin may be an executable program which needs another program to actually interpret it.  That's what Java is trying to do.  Still, it may think it can execute the file, but it is highly unlikely somebody would send you an executable program (and if they did I would not trust it).  For all you know it may be a Windows virus.

  • Open and read from text file into a text box for Windows Store

    I wish to open and read from a text file into a text box in C# for the Windows Store using VS Express 2012 for Windows 8.
    Can anyone point me to sample code and tutorials specifically for Windows Store using C#.
    Is it possible to add a Text file in Windows Store. This option only seems to be available in Visual C#.
    Thanks
    Wendel

    This is a simple sample for Read/Load Text file from IsolateStorage and Read file from InstalledLocation (this folder only can be read)
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Windows.Storage;
    using System.IO;
    namespace TextFileDemo
    public class TextFileHelper
    async public static Task<bool> SaveTextFileToIsolateStorageAsync(string filename, string data)
    byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
    try
    using (var s = await file.OpenStreamForWriteAsync())
    s.Write(fileBytes, 0, fileBytes.Length);
    return true;
    catch
    return false;
    async public static Task<string> LoadTextFileFormIsolateStorageAsync(string filename)
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    async public static Task<string> LoadTextFileFormInstalledLocationAsync(string filename)
    StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    show how to use it as below
    async private void Button_Click(object sender, RoutedEventArgs e)
    string txt =await TextFileHelper.LoadTextFileFormInstalledLocationAsync("TextFile1.txt");
    Debug.WriteLine(txt);
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • FYI TDMS open and read on empty file gives no error's out

    I found that if you 'open' an empty (0 byte) file using TDMS open, you will not get any error messages when you open it, nor when you call functions such as "Get properties" or "List content", also no error when you close the TDMS file.
    If the file is non-empty, but not a valid TDMS file, TDMS open returns an error.
    I would have expected that I would get an error or a warning at least when trying to read a non-existant property or group, if not by the open function itself?!
    The 2013 snippet below creates a 1-byte or empty file in the local user temporary folder, closes the file, then attempts to open and read it as a TDMS file.  The temporary file is deleted afterwards.
    If the file is empty, NO errors or warnings occur at any point.  If the file is not empty, it fails on the TDMS open. (Note the sequence structure is because the path out of the tdms close is invalid if the tdms open failed.
    This could conceivably cause an issue if your program does not do additional fault checking to catch existing but empty files.  (Which of course shouldn't ever happen, but in some situations it could happen.)
    QFang
    CLD LabVIEW 7.1 to 2013

    Hooovahh
    I asked to list the channels in a named group.  If that named group did not exist, I would think that should at least be a warning,  but I could see how it should not be an error, it was just unexpected to me that reading a non existant group (in an empty file) did not indicate any issues at all.   To me, 'error out' should give a warning or an error if something unexpected happened, but I may just have stricter opinion on something that by nature is very philosophical and open for debate. (And there are always tradeoffs, overt checks and bounds in a function obviously leads to overhead, and TDMS is optimized for performance, so that may be one reason it is the way it is.)
    (This situation came up for me because when a file is first created, we datetime tag it and write a bunch of other meta-data to the file, then later (and over time) we add the spectrum goup + data.  [Edit] actually, in the old code, if the file existed, it was assumed to have been setup correctly. so if the group exists, the old code assumed all the meta data has already been written [end edit].. One of the many fixes possible, I'll rely on the 'found' boolean output of the parameter read instead of relying on the error/warning. If the datetime tag is found, the code will asume the file exists and has been filled with the meta data I expect.)
    Thoult ::  I wasn't sure, but in either case, my intent was to provide extra information, not 'knock you' for participating in the discussion, I hope thats not how I came accross.  English is a second language to me, so I sometimes come across 'wrong' from what I mean.
    QFang
    CLD LabVIEW 7.1 to 2013

  • How to open and read data from text file in PL/SQL

    We have a project ,need to open a file containing entries of data
    ,then process those data records one by one to update the
    database.This operation shoulbe be done in the database
    enviroment. Is there any hint about the file operation in
    PL/SQL? How to open the file and get one record ,maybe one line,
    and parse and get the data field ?
    thanks
    defang

    There was also a question on this over at AskTom
    (asktom.oracle.com) about a week ago complete with sample code.
    The pointer to the sample code is here:
    <A HREF="http://asktom.oracle.com/pls/ask/f?
    p=4950:8:::::F4950_P8_DISPLAYID:464420312302
    TARGET=_blank>http://asktom.oracle.com/pls/ask/f?
    p=4950:8:::::F4950_P8_DISPLAYID:464420312302</A>
    Admittedly it's about Win95, but the principles should apply.
    Yours faithfully, Graham Reeds.
    [email protected] | http://omnieng.co.uk/

  • How to open and read Excel Sheet from SharePoint 2013 Document Library using C# Visual Studio 2012

    Hi,
    To achieve these are the steps that I had followed :
    1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
    2. Add Documnet Library link to Trusted Connection Proivder
    3. Open Visual Studio as Run as Administrator
    4.Create an SharePoint 2013 Empty Project.
    5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
    6.Service added successfully
    7.Create a class file and add the Service Reference namespace
    There is no such class as ExcelService to call. 
    Please let me know if somebody knows how to open the Excel file into C#(2012)  either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
    Requirement is :
    Need to read the excel sheet  from Document Library and transfer all data into DataTable.
    Please help asap. 

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • How to open and read backup disc

    I put the disc in drive and a window opens and I don't know how to get into contents of backup disc.

    You need to define the AllowFileAccessOutsideOfWidget key to Yes.
    You also need to define the AllowFullAccess key.
    You may also need to define the AllowSystem key (to Yes of course).
    Mihalis.
    PS. If you cannot find any other documentation please check http://widgetbook.blogspot.com.

  • How to open and display a powerpoint file.

    I'm working on an app that I would like to have open and view a powerpoint presentation. How would I go about doing this? Is there already some framework available that'll do it for me? Is there something that'll let me convert it to a pdf?
    thanks for any help

    And there may be, but you won't likely find that here. Do some time searching Google and maybe you'll find code that someone was nice enough to make freely available, although I wouldn't count on it. Were i a programmer and took the time to read those docs and write the code, I'd want to be paid for my time. But there are a lot of programmers who swear by freeware! You may get lucky.

  • How to open and read embedded pdf

    I have been forwarded an email to my macbook air with an attachment which containts embedded pdf's.  I cannot open or read the pdf's.  Can anyone tell me if I need to download an app to do this.
    Thanks.

    Apple's Preview will open PDFs.

  • How to open and read an OUTLOOK saved .msg eMail?

    In the Windows world at work - there are some files which are actually eMails in Outlook on Windows Vista and Windows 7 machines. But when I take the individual file.msg and try to open it, nothing. (If I change .msg to .txt I can see some of the message, but lots of garbage, too.
    I have OUTLOOK on a 30 day trial (with MS Office 2011) - but can't seem to open the message with that either - it goes into the attachments area and won't open.
    What can I do to read these messages? I have an entire folder of them and it would be nice to be able to read them on my Mac instead of going back to the office windows machine. (When I double-click on these files when on a Windows Vista computer with MS Office 2007 and Outlook installed, it just opens Outlook and the message is there. But on my Mac, it opens a new message in Outlook for Mac and then puts this entire message in the attached document area).
    Thanks for any comments!
    Best regards,
    Steve Schulte
    Thursday 17 February 2011

    With help from the 2 replies, I found this: http://download.cnet.com/mac/element-twentysix/3260-20_4-10099352.html
    While you can trial it to see if it can open your .msg file; to really take advantage of the power of this program *OutlookMSG Viewer*, you need to invest the $7.95 - then you have full formatted text in a MAIL message (which you can save or not in your INbox or other MAILbox) - plus full attachments - it is JUST SUPER!!! If this helps you to open just one critical Outlook .msg message then it pays for itself immediately. Batch translating etc. etc. - works perfectly -
    http://www.element26.net/ is the parent company's main website - you have to search a bit to find out just how to pay for it - but that is very fine once you find it - super fast, receipt, invoice, manual on-line (which I copied in pdf to my OutlookMSG Viewer Folder.
    Thanks for the fast replies - I thought I'd never read these files-- but now PERFECT
    Best regards,
    Steve Schulte
    Sunday 20 February 2011

  • How to open and edit a VBscript file?

    Hi,
    I'm fairly proficient with Dreamweaver CS3.  However, i'm finding one aspect of CS4 to be baffling to the extreme.
    I work with VBScript files.  When I open up a script file that includes other script files, the name of the parent file is seen on a tab (with an x to the right of it).  Below it are tabs for all of the files that are included (via an include statement in the code).  That's nice.
    When I click on one of the included files I see that file show up in my window.  However, I am unable at this point to get back to the file that included this one; i.e., the master file that is still above the other files.
    If I click on the tab for the master file, I don't see the contents of this file.  If I click on the small white paper icon (with the top right corner folded) on the left navigation bar, I see the name of the master file.  Selecting it still doesn't fill my editor window with the master file.
    There is a little symbol on the right side of the tabs for the included files.  (It looks like >>, except the arrows face down.)  This has the list of all of the files that I have open, minus the master file.
    It is very hard to believe that Dreamweaver would make CS4 this hard to use.  Unfortunately, I have no idea how to get the master file back in the editor window after I have clicked on one of the files it includes.  Can anyone point me in the right direction?  thanks.

    Hi,
    Use JDeveloper to import the mwp project .In Jdeveloper,File->Import->ToplinkWorkbench->Select the .mwp file and can work from JDeveloper in editing the tlmap.xml and session.xml.
    Regards,
    P.Vinay Kumar

Maybe you are looking for