New topic: Open Text File For Input
<http://forums.realsoftware.com/viewtopic.php?t=46839> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message dbellerue Post subject: Open Text File For InputPosted: Wed Feb 06, 2013 8:49 am Joined: Mon Jan 21, 2013 6:05 pm Posts: 16 I want to open a text file for input. I want to avoid the open dialogue, because I know the filenamde. How do I do this? Top DaveS Post subject: Re: Open Text File For InputPosted: Wed Feb 06, 2013 9:11 am Joined: Sun Aug 05, 2007 10:46 am Posts: 4500 Location: San Diego, CA First off read the documentation dim f as folderitem dim t as textinputstream dim s as string f=speccialfolder.desktop.child("mydata.txt") ' change this line to point to where your file really is t=textinputstream.open(f) s=t.readall ' this string now holds the entire contents of your file [see also t.read and t.readline t.close _________________ Dave Sisemore MacPro, OSX Lion 10.7.4 RB2012r1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
