New topic: 

Shell.mode=2 & 29r5

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

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       IIGS_User           Post subject: Shell.mode=2 & 29r5Posted: Sun 
Dec 06, 2009 10:47 am                               
Joined: Tue Oct 24, 2006 3:38 am
Posts: 47              In 2009r4, my code calling a shell command works perfect.
Shell.mode is set to 2, which enables interactivity.
My application calls the shell in a new class which runs an external 
application, while an optional Console Window is open, which lists all the 
output comming from the external application.

Now, in 2009r5, if shell.mode is set to 2, both my application as well as the 
external application (to be precise: Dapplegrey and DOSBox) both hangs and need 
to be terminated by the user.
If shell.mode is set to 1, the output of the external application will be 
written to my Console Window, but at the time the external application 
regularly quits.
If shell.mode is set to 0, no Console Window will be shown.

What do I have to do to get shell.mode=2 working again?

If it's not possible to get it to work again, I've to tell the user that the 
Console Window will be opened *after* closing the external application.
This seems not to be an option to me.

Code:dim activateDb as Boolean

activateDb=true

if app.dgminimize=true then
  Window1.SetWndwTitleShort
  Window1.Minimize
end if

app.s=new Shell
app.s.Mode=2

if Keyboard.AsyncOptionKey=true then
  MsgBox app.ausfuehren //the command which will be executed
end if
if DebugBuild then
  MsgBox app.ausfuehren //the command which will be executed
end if
app.s.Execute app.ausfuehren  //"DOSBox.app/Contents/MacOS/DOSBox -conf <path 
to config file>"
//This is a simplified example of the command to be executed, snipping all the 
pathes

'MsgBox "WindowCount="+str(WindowCount())+chr(13)+"Windows:"+window(1).Title
app.fm=app.s.Result
if right(app.fm,25)="No such file or directory" then
  MsgBox CantFindDosbText
end if

if (app.SavingConf=true) or (app.SavingLang=true) then
  activateDb=False
end if //savingconf

if activateDb=true then
  app.activateDOSBox //brings DOSBox to foreground
  'else
  'app.KillDOSBoxMethod
end if

end if
     
_________________
I don't want plug-ins, still on REALbasic 2009r5 on a PowerPC-based Mac with 
Mac OS X 10.4.11.  
                            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