New topic: 

TextOutputStream .command executable in terminal

<http://forums.realsoftware.com/viewtopic.php?t=30554>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       ScoobyDoo           Post subject: TextOutputStream .command 
executable in terminalPosted: Mon Oct 19, 2009 4:12 pm                        
Joined: Tue Jun 03, 2008 5:20 pm
Posts: 25              dear all,

I have a perfect working (big) terminal script with the extension (.command) I 
would like to integrate into my application. 

If I have the script at a place (like the desktop) and run it with "sh.Execute" 
it just works out fine. 

Now the next step, I would like to integrate the script in the program, so I 
copied the text of the .command into a .Text (StaticText).
I then make a TextOutputStream and try to run the file on the same way, but 
that does not work. 

I tried a chmod 777, but did not resolve the problem.  When I look at the 
files, I can't see any difference between the original and the created file, 
but it does not run.

____________________________________________
The code to write the file:
  Dim f As FolderItem
  Dim t as TextOutputStream
  f = SpecialFolder.desktop.child("TEMP.command")
  t = f.CreateTextFile
  t.Write ConvertEncoding(StaticText.Text, Encodings.MacRoman)
  t.close
____________________________________________

The respons of the terminal is:
____________________________________________
Last login: Mon Oct 19 22:28:32 on ttys001
/Users/prive/Desktop/TEMP.command ; exit;
Maarten-iMac:~ prive$ /Users/prive/Desktop/TEMP.command ; exit;
logout

[Proces voltooid]
____________________________________________

 Anybody any clue ? I'm lost...
 
The Finder does recognize the file with the Terminal.   
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
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]

Reply via email to