Source language: Translate to:

Global var [ExitCode]

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Global var [ExitCode]

Postby HPW » Thu May 07, 2015 11:03 am

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
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Global var [ExitCode]

Postby Neosoft Support » Thu May 07, 2015 6:53 pm

That's a good idea. I'll add it to the list.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Global var [ExitCode]

Postby dpayer » Fri May 08, 2015 6:44 am

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
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Global var [ExitCode]

Postby HPW » Fri May 08, 2015 7:37 am

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
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Global var [ExitCode]

Postby dpayer » Fri May 08, 2015 9:16 am

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
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Global var [ExitCode]

Postby HPW » Fri May 08, 2015 11:20 pm

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
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests