Copy link to clipboard
Copied
Hey,
I've played around a bit more with Automation Blocks and created and simple scripts that displays all the Purge options and lets you execute them. I guess it is not the most elegant way to display all the options as well as create the flow but it does the job 🙂 I have attached it here. If you want to make it better or add something to it feel free to do so...
Best
1 Correct answer
Wow, that's amazing - thank you for sharing!
I added it to the Community Library now changed a few things in the tool.
This is your original code (with some remarks about what I changed):
And this is my modified version:
This is what I changed in detail:
1) I replaced your else if conditions with independent if blocks. That way, if you enable several checkboxes, also all the corresponding menu commands are executed.
2) I added some "write to console" messages such that you can also see in
Copy link to clipboard
Copied
Wow, that's amazing - thank you for sharing!
I added it to the Community Library now changed a few things in the tool.
This is your original code (with some remarks about what I changed):
And this is my modified version:
This is what I changed in detail:
1) I replaced your else if conditions with independent if blocks. That way, if you enable several checkboxes, also all the corresponding menu commands are executed.
2) I added some "write to console" messages such that you can also see in the console, which purge operations actually have been performed.
3) I replaced the conditions like "All Memory equals true" by just "All memory". This is probably a matter of taste. They mean exactly the same - my variant is a bit more compact, but yours is maybe even better to understand. So not sure if this change really improved the code, but I thought it does not hurt to show that you can save a few blocks here.
Copy link to clipboard
Copied
This is definitely a very nice example for showing how easily you can create user interfaces with AB.
You find the tool in the community library at
Project/Purge/Purge Dialog with All Purge Options.xml
Thanks a lot again for sharing it with the community 🙂
Copy link to clipboard
Copied
1) I replaced your else if conditions with independent if blocks. That way, if you enable several checkboxes, also all the corresponding menu commands are executed.
2) I added some "write to console" messages such that you can also see in the console, which purge operations actually have been performed.
3) I replaced the conditions like "All Memory equals true" by just "All memory". This is probably a matter of taste. They mean exactly the same - my variant is a bit more compact, but yours is maybe even better to understand. So not sure if this change really improved the code, but I thought it does not hurt to show that you can save a few blocks here.
Cool thanks for taking the time to take a look at the code.
1) That is the better solution. I didn't know that the if else would limit it to just on entry. Good to know 🙂
2) That's a handy feature.
3) Good to know those shortcuts. I haven't done a lot of coding in the last years, tried it a few times but faild :-D, so Automation Blocks is amazing so that I can play around with the blocks without writing all the code myself.
Best

