Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Macros, Scripts, and Formulas Repository
 PowerHome Messageboard : PowerHome Macros, Scripts, and Formulas Repository
Subject Topic: DIMAC Macro Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 20 2006 at 21:20 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
martlist
Newbie
Newbie


Joined: January 07 2007
Online Status: Offline
Posts: 31
Posted: July 18 2007 at 00:58 | IP Logged Quote martlist

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 View martlist's Profile Search for other posts by martlist
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: July 18 2007 at 07:15 | IP Logged Quote TonyNo

It looks like you already had a macro called DIMAC when importing. Try deleting it and then importing again.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum