Source language: Translate to:

App doesn't close

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

App doesn't close

Postby Siegmar » Thu Sep 14, 2006 8:39 am

Hi, first let me tell you that I'm very happy to see what happened to Neobook! Some years ago I played a litte bit with neobook for DOS. But now, when I remembered Neobook and took a look on it, I was really surprised! That's a great Tool! I won't work again with all my other tools.

My problem:
I built a pub that opens an application. This application is a (neobook compiled) browserobject. RUN starts the app as it should. But CloseApplication does nothing.

The browserobject loads a radiostream and shows a picture. No scrollbar, no menu ... nothing else.

Any idea? Thank you in advance.

Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Gaev » Thu Sep 14, 2006 9:04 am

Siegmar:
RUN starts the app as it should. But CloseApplication does nothing.
... can you post the exact commands you are deploying ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Siegmar » Thu Sep 14, 2006 9:17 am

Run "[PubDir]browser.exe" "" "RunOnce" "" ""

And to close (in shutdown-action and menu):

CloseApp "[PubDir]browser.exe" "RequestClose"
Exit "" ""

Thanks, for the quick reply
Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Siegmar » Thu Sep 14, 2006 9:19 am

I forgot to say:

I also tried ForsedClose
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Gaev » Thu Sep 14, 2006 9:48 am

Siegmar:
And to close (in shutdown-action and menu):
... is the CloseApp command in your pub's ShutDown section ? ... if so, remember that when you test using F8 i.e. Run (this Page only), upon exiting your pub (say via the windows close button or a button in your application), this routine is NOT invoked ... to be sure, you might place an AlertBox command just before the CloseApp command, to verify that it is being serviced.

Another probable cause might be that while the Browser application (inside your browser.exe pub) is active, this request is not getting through ... so ...

a) try and replace [PubDir]browser.exe with notepad.exe in the Run and CloseApp commands

b) if that works, see if you can make it work with the Browser object in your browser.exe program Disabled ... to see if it is interfering with the received request to Close itself.


Also, try specifying a variable for the [AppID] in your Run command and then use it in your CloseApp command.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Siegmar » Thu Sep 14, 2006 10:13 am

Hi Gaev, thank you,

It is a little bit funny: I tried to disable the browserobjekt. In Neobook the Radiostream and the Flashpicture are visible/hearable because it's in the HomeURL of the browserobject.
I unmarked 'enabled'. Nothing happened. I closed the pub and opened it again. The browser is still visible/hearable. I controlled the settings: 'enabled' is unmarked !!!????

I solved my problem, while I put a closebutton into the browser. But I'm still interested in what the solution could be ...

Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Siegmar » Thu Sep 14, 2006 10:24 am

Forgot something again:

Notepad.exe works fine. And generally I start with the complete pub, I seldom make use of the single-site start.

Greetings, Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Neosoft Support » Thu Sep 14, 2006 11:04 am

Is your browser pub set to run in full screen mode? If so, there is an issue with the CloseApp action that affects full screen publications. This will be corrected in the next update. However, you should be able to use the current version with the force option. For example, try this instead:

Run "[PubDir]browser.exe" "" "RunOnce" "" "[AppID]"

CloseApp "[AppID]" "ForceClose"
Exit "" ""

You can also try adding a short delay between close and exit:

CloseApp "[AppID]" "ForceClose"
Delay "1000"
Exit "" ""
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Siegmar » Thu Sep 14, 2006 11:22 am

Thank you,
but also DELAY doesn't help. I think it could have something to do with the Link within the browser?

Maybe you try it yourself:
http://www.radiomontecarlo.net/RMC_04/R ... ma?radio=4

Put it in a new pup browserobjekt, run and close app. I would be astonished if it worked.

It must be the link,
or not?

I don't know,
Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany

Postby Gaev » Thu Sep 14, 2006 12:43 pm

Siegmar:

This works for me ...

a) I created JustBrowser.pub ... 800 X 600 window (in my 1024 X 768 screen) with title bar ... just one Browser Object in it ... with its Internet Address set to ... http://www.radiomontecarlo.net/RMC_04/R ... ma?radio=4 ... and compiled it to JustBrowser.exe

b) In another pub, I made two buttons ...
Code: Select all
Run "[PubDir]JustBrowser.exe" "" "RunOnce" "" "[AppID]"
... and ...
Code: Select all
CloseApp "[AppID]" "ForceClose"


c) Ran ( F8 ) second pub

d) clicked on first button

e) when the music started playing in JustBrowser's window, I switched back to first program and clicked its second button


... and the JustBrowser.exe window was gone ... perhaps you can try and duplicate this EXACTLY (including new name for program with Browser object) and see if it works ... then perhaps make incremental changes until it does not.

By the way, check in your (old browser.exe) program to make sure there is nothing coded in its ShutDown section that might prevent any attempt to close it.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Siegmar » Fri Sep 15, 2006 3:37 am

Thank you very much! Closing by variable works!
Greetings, Siegmar
User avatar
Siegmar
 
Posts: 23
Joined: Tue Sep 12, 2006 11:19 am
Location: Duisburg, Germany


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest