Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 20 2006 at 21:20 | IP Logged
|
|
|
DIMAC is a macro that accepts an address/ID and a dim level in two TEMP variables and dims the associated device. This is used in a few of my other examples.
TEMP1
Address/ID (i.e. "B5" or "PORCH LAMP")
For Insteon devices, add an "I " to the ID ("I PORCH LAMP")
TEMP2
Dim level percentage (i.e. "75")
linky
Here is a JavaScript function that you can put in a web page to call this.
Code:
function dimac(ad, value)
{ document.execsendkeys.sendkeys.value = "ph_rtne( ph_setvar_s( 2, 1, '" + ad.toUpperCase() + "') + ph_setvar_s(2, 2, '"+ value + "') + ph_macro('DIMAC'))"; document.execsendkeys.submit(); } |
|
|
|
Back to Top |
|
|
martlist Newbie
Joined: January 07 2007
Online Status: Offline Posts: 31
|
Posted: July 18 2007 at 00:58 | IP Logged
|
|
|
Tony,
just trying to setup a slider page like your example and so first step was to import the macro. Never doen this stuff before so may be doing it wrong. Followed the forum post on how to import and get the folling on execute:
Invalid Direct SQL Code -193
SQLSTATE = 23000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Integrity constraint violation: Primary key for table 'macroheader' is not unique
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: July 18 2007 at 07:15 | IP Logged
|
|
|
It looks like you already had a macro called DIMAC when importing. Try deleting it and then importing again.
|
Back to Top |
|
|