Libraryless. Click here for Pure Java version (15193L/109K).
!7 module SaveGoodResult { S moduleIDAndName, comment; visualize { ret withRightMargin(makeForm2( "Module", dm_moduleSelectorComboBox(dm_fieldLiveValue('moduleIDAndName)), "Comment", dm_fieldTextField('comment), "", jbutton("Save", rThread saveResult))); } void saveResult enter { O mod = dm_getModule(firstIntAsString(moduleIDAndName)); if (mod == null) ret; BufferedImage screenshot = dm_moduleScreenShot(mod); S moduleID = dm_moduleID(mod); File jpgFile = makeFileNameUnique_withExtension(goodResultsDir(ymd_minus_hms()), ".jpg"); saveJPEG(jpgFile, screenshot); dm_persistModule(mod); saveTextFile(replaceExtension(jpgFile, ".data"), dm_getStructure(mod)); setFileInfoFields(jpgFile, Comment := comment, "Module ID" := moduleID, "Module Lib ID" := dm_moduleLibID(mod)); infoBox("Saved " + jpgFile + " (plus data)"); } }
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020155 |
Snippet name: | Save Good Result (Screenshot + Data From Another Module) |
Eternal ID of this version: | #1020155/9 |
Text MD5: | 66dfbadc53be24a5ecb351cd7ab88b07 |
Transpilation MD5: | 9fa1feeb7a67fb2b362da1054f6f8f60 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-09 18:48:58 |
Source code size: | 946 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 344 / 601 |
Version history: | 8 change(s) |
Referenced in: | -