Global var [ExitCode]

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Locked
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Global var [ExitCode]

Post by HPW »

Hello,

Inspired by this topic: viewtopic.php?f=1&t=21139

How about a new global variable called [ExitCode] ?
Default is 0 and can be set to any integer.
Code would be returned from the neobook app. Similar to popular cmd-tools in windows universe.
Could be usefull in automated tool-chains.

Regards
Hans-Peter
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Global var [ExitCode]

Post by Neosoft Support »

That's a good idea. I'll add it to the list.
NeoSoft Support
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Global var [ExitCode]

Post by dpayer »

I read the referenced post but I don't understand something.

If an exit code is created, how would it be recorded when the app is closed unexpectedly or in some manner that doesn't allow you to record the code for future reference?
David Payer
Des Moines, Iowa
USA
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Global var [ExitCode]

Post by HPW »

If an exit code is created, how would it be recorded when the app is closed unexpectedly or in some manner that doesn't allow you to record the code for future reference?
A calling-app or batch can read the exit code and react on its messagge-id.
Kind of reverse way of commandline-parameter.

Run "[PubDir]myapp_with_exitcode" "" "RunOnce+Wait" "" "[AppId]".
Through "[AppId] the following variables exist: [AppID.ProcessID], [AppID.ProcessHandle], [AppID.WinHandle] and [AppID.ExitCode].


Regards
Hans-Peter
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Global var [ExitCode]

Post by dpayer »

HPW wrote: A calling-app or batch can read the exit code and react on its messagge-id.
Kind of reverse way of commandline-parameter.

Run "[PubDir]myapp_with_exitcode" "" "RunOnce+Wait" "" "[AppId]".
Through "[AppId] the following variables exist: [AppID.ProcessID], [AppID.ProcessHandle], [AppID.WinHandle] and [AppID.ExitCode].
So the calling app will be constantly updated with the value of [AppID.ExitCode] by the 'myapp' ?

D
David Payer
Des Moines, Iowa
USA
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Global var [ExitCode]

Post by HPW »

So the calling app will be constantly updated with the value of [AppID.ExitCode] by the 'myapp' ?
When constantly means on each run-call, yes.
When the run commands feds some params to myapp, then you can Transport a result integer back to the caller.
Would be a simple direct way of communication, besides other options and workaround like external files or clipboard.

Regards
Hans-Peter
Locked