Allows Taifun's File Extension/Tools Number Ordered Images?

Hello. If I save my weather forecasts, I have the problem that a second one will overwrite the first one. That is normal.

Is it it possible to combine Tafun's file extension and tools extension with a code for single numbers for the weather forecasts and screenshots?

I found a number code for this, but it did not work if I save it in Downloads. When it saved to to main directory of the app then the numbers worked.

Does someone know it, please? Thanks.


Hello, Thank you very much. I will try it tomorrow morning. Have a great day!

Hello all, Unfortunately, after trying this Metric Rat AI2 Index Generator with the use of Taifun's File + Tools Extensions, the image is not saved. I think, I made a mistake, which I cannot recognize. I cannot see a mistake, it seems ok, but it is not. The image file is also not saved in the main folder with the app package name. Could someone please help? I have a little pressure with this app to go online, because it is an Easter app and Easter will come soon. Thank you very much! Have a great day! Martina
Here are the blocks:

Update: I have changed one of the global variables "saveEasterPicture" like you see in the screenshot. But the code of the index generator does not work right. I have made two images, but only one was saved with the numbers "000000" and the other one, the first one, was overwritten by the second one. What I did wrong, please? By the way, the image is correctly saved now in the >storage > emulated > 0 > Download folder like I want to have. There is only still the problem with the numbers and the overwriting. Thank you! Martina

what's this?

one suggestion:
before download the image,

  1. make sure no mistake at bottom left.
  2. clean up blocks. not sort blocks by category
  3. only relavant blocks needed. no need to post all blocks.

here is the problem i think.
These two blocks will return different values.
You need a global variable FileName to store the file name.
Do not call getIndexNext twice.

Dear Kevinkun, Thank you for the help. You are right, there are not all blocks necessary. I do not know exactly, what happened to this shrinked blocks. I re-opened them. I think, I forgot to delete the old initialized variable. I have done a lot with this code in the last three days. Sorry!

And anther good way to generate a unique file name:

Thank you, if this now does not work, I will try your example. But would it be possible, to write it like this: "EasterPicture_yyyyMMdd_HHmmss_SSS"? Thank you!

yes, you can join any prefix/suffix as you want.

Dear Kevinkun, I tried some hours, but it always fails with your code. I am doing something wrong, I believe, that your code works correctly. What I am doing wrong, please? I always save two different images with a sign on it from the canvas. The canvas is on Screen1 and saves into the Images/download folder. That is correct. But it does not show a specific date and time. There are only the pure yyyyMMdd_HHmmss_SSS letters and only one (the last one) image of the two saved images. Where is the mistake, please? Thank you! Here are the blocks and the saved image:

Why have you included "Download/" in your filename ?

Because I need to save into the download folder. Where it is wrong, please?

  1. When you do Canvas.Saveas, no need to give prefix Download.
  2. You are moving to a same name, that's why only one file remained.
  3. When you refresh gallery, you are using a different name again.

one fix to above photo:
toFileName should be Join('Download/', FileName)

Dear Kevinkun, Thank you for your help. But still I am doing something wrong. I am sure you are right, but sometimes it is hard to understand how to do it right. Here are the updated blocks. The result is, that (what is correct) the second saved image is in the download folder. There should be. OK! The problem is, that the image has no specific time and date and that he first image is still overwritten by the second one. Still I am doing something wrong, unfortunately. Could you please help? Thank you very much!

By the way, the time and date patterns look on the MIT documentation a little other. But I cannot make slashs, because then the device will produce folders instead of time and date. In the clock section in the designer I have a clock timer interval of 1000 like default. Is this alright? In the code is "Clock now". Thank you!

Try this

easterColourIn.aia (60.2 KB)

tested and working with companion app on Android 13

I can not see any change on your blocks. You did not follow with my block photo.

Dear TIMAI2, Thank you very much for your great help. I have Android 9 and so it needed two small changes with the download folder, but now it works perfectly. Thank you so much. Have a great day! Martina