# How to appear a image every 10 second?

Hello
How to appear a image only at 1-10 second 21-30 second and 41-50 second?
Thanks

Hey Jimmy in your case I would load the image 3 times and use transparency for case 1 (1-10) case 2 (21-30) and case 3 (41-50).
This is the format:
\$ && ? : \$

\$ {if this is true} && {and this is true} ? {then do this} : {otherwise do this} \$

So something like this should do it.
Image 1 transparency:
\$#Ds#>0&&#Ds#<=10?100:0\$
says show 100% if seconds are greater than zero and less than or equal to 10
otherwise show 0% (hide it)

Image 2 (same image second time) transparency:
\$#Ds#>20&&#Ds#<=30?100:0\$
says show 100% if seconds are greater than 20 and less than or equal to 30
otherwise show 0% (hide it)

Image 3 (same image again, third time) transparency:
\$#Ds#>40&&#Ds#<=50?100:0\$
says show 100% if seconds greater than 40 and less than or equal to 50
otherwise show 0% (hide it)

HTH,
John

Good idea @jmorga106 , but I would do it even simpler.

First, letās loop seconds into 20 sec periods:
`(((#Ds#/20)-(floor(#Ds#/20)))*20)`

Then we can use just one condition:
`\$(((#Ds#/20)-(floor(#Ds#/20)))*20)<=10?100:0\$`

or after simplifying it with www.wolframalpha.com (for less math):
`\$(#Ds#-(20*(floor(#Ds#/20))))<=10?100:0\$`

One image, one transparency code!

1 Like

Hi John Mellin
Thank you both of you, it is really helpful.
I try John format, it works well. but I want to try use only one image becuase i hope to make the file size smaller.but Mellinās format doesnt work, I put \$(#Ds#-(20*(floor(#Ds#/20))))<=10:100?0\$ to transparency but nothing happen, did i do anything wong?

1 Like

My mistake: I swapped ā?ā and":" with each other.

1 Like

Your mathematical wizardry is killer, as usual Mellin. thatās awesome!

Actually I can use this technique on some of my multi-view (date window) watches where I can loop seconds into 3-second and 4-second periods where I need them.

Thanks!!

2 Likes

It works exactly what I want.Thanks Mellin.
Jmorga, you are right , Mellin is really a Killer. and this format can be use of many way

2 Likes

Sorry, I really know nothing about format .one more question, if my second image will appear at 11-20 second, 21 to 40 second and 51 to 60 second, I thought I could figure out by myself if I know the first format but I could not.

1 Like

Using ā>10ā inside the condition should work.

Hi @Mellin and @jmorga106 , I really donāt understand the code and need help please, found the above in search for a solution that will enable me to make number appear for an hour and then disappear, ie using the hour in day (1-12) tag #Dh# how can I make an image appear for just 1 hour say 2 oāclock and then disappear?

So you want an element to be visible during the 2 in the morning from 2:00 to 2:59?

`\$#DH#=2?100:0\$`
And if you want it to be visible both 2 in the morning and 2 in the afternoon
`\$#Dh#=2?100:0\$`

1 Like

@Mellin, yes both solutions are equally useful, thank you so much for the quick reply

1 Like

Hi @jmorga106, if you donāt mind iād like to employ some of your āmonometerā techniques in one of my faces but I donāt know how to do it even with the thread above: \$(#Ds#-(20*(floor(#Ds#/20))))<=10?100:0\$
I would like to have each item appear for 4 seconds on wake-up and then cycle through for however long the watch face is displayed for, can you help please

Hey @hayden,
this Monograph thing I have going is cool but it is not trivial. You are going to turn the display of each complication on and off with the transparency field (obviously). So you say you want to go 4-second displays but you didnāt say HOW MANY complications you are displaying. With that said I have to drop this brain-melting chart on you (sorryā¦). You can see that with 4-second changes either 3 or 5 complications work out nicely. Letās say you have 3 complications (A, B, C). You can see that they will nicely fit and evenly change in one minute
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 seconds
A B C A B C A B C A B C A B C ā¦Perfect. Next minute starts at A again.

Then you make each comp appear looping the second period using @Mellinās formula.

So the first comp (first third of the 12 second time)
\$(#Ds#-(12*(floor(#Ds#/12))))>=0&&(#Ds#-(12*(floor(#Ds#/12))))<4?100:0\$ (0 - 4 seconds)

Second comp (2nd third):
\$(#Ds#-(12*(floor(#Ds#/12))))>=4&&(#Ds#-(12*(floor(#Ds#/12))))<8?100:0\$ (4 - 8 seconds)

Third comp (3rd third):
\$(#Ds#-(12*(floor(#Ds#/12))))>=8&&(#Ds#-(12*(floor(#Ds#/12))))<12?100:0\$ (8 - 12 seconds)

How many comps do you have? I can help with the actual formulas.
John

2 Likes

@jmorga106, wow, brilliant!!! Thank you so much, loving the table too. I was thinking of 3 (So I can cut and paste the formulae in your narrative), my watch (S3) only stays on for 15 sec, by default and 15 secs is probably as much time as anyone is likely to dwell on a face (I have to admit to staring for longer and awakening the face to stare more, but thatās my OCD).
I do have another question, if I maybe so bold. I want to create a mask that will help me dodge a large minute hand, ie I want to occupy a space that covers 11, 12 and 1 oāclock, when the hand is at any other hour I want the mask to be 100% on but as soon as it 11, 12 or 1 oāclock I want if off, Iāll also be creating the same data for 5, 6 and 7 oāclock but I should be able to modify the first expression.
Cheers from stormy London

Iām going to add battery in a mo, thanks again, it makes for such great use of the real estate

1 Like

Looks awesome @hayden and working perfectly

As to the mask you can probably just use regular conditionals, the 60-second cycle already loops itself resetting to zero(0).

John

thanks @jmorga106, and now data (x4) - oh the possibilitiesā¦

Wooooooooooooot !! (20 characters)

1 Like

@hayden

āawakening the face to stare moreā¦ā LOL

staringā¦ just staringā¦

1 Like