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:
$ && ? : $

which reads…
$ {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

:blush: 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 :smile:

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

Hi @jmorga106, already embedded your code:

I’m going to add battery in a mo, thanks again, it makes for such great use of the real estate
:wink:

1 Like

Looks awesome @hayden and working perfectly :+1:

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