Page 1 of 1

Kill/Exit/Minimize a fullscreen application

Posted: Tue Aug 03, 2010 4:54 pm
by Lebostein
Hi,

how I can exit or minimize a fullscreen application? For example this:
Warning! Only way to exit is restart!

Code: Select all

InitSprite()
InitKeyboard()

ExamineDesktops()

b = DesktopWidth(0)
h = DesktopHeight(0)
d = DesktopDepth(0)

OpenScreen(b, h, d, "")

Repeat

ExamineKeyboard()

ClearScreen($0000FF)
FlipBuffers()

ForEver
It seems that PB applications with Keyboard() library blocks all system shortcuts....

Re: Exit a fullscreen application.

Posted: Tue Aug 03, 2010 5:00 pm
by KJ67
Have you looked at KeyboardInkey()?

Re: Exit a fullscreen application.

Posted: Tue Aug 03, 2010 8:52 pm
by michel51
Lebostein wrote:Hi,

how I can exit or minimize a fullscreen application? For example this:
Warning! Only way to exit is restart!

Code: Select all

InitSprite()
InitKeyboard()

ExamineDesktops()

b = DesktopWidth(0)
h = DesktopHeight(0)
d = DesktopDepth(0)

OpenScreen(b, h, d, "")

Repeat

ExamineKeyboard()

ClearScreen($0000FF)
FlipBuffers()

ForEver
It seems that PB applications with Keyboard() library blocks all system shortcuts....
Hello Lebostein,
this is an endless loop :!:
You have to put in a possibility to leave the loop.
Try instead of <ForEver> the following:

Code: Select all

Until KeyboardPushed(#PB_Key_Escape)
or similar code.
Also a If - Endif with break condition is possible before ForEver.

Hope you understand my "german" english :-)

Re: Exit a fullscreen application.

Posted: Tue Aug 03, 2010 9:00 pm
by Lebostein
michel51 wrote: this is an endless loop :!:
Yes! That is the point. How I can exit/kill/minimize a program with an intentional/unintentional endless loop like that?
With Windows I can press ctrl+alt+entf (task manager) in every case. But with Mac OS? Why all system shortcuts like cmd+m (minimize) or cmd+alt+esc (task manager) are blocked in PB fullscreen application? Its a PB specific problem or generally?

Re: Kill/Exit/Minimize a fullscreen application

Posted: Tue Aug 03, 2010 10:35 pm
by Vera
Hi,

to block cmd+alt+esc (task manager) I think is really a bad idea :|
but I had in mind that on WIN you can exit a fullscreen-app by using ALT+TAB to switch between open applications - is there no such feature on MAC ?

greetings ~ Vera

Re: Kill/Exit/Minimize a fullscreen application

Posted: Wed Aug 04, 2010 5:24 am
by WilliamL
Yes, 'cmd+alt+esc' (or the Apple menu 'Force quit') won't cause any problems, it will just 'force quit' the program you select. I've done this many times :oops: and in this situation you are only quitting the app and not the IDE.

Hey, vera, you have a Mac?

Re: Kill/Exit/Minimize a fullscreen application

Posted: Wed Aug 04, 2010 1:11 pm
by michel51
WilliamL wrote:Yes, 'cmd+alt+esc' (or the Apple menu 'Force quit') won't cause any problems, it will just 'force quit' the program you select. I've done this many times :oops: and in this situation you are only quitting the app and not the IDE.

Hey, vera, you have a Mac?
Hi William,
You are right. But I think, Lebostein will not quit the IDE, but the endless running application.
In this case 'cmd+alt+esc' (or the Apple menu 'Force quit') is the only way to finish the application.

Re: Kill/Exit/Minimize a fullscreen application

Posted: Wed Aug 04, 2010 8:08 pm
by Lebostein
The problem is: cmd+alt+esc don't work!

Simple question: How I can kill a fullscreen application?

OK, I have disarmed my code. Please try to minimize or kill this without pressing [E]:

Code: Select all

InitSprite()
InitKeyboard()

ExamineDesktops()

b = DesktopWidth(0)
h = DesktopHeight(0)
d = DesktopDepth(0)

OpenScreen(b, h, d, "")

Repeat

ExamineKeyboard()

ClearScreen($0000FF)
FlipBuffers()

Until KeyboardPushed(#PB_Key_E)

Re: Kill/Exit/Minimize a fullscreen application

Posted: Wed Aug 04, 2010 10:26 pm
by michel51
Lebostein wrote:The problem is: cmd+alt+esc don't work!

Simple question: How I can kill a fullscreen application?

OK, I have disarmed my code. Please try to minimize or kill this without pressing [E]:

Code: Select all

InitSprite()
InitKeyboard()

ExamineDesktops()

b = DesktopWidth(0)
h = DesktopHeight(0)
d = DesktopDepth(0)

OpenScreen(b, h, d, "")

Repeat

ExamineKeyboard()

ClearScreen($0000FF)
FlipBuffers()

Until KeyboardPushed(#PB_Key_E)
cmd+alt+esc works fine on my Mac, with and without debugger.
The program will be killed directly (red screen), the IDE is active.

Which version of PB do you have? Which Mac OS? Intel-machine?
May be, there is the reason for your problem.