AlarmClock(Name,Command,Time[,silent])
#1
My goal is to move the focus on a fixedlist to the next item every 4 seconds. I am able to move the focus successfully using the following:
PHP Code:
<onclick>Control.Move(51,1)</onclick

Now I'm trying to automate this process using the AlarmClock function with the following code:
PHP Code:
<onclick>AlarmClock(AutoMove,Control.Move(51,1),4000)</onclick
This, however, does not produce any results at all; I can see the notification pop up but no movement on the control. In fact, I'm wondering why it cancels itself first than it starts... this is true if it's the first time clicking on the button.

Am I missing something here? Thanks in advance.
Reply
#2
just a guess but I think the time in alarm clock is second based so your making it wait 66 minutes
Reply
#3
actually I think it might even be minute based so its 66 hours
Reply
#4
Jezz_X Wrote:actually I think it might even be minute based so its 66 hours
hmp! i'm not sure why i thought it was in milliseconds; just checked and you're right, it is minute based... do you know of a way to make it in seconds?
Reply
#5
well this bites... i seems i might have missunderstood the functionality of the AlarmClock function; I was under the impression that the function would reiterate the command at the specified interval, however, after waiting for 4 minutes to see the transition, it only occurred once.

if this is the case, what a bummer! i wanted to accomplish the following starting at the 41 second mark: http://www.youtube.com/watch?v=8HSu4Dly4kY

by the way, can this be accomplished? the auto-movement of the items?
Reply
#6
Dom DXecutioner Wrote:hmp! i'm not sure why i thought it was in milliseconds; just checked and you're right, it is minute based... do you know of a way to make it in seconds?

Probably because every thing else in xbmc is

Right now I think the only way you good do it is to use a script to do the action and fire off another timer
Reply
#7
Jezz_X Wrote:Probably because every thing else in xbmc is
That's probably it Smile

Jezz_X Wrote:Right now I think the only way you good do it is to use a script to do the action and fire off another timer
I guess this will have to wait Sad

Many thanks!
Reply
#8
I guess it's valid to allow builtin accept hh:mmConfuseds and maybe add optional parameter that it should keep running in loop (I'll think if there is any workaround for this).

Nice idea btw Dom DXecutioner, damn that teasing trailers!
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#9
pieh Wrote:I guess it's valid to allow builtin accept hh:mmConfuseds and maybe add optional parameter that it should keep running in loop (I'll think if there is any workaround for this).
Agreed... i'm sure many talented skinners would find good use for that Smile Let me know if you find a work around... otherwise i'm gonna have to work on a script to take care of this; though i suck at python
pieh Wrote:Nice idea btw Dom DXecutioner, damn that teasing trailers!
Thanks! As for the trailer... Cool
Reply
#10
from next nightly build You will be able to use Wink
Code:
<window id="0">
  <onload>AlarmClock(AutoMove,Control.Move(51,1),00:04,silent,loop)</onload>
  <onunload>CancelAlarm(AutoMove,true)</onunload>
  <controls>
[...]
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#11
umm when did we get <onload> and <onunload> ? because thats been asked for for a while back when we wanted to update the recently added after the library scan dialog closed.

But I guess you added more to the alarm clock patch

also the old code was AlarmClock(AutoMove,Control.Move(51,1),00:04,true,true)
Reply
#12
pieh Wrote:
Code:
<onload>
  <onunload>
?

did i miss something?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#13
He said "from next nightly build You will be able to use", so I think <onload> / <onunload> is also new. Smile
Image
Reply
#14
pieh Wrote:from next nightly build You will be able to use Wink
Code:
<window id="0">
  <onload>AlarmClock(AutoMove,Control.Move(51,1),00:04,silent,loop)</onload>
  <onunload>CancelAlarm(AutoMove,true)</onunload>
  <controls>
[...]

Wow! Utterly sexy! OnLoad & OnUnload is a huge addition in itself... The AlarmClock update is definately a big plus; Many thanks!

In the meantime I've been using the following python script, which seem to work rather nicely.
PHP Code:
import xbmc

while True:
    
xbmc.executebuiltin('XBMC.Control.Move(51,1)')
    
xbmc.sleep(5000
Reply
#15
actually <onload> / <onunload> was pushed to xbmc from boxee june 25, 2009 (https://github.com/xbmc/xbmc/commit/b6ba...de16a83ab4)

I didn't spotted it earlier but lately code inspection throw this into my attention

Jezz_X Wrote:also the old code was AlarmClock(AutoMove,Control.Move(51,1),00:04,true,true)
I've changed alarmclock so params after time are optional flags: silent (or old "true" for backward compatibility) and loop

Code:
AlarmClock(AutoMove,Control.Move(51,1),00:04,true) // as it was (silent)
AlarmClock(AutoMove,Control.Move(51,1),00:04,silent) // prefered new usage
AlarmClock(AutoMove,Control.Move(51,1),00:04,loop) // will start loop and show notification on first start
AlarmClock(AutoMove,Control.Move(51,1),00:04,loop,silent) or AlarmClock(AutoMove,Control.Move(51,1),00:04,silent,loop) is the same

if You prefer that params order is preserved I will change that
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply

Logout Mark Read Team Forum Stats Members Help
AlarmClock(Name,Command,Time[,silent])0