
Double Click Button Control
-
- HouseBot Guru
- Posts: 785
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Double Click Button Control
I thought of an application for a button control that would use a "Double Click" type of operation similar to the list box control. In my application of it, a single click and double click would trigger two different tasks. I don't see any way of doing this with existing button controls. Any ideas for how this could be implemented? (Maybe a VERY shallow list control - one row w/no title & heading and sized to omit vert scroll bars. A single click affects one device/property and a double click affects a different property. And a background VBscript loops and monitors each property and acts accordingly when it sees a change? Timing might be an issue though. Sorry, making this up as a I go...
)

Steve
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Double Click Button Control
Steve,
This is what you are looking for. Not a double click, but a keyrepeat function. Does the same thing. I use it for various functions and works very well.
http://cebotics.com/forums/viewtopic.php?f=6&t=856621
This is what you are looking for. Not a double click, but a keyrepeat function. Does the same thing. I use it for various functions and works very well.
http://cebotics.com/forums/viewtopic.php?f=6&t=856621
-
- HouseBot Guru
- Posts: 785
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Double Click Button Control
(Let me see if I understand this
) You have a script running in the background that monitors the value of a property in what I suspect is a dummy/null device. Based on the value of that property, the script either 1: does nothing, 2: opens the weather panel, or 3: opens the HB based browser?

Steve
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Double Click Button Control
Attached one image displaying two tabs of the buttons property window.
PropertyValue "JumpNewsPanel" goes into the Action Property of the "News" NULL Device in the top image.
When the button is held for more than 1000ms the PropertyValue "ResetNewsTimer" is sent to the Action Property of the News NULL Device.
So two distinct values going into one property. A script (like your jukebox) monitoring the Action Property of the News Device can handle two different commands from a single button depending on how you press that button (short or long).
Code "snipped" would look like this:
PropertyValue "JumpNewsPanel" goes into the Action Property of the "News" NULL Device in the top image.
When the button is held for more than 1000ms the PropertyValue "ResetNewsTimer" is sent to the Action Property of the News NULL Device.
So two distinct values going into one property. A script (like your jukebox) monitoring the Action Property of the News Device can handle two different commands from a single button depending on how you press that button (short or long).
Code "snipped" would look like this:
Code: Select all
Do
Sleep 120
Action = GetPropertyValue ("News.Action")
If Action <> "Waiting" Then
SetpropertyValue "News.Action", "Waiting"
Sleep 100
If Action <> "" Then
Call Handle_NewsAction(Action)
End If
End If
Loop
Sub Handle_NewsAction(Action)
Dim Data
Data = Split(Action, "^")
Select Case Data(0)
Case "JumpNewsPanel" : CurrentMessageTextID = CurrentRandomTextID
Case "ResetNewsTimer" : SetPropertyValue "News Timer.Running", "Yes"
End Select
End Sub
- Attachments
-
- naamloos.PNG (17.7 KiB) Viewed 7111 times
-
- HouseBot Guru
- Posts: 785
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Double Click Button Control
Thanks; that's pretty much what I thought and typed. But you described it better. And the script helped too. I'll try it out. FYI, my application is a two option Pause button for the DVR. Each option does pause the DVR, but one only pauses. The other one blanks the projector after 10 secs and raises the house lights... bathroom breaks- in the South we call pit stops. Currently I have two separate buttons that trigger two different tasks. But combining into one button will help de-clutter the panel. I'll bet I can find other applications for it too. Thanks again!
BTW: still working on Jukebox when I have time..

BTW: still working on Jukebox when I have time..
Steve
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Double Click Button Control
I use it on many things as well and probably could come up with new ideas. Your pause option sounds fun.
I pause my movie in the movie theater when the door opens. The movie rewinds 10 seconds and the SWRemote puts a transparent Pause screen on my secondary video head thus overlaying the Meedio Movie. When the door closes for the second time, the movie continues again, the background movie music fades away and the lights dim to the movie preset again. I don't blank my projector since that hurts the lamp more than it would save it I guess..
The door just triggers a magnectic switch connected to a zone on my ELK M1 and the ELK is interfaced with HouseBot so I can control pretty much anything this way. Even have sensors in my 4 seats to produce fun sounds when somebody sits down
I pause my movie in the movie theater when the door opens. The movie rewinds 10 seconds and the SWRemote puts a transparent Pause screen on my secondary video head thus overlaying the Meedio Movie. When the door closes for the second time, the movie continues again, the background movie music fades away and the lights dim to the movie preset again. I don't blank my projector since that hurts the lamp more than it would save it I guess..
The door just triggers a magnectic switch connected to a zone on my ELK M1 and the ELK is interfaced with HouseBot so I can control pretty much anything this way. Even have sensors in my 4 seats to produce fun sounds when somebody sits down

-
- HouseBot Guru
- Posts: 785
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Double Click Button Control
You really have way too much time on your hands! 
The projector blanking: Bulb (and fan of course) stays on but the image on the LCOS panel is removed to prevent any burn-in. JVC has an IR and RS232 command to do it.
The Elk idea is a good one. I had not tapped into that possibility yet. But need to do something similar regarding sensing garage doors opening, thus turning on (via Elk to HB to Insteon) the appropriate lights.
BTW, off topic, but in your Elk script did you ever change the log-to-file to create a new file every <whatever>? My version (your old version) still logs all the activity to an ever increasing log file. Been meaning to change that but having too much fun with Jukebox.

The projector blanking: Bulb (and fan of course) stays on but the image on the LCOS panel is removed to prevent any burn-in. JVC has an IR and RS232 command to do it.
The Elk idea is a good one. I had not tapped into that possibility yet. But need to do something similar regarding sensing garage doors opening, thus turning on (via Elk to HB to Insteon) the appropriate lights.
BTW, off topic, but in your Elk script did you ever change the log-to-file to create a new file every <whatever>? My version (your old version) still logs all the activity to an ever increasing log file. Been meaning to change that but having too much fun with Jukebox.
Steve
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Double Click Button Control
The ELK Log to File option was built for debugging in a time where I didn't do much with dbases. I am thinking about deleting the text file part and rewrite it so that it writes to an SQLII dbase. That would be much cleaner and somekind of GUI could be built to query the logs. I need to do this for many other devices as well such as my phone integration, HVAC control etc.
Energy usage and weather sensor info as well as all media related stuff is already writing to a dbase to be able to produce logs.
My ELK also handles an irrigation system, light control and many other domotica related stuff through HouseBot. Very nice PLC to have in your system!
Energy usage and weather sensor info as well as all media related stuff is already writing to a dbase to be able to produce logs.
My ELK also handles an irrigation system, light control and many other domotica related stuff through HouseBot. Very nice PLC to have in your system!