Show text and cycle part in picture after scanning

OK, sorry, I left that part out!

There is no real easy way to do this.

You will need to load up your original image in a suitable image editor.
Then get the start and end coordinates for the overlay imageSprite image, e.g. for the saddle

image image

Then from these numbers, you can calculate the:

percentage size of the overlay image sprite image

W = (799-461)/2151
H = (464-329)/2151

and the

x/y percentage position for the image sprite

x = 461/2151
y= 329/2151

You can then set these percentage values to your imgValues list, as I have shown in the blocks for pedal and saddle.

The percentages are then applied to the respective canvas width and height, to correctly size and position the imageSprite. If the positioning is not as you expected, adjust the percentages accordingly.

Here is a revised aia project that handles this.

BlinkSelect_1_1 (2).aia (1.2 MB)

To change the blink speed, simply adjust the value for the clock timer (Clock1) in the designer, currently set at 1000ms.

1 Like

Okay thank you so much just one last question I am going to add 40,50 parts and I am trying this approach so this will be okay? Or is there


any better approach

Someone else may have a better approach...

Store all your data in the imgValues list as opposed to loading on screen initialise

Also, my "percentages" were all 0.23 / 0.15 for the calculations further down to work ?

Thank you so much with your help everything is working correctly, except I wanna check if get results contains 4 items(itemname,229000,1,278) or 5(itemname,23,46,57,67) how can I do that? Because I am fetching index 5 at. A place and some result have only 4 index there I get this error to end application

It should always be 6. The item name, the image name, and then two sets of x/y coordinates.

No that is okay this is something else this is my qr code data (break set,1,202408483,2024-04-06-12-25-19,19) and i am using index 5 value to fetch some data from server but some old qr code is of 4 item I wanna add a check condition when qr read it should check if it contains 4 item or 5 then act accordingly

Use the length of list block from the list drawer
Taifun

I tried but it says. The operation length of list cannot accept the arguments: , ["break set,1,202408483,2024-04-06-12-25-19"]
Note: You will not see another error reported for 5 seconds

That was not a list.

It's a long piece of text with commas

1 Like


You see when i scan qr code

Qr have these value i split with comma and pick desired index value now my issue is sometime i have 4 comma string and sometime 3 comma and i wanna verify that after scanning that qr contains 4 item or 5

Assign the results of the csv conversion into a temporary (local) variable.

Do test of length of list against the variable before any select item from list operation.

Look before you leap.