Author Topic: Automation script question  (Read 555 times)

Offline brew

  • Newcomer
  • Posts: 47
Automation script question
« on: 2020 January 07 16:30:08 »
I have an automation script which uses a fileWatcher object to monitor a folder and BPP files when they are received. It is based on Juan's example; it works fine.

I start the PI instance when the system is rebooted (Windows 10) using the runstring
      "C:\Program Files\PixInsight\bin\PixInsight.exe" -n -r="D:\Dropbox\BrewSky\ACPHacks\PixInsight Scripts\SimpleFlatWatcher.js" --no-splash

This also works fine. However: since the program runs continuously (with a timer, the fileWatcher events, and a small modal dialog) the main PI window cannot be moved or iconified. I would just like to be able to put it out of the way while everything else is running. I only need to pop it up if there is an issue. In the current mode it is essentially my wallpaper since I can't manipulate the main window.

It runs with a small modal dialog which only has a Done button to exit the script. Can I make this dialog modeless or something so I can move the window?

I tried adding a second timer to call processEvents() every 2 seconds, but that didn't help.

I don't want to do the force-exit option - the script should run constantly while monitoring the folder.

Thanks,
brew