Getting Operator Inputs

From Shopbot Wiki

(Difference between revisions)
m
Line 4: Line 4:
There are several ways to get communicate with the tool operator, and to get and use answers from them.
There are several ways to get communicate with the tool operator, and to get and use answers from them.
-
'''The PAUSE command'''
+
== The PAUSE command ==
 +
 
A PAUSE command, without a time value after it or a comment before it, will display a "Continue" box like this.
A PAUSE command, without a time value after it or a comment before it, will display a "Continue" box like this.
Line 20: Line 21:
[[Image:BY_CommentPause.jpg]]
[[Image:BY_CommentPause.jpg]]
 +
== The INPUT command ==
-
'''The INPUT command'''
 
The INPUT command is much more useful and versatile, and let's the operator not on give answers to questions, but give the file numeric answers as well. An input statement like this
The INPUT command is much more useful and versatile, and let's the operator not on give answers to questions, but give the file numeric answers as well. An input statement like this
Line 38: Line 39:
(NOTE:) Be careful when using the INPUT statement to make sure that you check for all the possible inputs, in case the operator types in a incorrect value or something that you don't expect.
(NOTE:) Be careful when using the INPUT statement to make sure that you check for all the possible inputs, in case the operator types in a incorrect value or something that you don't expect.
 +
 +
 +
== The MSGBOX command ==

Revision as of 16:34, 18 January 2008

Contents

Getting Input from the Tool operator

There are several ways to get communicate with the tool operator, and to get and use answers from them.

The PAUSE command

A PAUSE command, without a time value after it or a comment before it, will display a "Continue" box like this.

Image:BY_JustPause.jpg

If the PAUSE command follows a comment, that comment will appear in a message box. The only options the operator has, though, is OK to continue or CANCEL to end the file. If you had these lines in your file:

'Start cutting now?
PAUSE

Then this box would appear on the screen:

Image:BY_CommentPause.jpg

The INPUT command

The INPUT command is much more useful and versatile, and let's the operator not on give answers to questions, but give the file numeric answers as well. An input statement like this

INPUT "How thick is your material?" &thickness

Would present the tool operator with this box, and whatever number they typed would be saved in the &thickness variable.

Image:BY_thicknessInput.jpg

You can also have the operator make decisions by giving them codes to type in, like this:

INPUT "Type (Y) to zero the Z-axis here." &ZeroAnswer

Image:BY_ZeroInput.jpg

(NOTE:) Be careful when using the INPUT statement to make sure that you check for all the possible inputs, in case the operator types in a incorrect value or something that you don't expect.


The MSGBOX command


Contributors
BillYoung, Gaston, Don
Personal tools