DONTWAIT: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
m (QBasic capitalisation)
Tag: visualeditor
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


{{PageSyntax}}
{{PageSyntax}}
: [[SHELL]] [{{KW|_DONTWAIT}}] [{{Parameter|commandLine$}}]
: [[SHELL]] [[[_DONTWAIT]]] [{{Parameter|commandLine$}}]




{{PageDescription}}
{{PageDescription}}
*Runs the command/program specified in {{Parameter|commandline$}} and lets the calling program continue at the same time in its current screen format.
*Runs the command/program specified in {{Parameter|commandline$}} and lets the calling program continue at the same time in its current screen format.
*Especially useful when CMD /C or START is used in a SHELL command line to run another program.  
*Especially useful when CMD /C or START is used in a SHELL command line to run another program.
* '''QB64''' automatically uses CMD /C or COMMAND /C when using SHELL.  
* '''QB64''' automatically uses CMD /C or COMMAND /C when using SHELL.
* '''QB64''' program screens will not get distorted or minimized like QBasic fullscreen modes would.
* '''QB64''' program screens will not get distorted or minimized like QBasic fullscreen modes would.


Line 16: Line 16:
{{PageExamples}}
{{PageExamples}}
{{CodeStart}}
{{CodeStart}}
{{Cl|SHELL}} {{Cl|_DONTWAIT}} {{Text|<nowiki>"notepad "</nowiki>|#FFB100}} + filename$


{{Cl|SHELL}} {{Cl|_DONTWAIT}} "notepad " + filename$
{{Cl|FOR}} x = {{Text|1|#F580B1}} {{Cl|TO}} {{Text|5|#F580B1}}
 
     {{Cl|_LIMIT}} {{Text|1|#F580B1}}
{{Cl|FOR...NEXT|FOR}} x = 1 {{Cl|TO}} 5
     {{Cl|_LIMIT}} 1
     {{Cl|PRINT}} x
     {{Cl|PRINT}} x
{{Cl|NEXT}}
{{Cl|NEXT}}
{{CodeEnd}}
{{CodeEnd}}
(opens up notepad at the same time as counting to 5)
(opens up notepad at the same time as counting to 5)

Latest revision as of 10:48, 24 March 2023

_DONTWAIT is used with the SHELL statement in QB64 to specify that the program shouldn't wait until the external command/program is finished (which it otherwise does by default).


Syntax

SHELL [[[_DONTWAIT]]] [commandLine$]


Description

  • Runs the command/program specified in commandline$ and lets the calling program continue at the same time in its current screen format.
  • Especially useful when CMD /C or START is used in a SHELL command line to run another program.
  • QB64 automatically uses CMD /C or COMMAND /C when using SHELL.
  • QB64 program screens will not get distorted or minimized like QBasic fullscreen modes would.


Examples

SHELL _DONTWAIT "notepad " + filename$

FOR x = 1 TO 5
    _LIMIT 1
    PRINT x
NEXT

(opens up notepad at the same time as counting to 5)

 1
 2
 3
 4
 5


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link