Page 1 of 1

Global var [ExitCode]

PostPosted: Thu May 07, 2015 11:03 am
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

Re: Global var [ExitCode]

PostPosted: Thu May 07, 2015 6:53 pm
by Neosoft Support
That's a good idea. I'll add it to the list.

Re: Global var [ExitCode]

PostPosted: Fri May 08, 2015 6:44 am
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?

Re: Global var [ExitCode]

PostPosted: Fri May 08, 2015 7:37 am
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

Re: Global var [ExitCode]

PostPosted: Fri May 08, 2015 9:16 am
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

Re: Global var [ExitCode]

PostPosted: Fri May 08, 2015 11:20 pm
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