How to start/run/open a file programmatically?

Is it possible to start a file programmatically? I want to give tha path to a file and launch the file with its associated default application.

For example, I want to be able to do this:

Start ("sample.jpg")-> as a result, the image is opened with its associated Viewer

Start("info.pdf")-> Accordingly, the pdf file is opened with its associated pdf viewer, if available

("Music.mp3") start-> start the mp3 with the default player

I just found this thread:

http://supportforums.BlackBerry.com/T5/Java-development/open-a-file-in-a-default-application/TD-p/23...

It seems to be a solution. I will write again once I have check if this approach works for me.

Tags: BlackBerry Developers

Similar Questions

  • How do I run the .srt files in wmp 12

    original title: How do I run the .srt files this subtitle files in wmp 12 s? I downloaded directvobsub... but it isn't working...

    I bought a sony vaio e series laptop computer... I downloaded movies to watch and I'm interested to watch in vlc or other players, so I need to know how to watch movies with subtitles... Please help me

    my laptop i5 processor and it is x 64 bit...

    Hello, Sathyasheelan,

    HOW to: Watch movies and TV shows with subtitles

    http://hellboundbloggers.com/2010/06/03/watch-movies-and-TV-series-with-subtitles/

  • The bkf files: How can I now open the file and restore my files under windows 7?

    I did a backup on my old computer using the backup program that is under system tools in windows xp. How can I now open the file and restore my files under windows 7?

    See the Description of the Windows NT backup utility restore utility for Windows 7 and Windows Server 2008 R2

  • The network location of my folders in offline mode has changed while I was offline. How to re - run my offline file path to the new location so I can sync?

    The network location of my folders in offline mode has changed while I was offline. (HE moved to a new server).  How to re - run my offline file path to the new location so I can sync?

    Windows System 7.
    Hello
    Welcome to the Microsoft community forums!
    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.
    Hope this information helps.
  • How to create a new Excel file programmatically

    Hello!

    I'm documenting the data acquired permanently in an excel file, what I have to do is to create a new file, excel automatically when the size of the previous file exceeds a certain limit lets say 1 MB.

    I tried using the function ' create/open a file ' simple and function "Write in the spreadsheet file" to create the new excel file. I don't create a file but when I open the file, it says the file format is not what you have opened with.

    Also, when the new file is created, three new worksheet must be added programmatically with the name of the predefined spreadsheet and also the column headers for each worksheet must be added.

    I also use "Labview Report Generation Toolkit for Office."

    Kind regards

    Reeves

    @Reese

    Thank you! I would like to see the copy of the file and rename it.

    PSI has managed to create a new excel file myself and I have attached the solution in this post.

    Reeves

  • How to start a local HTML5 file automatically as a link?

    Hi, I started to learn the DPS two weeks ago and had a lot of fun. But yesterday, I had a problem how to start a weblink autmaticially. The checkbox in the control panel overlay creator to enable auto-start does not clicking on it. And the default is inactive. The other boxes in the Panel do not react too. This problem would be an InDesign bug? Basically, what I tried to do... .i inserted a HTML5 local file as an weblinki l is shown on my iPad after synchronization. But I have to tap on it to show the HTML content - but I want to start automatically.

    Thanks for your comments. I hope you, someone could help me.
    Bert Bye

    Something is wrong with your Setup. Try removing the InDesign preferences. If this does not work, try to uninstall and reinstall the tools DPS.

  • How to display recently opened / read files-history

    Hello. Under XP, it was rather simple, but for some reason that I haven't figured in Vista where and how can I watch my recent activities on Windows Vista. In XP, you can do that as in Solution Explorer, but I guess that's not so easy in WVista? Someone knows the answer to this question please answer, thx!

    There are several ways.

    1. Click Start and click on recent Articles to see your recent articles (although to be honest, it does not work all that well because what it sorts alphabetically instead of date used).

    2. Click Start and click on and then highlight the folder called Recent and open it.  There's your recent activity in Vista (and more than you see using the method above).  You can sort in various ways by clicking on the column headers.  If you wish, you can crreate a shortcut of this file (right click the folder, and then click on create a shortcut) and then place the shortcut on your desktop so that it will be easier to access.

    3. in Windows Explorer, you can go to C:\Users\\Recent and view the same folder you accessed quickly using method 2 above.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • 09 pages start without opening any files that have been opened before

    I find that Pages and preview and more everything to always come on "refractory".

    I restart my Mac or that you leave the Pages 09 and when I run the application Pages 09 he recalled ten documents I had open and opens to them.

    It takes a lot of time.

    Can I start Pages without all the docs that have been opened, when he went haywire have revived?

    I just want to start with no docs.

    Thank you

    Tom

    It is always a good idea to save and close all open documents. Should hang the system, failed, or through power failure, open documents are at risk.

    In system preferences: General, select shut down windows when you exit an application. From the Apple menu, both the reboot... and stop... the dialogues have a checkbox that will again open windows when you log in. Make sure they are turned off.

    The foregoing background window-free cool boots.

  • How to start running cc2015 ch & Lr on my new iMac.

    Hello

    I've been running photoshop and lightroom on my iMac and now have replaced the mac that the former was a bit past. How can I do to make the software the new machine, like also to add cc if possible my new macbook air. also I did turn the lightroom from an external hard disk catalog I now intend to move on the the new Fund HD, is better to redirect lightroom or just start a new catalog once the images are loaded onto the hard drive?

    Hello

    Please click on the link below to download Adobe Creative Cloud desktop application:

    https://creative.Adobe.com/products/creative-cloud

    NOTE - on your old mac if you didn't disable the creative cloud subscription, then on your new machine it might encourage them to disable the creative cloud from previous to go forward machine and do and then connect you to activate your creative cloud on the two new machines see, connect and disconnect enable Cloud Creative applications

    Then follow the steps described in the link on how you can install Adobe applications and get started below:

    Download and install Adobe Creative Cloud apps

    Let us know if that helps.

    Kind regards

    Bani

  • How to stop pse10 open automatically files?

    Just started upwards and all my files items emerged, most of which I didn't open.

    What operating system? If you mean you are using a mac with 10.7 or higher and that all your windows open to the previous editing session, Yes, that's what happens, even if you closed them before leaving. You can stop it by going to System Preferences > general and turn off this check box:

    but will for all programs, not only of PSE.

  • Please let me know how to start firefox in SafeMode to my windows 2000 server.

    I installed R-kiosk and now I am unable to remove it. In windows 2000, there is no folder for firefox.
    So please let me know how to start firefox in safe mode on a windows 2000 OS...

    Thank you very much...
    But I just solved the problem. I haven't done

    Start > run >
    "C:\Program Files\Mozilla Firefox\firefox.exe"-safe-mode
    Safe mode started...

  • How to start the tool captures

    Windows 7. How to start running the tool captures? Cannot be found in the start menu. How about a keyboard shortcut?

    What version of Win7? Starter and I think that basic home edition does not include the capture tool.
     
    Type cutting tool in the start menu. Search box. If you find, create a shortcut on the desktop.
  • Help the action of the button to open a file that is attached to the main pdf doc

    Hello

    I created a button and used an icon saying "click here...". "the action I want to join him, is having on the mouse down to open the file that is attached to the document.

    Is this possible?  If so, how direct the acton "open a file" to be laid down in the document?  path can not understand...

    He had an idea of how to make a javascript button action to open the fixing Panel...

    That's what was written... and then below that is my question about what was written...

    Thomp wrote:
    Try thisif (app.viewerVersion < 8)
    app.execMenuItem (...);
    on the other
    app.execMenuItem (...);
    What would go in the "(...)" above?

    I am very poor in javascript, but I'm guessing that there is something that I need to fill? Am I wrong?
    Thank you...
    I, too, am trying to get my button action to open the attached document in my form pdf - NOT the navigation panel... I've already done this...
    Thanks again for all your comments!

    Hi sicilianmissy65,

    Try this.  Attach the file you want to open in your main PDF.  Now, to add a button and in the dialog box properties on the Actions tab, select go to a Page view and click the Add button.  A small dialog box will appear to the top heading create go to View - don't do anything with it yet.  Now, double-click the attached PDF file to open it.  Now click the set link in this dialog box.  In the main dialog box, you should now see in the action area-

    Navigate to a Page in another document

    Attachment file:PDF

    Hope this helps,

    Dimitri

    www.pdfscripting.com

    www.windjack.com

  • Help! A virus disabled my ability to computers to run an exe file when he clicks on or 'open' is used. 'Start' still works...

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem all right, people, it's really weird.  Just surfing the net and a few page popped up a window, Windows defender, either real or double window that seemed to be some kind of virus scan running and find all kinds of infections.  Search on my drive for files of virus claimed, however, nothing found.  Zone alarm has warned that a program named av.exe was trying to access various resources, which I refused him permission to do.  I closed the browser and activate zonealarm internet lock.  Now, by clicking on any desktop icon rather began the av.exe program, same as before.  I used the Task Manager to end.  Finally, I found the file av.exe, a hidden file in the documents and settings/Peter/application data / directory and deleted.  So now, either by clicking on any application, destop, or the menu, including the Panel, appears a window wondering what program I want to use to open the file, or a warning that no file association is defined for the file.  Linking screen for the Windows Explorer file reports assoiations appropriate for all files, but does not list the exe or com all file extensions.  Attempt to add them (abandoned) presented a screen that windows already knew they were applications.  So now I'm at a loss.  This little beastie hurt not only managed to get by zone alarms various filters and screens, but itself installed and screwed with stuff.  I can't start applications normally.  To right click and use "start" from the pull down.  And some processes that are expected to be called by other programs to run into the same problem, so do not work.  I ran a system restore (had to do it from safe mode to make it work) for a few days, before this problem, but it doesn't fix it.  Nor, do one of the registry scanners I ran to try to find errors.  found a bunch, but the problem remains.
    • I'm puzzled.  What should do?   How can I reset windows to know that an exe file "opening" means to run the program?    Oh, and at this point, restart now does not start most of the things that are supposed to start on a startup, zone alarm, mouse drivers, etc..  Even the appearance of the taskbar has changed its background color blue back...
    • Thanks for your suggestions?

    You can download the fix here: -.
    Windows® XP file association fixes (Copyright 2003 - Doug Knox)
    http://www.dougknox.com/XP/file_assoc.htm
    EXE file Association problem (association of default restore for EXE files)

    http://WindowsXP.MVPs.org/exefile.htm
    Cannot run EXE files - programs don't open

    Now to clean your computer. TaurArian [MVP] 2005-2010 - Update Services

  • How do open Applescript AI can open the file and then run ExtendScript then close?

    Here is the code sample Applescript that I came with the help of the script guide/reference for CS6 and by doing some research online:

    Tell application "Adobe Illustrator"

    activate

    period of 10

    pfilepath the value "/ Users/username/Documents/Temp/someFile.ai".

    the pfile POSIX file pfilepath value

    Open the pfile as alias without options

    period of 10

    do javascript "#include" / Users/username/Documents/Temp/someScript.jsx ".

    delay 1

    quit smoking

    tell the end

    I just want to open the app (example here for, but also pleasant to do same for Photoshop), open a file, then run the ExtendScript file against her, and then close after treatment. With this example script, all that works is the app starts. No file not opened, any script executed, app does not close at the end. I see no error doesn't pop up or anything appear in the command prompt.

    Just ExtendScript sample triggers an alert popup for the test message

    Also note, the Applescript code snippet is executed from Python, but I think where/how it runs shouldn't matter (except perhaps where the error messages may appear). But in the worst case, I'll debug/run through the AppleScript Editor.

    Some tips on what's not here? Or is it technically correct?

    It solved here: MacScripter / POSIX Pass file path to Adobe Illustrator to run ExtendScript

Maybe you are looking for

  • How to restore the new PIN tab older versions of firefox?

    I recently updated my version of Firefox to V.33 and I really don't like the layout of the websites suggested or "pinned". The previous version, I used had only three "pins" to a row with three columns, giving me a total of 9 "pinned" sites This new

  • Pavilion 15 windows 8: unable to connect wifi

    Can I find out where I can connect to WiFi? I m using Hp pavilion. 8 the window.

  • Why my windows keep freezing?

    Why my windows keep freezing? It's funny because it started to happen after I replied to a few things about illuminati on youtube. But after that, it kept saying error post comment. So I disconnected my account and connected to another one of my acco

  • remove users unathorized who hacked my system__ of exploitation

    someone attacks my computer and the microsoft security essentials does not detect the problem or users that have full control of my system they connect as administrators and perform tasks in the background

  • External hard drive Western Digital

    I have a Western Digital external hard drive, WD CAviar WD1200BB... it worked great except every now and then Windows would not recognize it.  This is easily fixed by unplugging the USB cable, wait a few seconds and then it reconnect.  Recently, my c