if the optionkey is down then put script of me into bkgnd field lowerpane
set cursor to 2
get the rect of me
BarButton
put the result into bkgnd field results
end mousedown
-- part 2 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=325 top=240 right=259 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name:
----- HyperTalk script -----
on mousedown
if the optionkey is down then put script of me into bkgnd field lowerpane
set cursor to 2
get the rect of me
BarButton
put the result into bkgnd field results
end mousedown
-- part contents for card part 3
----- text -----
This is an example of what the text will look like on the screen.
-- part contents for background part 1
----- text -----
xzcvxcvxcvxcxcxcv
-- part contents for card part 5
----- text -----
The "Button Bar" is an easy way for the HyperCard user to choose numeric values. It is an XCMD which works a bit like a scroll bar, but you can choose the height, width and direction the bar moves. You may also specify the range of acceptable values (more on that later.)
Over to the right are two simple Button Bars. When you click inside the button, the cursor changes to a thin cross and the bar moves up to the cursor.
Note that the two buttons' scripts are identical, even though one bar moves bottom to top and the other left to right. The XCMD automatically uses bottom to top if the button rect is taller than it is wide.
-- part contents for card part 6
----- text -----
To look at the script for any button or field on this card, hold the Option key as you click on the object.
-- part contents for card part 4
----- text -----
on mousedown
if the optionkey is down then ¬
put script of me into card field id 4
set cursor to 2
get the rect of me
getbarvalue
put the result into bkgnd field id 4
end mousedown
-- part contents for card part 9
----- text -----
To look at the script for any button or field on this card, hold down the Option key as you click on the object.
-- part contents for card part 14
----- text -----
"the result": 
-- part contents for background part 8
----- text -----
To look at the script for any button on this card,
hold down the Option key as you click on the button.
-- part contents for background part 3
----- text -----
"the result":
-- part contents for background part 10
----- text -----
The "Bar button" is an easy way for the HyperCard author to ask for numeric values. It is an XCMD (eXternal CoMmanD) which works a bit like a scroll bar, but you can choose the height, width and direction the bar moves. You may also specify the range of acceptable values (more on that later.)
Over to the right are two simple Bar buttons. When you click inside a button, the cursor changes to a thin cross, and the bar moves up to the cursor. When you release the mouse button, the "value" of the cursor position is returned in "the result". The script for the buttons on this page then put "the result" into the field in the lower right corner of the card.
Note that the two buttons' scripts are identical, even though one bar moves bottom to top and the other left to right. The Bar button automatically operates bottom to top if the button's rectangle is taller than it is wide.
Try changing the size or shape of the buttons. They can be any size, even the whole width of the screen.
Click on the right arrow below to go to the next page...