How do I make it so when I right click a script and it has these blocks:
When Flag Clicked
wait 27 sec
it offers a offers a option to export as blockspecs and inputs. For example that turns into:
('when %m clicked' #S #-)
('wait %n27% secs' #t #wait:elapsed:from: 1)
so I want to get a text equivalent of a script!
Offline
Add code to all of the block morphs to add their current value to a variable passed into a method, then add to the right click menu something that starts this process off and writes the result to a file.
Example (which is clearly not going to work):
exportBlocks
| t1 |
t1 _ String new.
self script allBlocks do: [:t2 | t2 addCodeToString: t1].
t1 writeToFileNamed: 'exported'Offline
TheSuccessor wrote:
Add code to all of the block morphs to add their current value to a variable passed into a method, then add to the right click menu something that starts this process off and writes the result to a file.
Example (which is clearly not going to work):Code:
exportBlocks | t1 | t1 _ String new. self script allBlocks do: [:t2 | t2 addCodeToString: t1]. t1 writeToFileNamed: 'exported'
Cant it work like Jens' XML exporter?
Offline
Never seen that. Post a link please.
Offline
Yay thanks nXIII you saved me alot of code. Now can someone make something that exports all the costumes in a project!
Offline