Can Playbasic over-ride other software?

Started by Randomise, March 16, 2012, 06:40:32 PM

Previous topic - Next topic

Randomise

Specifically, could it run in the background and blank the screen while other software is running (such as web browser, or Flash app's)?

I want to create some software that motivates exercise, by blanking the PC screen when an exercise bike isn't being ridden (simply job to connect a controller up for the input needed).

Randomise

Also, can Playbasic create an always-on-top window, for showing distance travelled, etc?

kevin


yes, you can tell the window to be always on top.  It's not a PlayBASIC thing, it's a Windows API thing.

Randomise

Thanks Kevin. What about over-riding other software, so allow blanking of the screen when specific input isn't being supplied?

kevin


I don't really think i'm following your question..  if you want the program to not draw anything, then you don't draw anything..




Randomise

Well, I want the software to run with a small always-on-top window, but have it run in the background so that the user can use other software (probably only a web browser). When the Playbasic program detects that a controller input has *stopped*, it will draw a black screen. The black screen will only be removed when the input starts again.

Or, I want the screen to go black when someone stops pedalling an exercise machine, but still be able to use other software while the Playbasic program is sitting there.

kevin



SetFPS 60


print "keep pressing space to keep message on screen"
sync
waitkey

lastINputTime=Timer()

do

   CurrentTime=Timer()

   TimeBetweenInputs=CurrentTime-LastInputTime

   cls 0

   ; compare elapsed time to a max of 1 second for this test
   if TimeBetweenInputs<1000
   
       ; if the space barw as press less than a second ago, display message
       print "Well done keep pressing space"

   endif

   ; check if the space bar being pressed
if spacekey()
       LastInputTime=CurrentTime
endif
   
   sync
loop esckey()


Randomise