Hi Adrian,
I'm the Ardublockly (
https://github.com/carlosperate/ardublockly) developer. Thanks for using it, it can use some general testing (the static typing portion of the code is not quite completed, and it has been a while since the last time I worked on it).
I'm not 100% sure what the problem is, from what I understand you'd like the users to copy and paste the code from Ardublockly into the Arduino IDE, which can be easily achieved without any major modifications (could simply remove the "play button"
https://github.com/carlosperate/ardublockly/blob/master/ardublockly/index.html#L112-152), but perhaps it would be more convenient to edit the code to permanently select the "open sketch in IDE" option to open the Arduino IDE with the Ardublockly code without any further automated action. Is there any specific issue you might need help with?
Kind Regards,
Carlos