Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Opening and Closing a List
- PlantStar-Alpineer
-
Scratcher
20 posts
Opening and Closing a List
Is there a way to press a button to open a list, and press the same button to close it once it's opened?
- Reign_Sky
-
Scratcher
100+ posts
Opening and Closing a List
Not that I know of. Alternatively you could use the show and hide blocks for lists as your open and close
- sonicfan12p
-
Scratcher
1000+ posts
Opening and Closing a List
Not that I know of. Alternatively you could use the show and hide blocks for lists as your open and closeI think that's probably what they meant. Try this script!
when gf clicked
hide list [your list v]
set [list shown? v] to [1]
when [space v] key pressed
wait until <not <key [space v] pressed?>>
set [list shown? v] to ((list shown?) * (-1))
if <(list shown?) = [1] > then
show list [your list v]
else
hide list [your list v]
end
That should work like you want.

- Scratch---Cat
-
Scratcher
1000+ posts
Opening and Closing a List
I have a cubic solver ( once broken, just fixed ) shared.
See inside it.
See inside it.
- PlantStar-Alpineer
-
Scratcher
20 posts
Opening and Closing a List
Not that I know of. Alternatively you could use the show and hide blocks for lists as your open and closeI think that's probably what they meant. Try this script!when gf clicked
hide list [your list v]
set [list shown? v] to [1]
when [space v] key pressed
wait until <not <key [space v] pressed?>>
set [list shown? v] to ((list shown?) * (-1))
if <(list shown?) = [1] > then
show list [your list v]
else
hide list [your list v]
end
That should work like you want.
Thanks!
- Discussion Forums
- » Help with Scripts
-
» Opening and Closing a List