How to make program thread not easy to be killed?

We are developing a Simple ERP, and it have Staff Monitor Module, we plan to use Xojo to implement it, it need:

  1. Keep the monitor program thread hide.
  2. this monitor program thread Can’t not be killed easily
  3. have a guard thread.
  4. need to make screenshot in 1-600s, and save to JPG image and send to server.
  5. need to get computer idle time( more then 300seconds)
  6. We need make it run properly in Windows 7,8,10(64bit) and OSX 10.7 and 10.11(EI Captain)

please give us some detailed Implementation ways! thank you very much!

I think you’ll have more luck on the B4J forum.

especially since this seems to be at least the second time this exact post has appeared.
and it looks like Xojo deleted (and rightfully so) the first one, where I gave the same answer you did :slight_smile:

SORRY, we want to make it use XOJO, not B4J !

please give some ideas!

I’m not exactly sure what you’re looking for, but I’ll give a suggestion a shot on what I THINK you need:

You need to set up two separate applications. One is the main application, and the other is a watchDog application.
These two applications need a connection via a IPCSocket and they each need to constantly ‘ping’ one another.
If one fails, have it insure that the other isn’t already running and re-launch accordingly.

If somebody closes the main application, the watchDog will detect it and immediately (or causally, depending on how aggressive you want it) re-launch the main application.

If somebody closes the watchDog application, the main application will also detect it and re-launch the watchDog application.

You can have several watchDog applications all watching one another (making it more difficult for the end user to close them all before another is initiated).

Be forewarned; however, that this is a lot how malware and similar applications ensure that their service isn’t interrupted either… and you wanting to transfer screenshots on top of this, makes it sound a lot like this.

[quote=234906:@Eric Brown]I’m not exactly sure what you’re looking for, but I’ll give a suggestion a shot on what I THINK you need:

You need to set up two separate applications. One is the main application, and the other is a watchDog application.
These two applications need a connection via a IPCSocket and they each need to constantly ‘ping’ one another.
If one fails, have it insure that the other isn’t already running and re-launch accordingly.

If somebody closes the main application, the watchDog will detect it and immediately (or causally, depending on how aggressive you want it) re-launch the main application.

If somebody closes the watchDog application, the main application will also detect it and re-launch the watchDog application.

You can have several watchDog applications all watching one another (making it more difficult for the end user to close them all before another is initiated).

Be forewarned; however, that this is a lot how malware and similar applications ensure that their service isn’t interrupted either… and you wanting to transfer screenshots on top of this, makes it sound a lot like this.[/quote]

[quote=234906:@Eric Brown]I’m not exactly sure what you’re looking for, but I’ll give a suggestion a shot on what I THINK you need:

You need to set up two separate applications. One is the main application, and the other is a watchDog application.
These two applications need a connection via a IPCSocket and they each need to constantly ‘ping’ one another.
If one fails, have it insure that the other isn’t already running and re-launch accordingly.

If somebody closes the main application, the watchDog will detect it and immediately (or causally, depending on how aggressive you want it) re-launch the main application.

If somebody closes the watchDog application, the main application will also detect it and re-launch the watchDog application.

You can have several watchDog applications all watching one another (making it more difficult for the end user to close them all before another is initiated).

Be forewarned; however, that this is a lot how malware and similar applications ensure that their service isn’t interrupted either… and you wanting to transfer screenshots on top of this, makes it sound a lot like this.[/quote]

Could you give some code for two apps communication’s sample code ,and make screenshot’s code?

Hmm… I wonder if this is a language barrier: Sounds like you are asking them to make the project for you

Xojo offers several example projects how to use IPCSockets.

Edited to say Xojo.

Just see IPCSocket.xojo_binary_project in the Communications example projects, next to the Xojo executable.

And what about the make screenshot’s code? (Windows and OS X)

Best way to capture the screen (on Windows, as I don’t use OS X) is to incorporate API calls.

incorporate API calls, could you give some documents about incorporate API Calls in XOJO

https://www.monkeybreadsoftware.net/screenshot-screenshot-method.shtml

Could I have other ways except MonkeyBreadSoftware’s plugin?

See Take a screen capture from the command line

You can do that from a shell.

[quote=235110:@Michel Bujardet]See http://osxdaily.com/2010/07/11/take-a-screen-capture-from-the-command-line/

You can do that from a shell.[/quote]

Could I have other ways except MonkeyBreadSoftware’s plugin and shell?

Yes you can, but it does require reading Apple’s and Microsoft’s APIs, then writing declares in Xojo.
The two aforementioned methods are your quickest & simplest solutions.

Sounds like it’s time for you to go shopping for a consultant since you just want a finished solution :slight_smile: