1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 10:30:36 +00:00
QB64-PE/internal/help/_CONSOLE.txt
SteveMcNeill 33adc04fc4 Add temp folder to repo. It's necessary as well!
Just more initial setting on... nothing much to see here.
2022-04-28 13:39:56 -04:00

64 lines
2.3 KiB
Plaintext

{{DISPLAYTITLE:_CONSOLE}}
The [[_CONSOLE]] statement can be used to turn a console window ON/OFF.
{{PageSyntax}}
: [[_CONSOLE]] {OFF|ON}
: _DEST [[_CONSOLE]]
* [[_CONSOLE]] OFF or ON must be used after the [[$CONSOLE]] [[Metacommand]] has established that a console window is desired.
* [[_CONSOLE]] OFF turns the console window off once a console has been established using [[$CONSOLE]]:ON or ONLY.
* [[_CONSOLE]] ON should only be used after the console window has been turned OFF previously.
* [[_DEST]] [[_CONSOLE]] can be used to send screen output to the console window using QB64 commands such as [[PRINT]].
* [[_SCREENHIDE]] or [[_SCREENSHOW]] can be used to hide or display the main program window.
* The [[$SCREENHIDE]] [[Metacommand]] can hide the main program window throughout a program when only the console is used.
* '''Note:''' Text can be copied partially or totally from console screens in Windows by highlighting and using the title bar menu.
:: To copy console text output, right click the title bar and select ''Edit'' for ''Mark'' to highlight and repeat to ''Copy''.
{{PageExamples}}
''Example 1:'' Hiding and displaying a console window. Use [[_DELAY]] to place console in front of main program window.
{{CodeStart}} '' ''
{{Cl|$CONSOLE}}
{{Cl|_CONSOLE}} OFF 'close original console
{{Cl|_DELAY}} 2
{{Cl|_CONSOLE}} ON 'place console above program window
{{Cl|_DEST}} {{Cl|_CONSOLE}}
{{Cl|INPUT}} "Enter your name: ", nme$ 'get program input
{{Cl|_CONSOLE}} OFF 'close console
{{Cl|_DEST}} 0 'destination program window
{{Cl|PRINT}} nme$
{{Cl|END}} '' ''
{{CodeEnd}}
: ''Explanation:'' The [[_DEST|destination]] must be changed with [[_DEST]] [[_CONSOLE]] to get [[INPUT]] from the [[$CONSOLE]] screen.
''Example 2:'' [[_CONSOLETITLE]] can be used to create a console title, but it must be redone every time the console window is restored once turned off:
{{CodeStart}} '' ''
{{Cl|$CONSOLE}}
{{Cl|_CONSOLETITLE}} "firstone"
{{Cl|_DELAY}} 10
{{Cl|_CONSOLE}} OFF
{{Cl|_DELAY}} 10
{{Cl|_CONSOLE}} ON
{{Cl|_CONSOLETITLE}} "secondone"
{{CodeEnd}}
: ''Note:'' Some versions of Windows may display the program path or Administrator: prefix in console title bars.
{{PageSeeAlso}}
* [[$CONSOLE]], [[_CONSOLETITLE]]
* [[$SCREENHIDE]], [[$SCREENSHOW]] {{text|(QB64 [[Metacommand]]s)}}
* [[_SCREENHIDE]], [[_SCREENSHOW]]
* [[_DEST]]
{{PageNavigation}}
<