FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   opening local files
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: opening local files  (Read 719 times)
5cameron

WWW
opening local files
« on: Mar 13th, 2005, 10:38am »

Hi all,
 
Is there a way to open local files in their default application from a Processing program? How about loading in JPG or GIF images into P5 dynamically from a local file path?
 
Thanks a million!
 
C
 
Aiko


Re: opening local files
« Reply #1 on: Mar 17th, 2005, 12:55pm »

Or.... is it possible to open an extern text file and use the data of that file?
 
fry


WWW
Re: opening local files
« Reply #2 on: Mar 17th, 2005, 11:27pm »

on Mar 13th, 2005, 10:38am, 5cameron wrote:
Is there a way to open local files in their default application from a Processing program How about loading in JPG or GIF images into P5 dynamically from a local file path

it's gonna be specific to your platform--it works differently on windows, macosx, and linux. searching google for info on Runtime.exec() to open files will do it. there are also some java utility classes out there that handle it in a cross-platform way to hide the nastiness as well.
 
fry


WWW
Re: opening local files
« Reply #3 on: Mar 17th, 2005, 11:28pm »

on Mar 17th, 2005, 12:55pm, Aiko wrote:
Or.... is it possible to open an extern text file and use the data of that file

see: http://processing.org/reference/loadStrings_.html
and http://processing.org/reference/loadBytes_.html
 
Aiko


Re: opening local files
« Reply #4 on: Mar 21st, 2005, 10:43pm »

on Mar 17th, 2005, 11:28pm, fry wrote:

see: http://processing.org/reference/loadStrings_.html
and http://processing.org/reference/loadBytes_.html

 
Thank you Fry!
 
Pages: 1 

« Previous topic | Next topic »