Does Blockly have a file selector?

I am looking to use Blockly to allow non-techie users to specify test scripts.One part of it will require a File Selector, however, I can't see that Blockly has one. Does it?Actually, I can't find a complete list of standard blocks. Does anyone have a URL?If there is no standard Blockly File Selector, (how) can I access the Windows File Selector? (and how, in general, can I execute DOS commands?)...Read more

visual programming - Javascript to dom - Blockly

I am building a simple editor using Blockly. User can save generated javascript to server and can download as 'txt' file. User can also import the notepad file to editor (notepad file contains generated javascript). How to build blocks from the javascript. There is a method for xml to dom ('domToWorkspace') conversation but the same is not available for javascript. Is there any function to convert or am I missing something?...Read more

Blockly how to prevent concatenated blocks from splitting

In my toolbox.xml I have created a custom block by concatenating multiple blocks, something like <block type="my_custom_type"> <value name="LIST_REQUIRED"> <block type="lists_create_with" inline="true"> <mutation items="3"></mutation> <value name="ADD0"> <block type="get_variable"/> </value> <value name="ADD1"> <block type="get_variable"/> </value> <value name="ADD2"> ...Read more

Blockly change colors

I need to change the background of the toolboxI tried to change in (it doesn`t work)<style>#blockly { position: fixed; } #blocklyMask { background-color: #f0f8ff; } </style>In addition I need to change the border colors of blocks. Tried to play with stroke parameters with no progress Blockly.defineBlocksWithJsonArray([{ "type": "ball_number", "lastDummyAlign0": "CENTRE", "message0": "ball_number%1", "strokeColour": "#00ff00", "strokeWidth": "5", "args0": [{ "...Read more

Blockly - not producing consistent results on different computers

I'm working on a Blockly project. I just changed computers.When I run on my new computer to compress the files, it produces a version of blocks_compressed.js that does not work. When I try to use it, none of my blocks display, because it thinks the colour property is set to an undefined variable.On my old computer, I can produce a blocks_compressed that works fine.I copied the entire blocks directory from my old computer to to the new one, but still get different results.When I open the files, they appear to have the same number of lin...Read more

Blockly: How to obtain value of a Dropdown or Checkbox Block

I´m new to Blockly and can not find a way to obtain field value of a dropdown or checkbox.Lets consider following scenario (generated with blockly-dev-tools): Blockly.Blocks['feature'] = {init: function () { this.appendDummyInput() .appendField("Feature") // just for label .appendField(new Blockly.FieldDropdown([["manufacturer", "feature_manufacturer"], ["profile", "feature_profile"], ["glas", "feature_glas"]]), "category"); // for dropdown values this.appendValueInput("feature_name") .setCheck("String") .setAlign(Blockly.ALIGN_R...Read more

Read user entered input in blockly block

I have the below code in my blockly.js file Blockly.Blocks['account_number'] = { // Other type. init: function() { this.jsonInit({ "message0": "account_number %1", "args0": [{"type": "field_input", "name": "TYPE", "text": ""}], "output": "Type", "colour": 320, "tooltip": "Custom type to allow.", "helpUrl": "" }); }};I am using this in my index.html as follows<category name="sender" colour="%{BKY_MATH_HUE}"> <block type="account_number" name="accn...Read more

Storing and retrieving files in Blockly Web

I want to use Blockly to do some calculations, and then generate text files (as opposed to exporting code to JavaScript, Python, PHP, etc.)I can’t see an obvious way to create my own blocks to do this in Blockly, so using AppInventor (Version: nb168), I got storing and retrieving files to work, in a crude test app on my Android tablet.In AppInventor/Designer mode, clicking Storage/File creates a “Non-visible component for storing and retrieving files. Use this component to write or read files on your device.”Then, in AppInventor/Blocks mode, cl...Read more

Get value from another blockly

After select the car, I need to get the car selected in the next statementI removed some code leaving just important partsBlockly.Blocks.car_selection = { init() { const cars = STORE.getCars(); const carsSelection = => [, car._id]); this.appendStatementInput('CarSelection') .appendField('Select the Car') .appendField(new Blockly.FieldDropdown(carsSelection), 'Car'); this.setNextStatement(true, 'Number'); },};Blockly.Blocks.car_movement = { init() { this.appendValueInput('Movement') .setCh...Read more

Exporting blockly to google's kit

I created a blockly app with google's blockly workspace creator. I created a workspace and a bunch of new blocks. But... when i export the files,they export as .xml files,but how can i create a google page with my workspace and blocks? I mean, i downloaded google blockly kit (the one with files "appengine","blocks","core","demos" etc.) for web. But .xml files are not compatible with the kit (or i think). How can i do it?I searched a lot,finding a lot of unuseful answers. Can someone help me?P.S. Sorry for my bad english,i'm italian....Read more

Initialize a Blockly Mutator within JavaScript

Hi,as far as I know, custom blocks in Blockly can be defined wether in JSON or in JavaScript, but how can a mutator be initialized in JavaScript?with JSON:Blockly.defineBlocksWithJSONArray([{...."mutator": "myMutatorName"});Then the Mutator_MIXIN must be defined and with Blockly.Extension.registerMutator('myMutatorName', Blockly.myMutator_MIXIN, null, null) the mutator is added to the Block.with JavaScript:Blockly.Blocks['blockName'] = { init: function() = { .... ??? this.setMutator(???)??? };}So how can this be done in JavaScript?Kind re...Read more