dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 03 2004 at 22:39 | IP Logged
|
|
|
John,
I think Tony may be on to something here...
I went ahead and created a macro called "CALLZ" and tested it out. I went ahead and exported it so you can import it into your database and from their you can play with it. The export is below:
insert into macroheader values ('CALLZ','TEST',4,4,252,96,0,0,0,12632256,0,0,1,'',10); insert into macrodetail values ('CALLZ',1,16,'',NULL,'if(ph_ismacrowaiting("CALLZ") = 0,1,999)',0); insert into macrodetail values ('CALLZ',2,26,'',NULL,'START',0); insert into macrodetail values ('CALLZ',3,38,'',0,'ph_setccbtnbcolor(2,ph_getglobal_n("BUTT"),230)',0); insert into macrodetail values ('CALLZ',4,31,'',NULL,'.5',0); insert into macrodetail values ('CALLZ',5,38,'',0,'ph_setccbtnbcolor(2,ph_getglobal_n("BUTT"),12632256)',0); insert into macrodetail values ('CALLZ',6,31,'',NULL,'.5',0); insert into macrodetail values ('CALLZ',7,38,'',0,'ph_setglobal_a("BUTT",if(ph_getglobal_n("BUTT") = 10,1,ph_getglobal_n("BUTT") + 1))',0); insert into macrodetail values ('CALLZ',8,27,'',NULL,'"START"',0);
Copy and paste the above lines into the "Direct SQL" window (found under the "Maintenance" menu). This will create a macro for you with an ID of "CALLZ". I based the code upon what you had previously posted and what I thought you would need. The macro will cycle the button colors on tab number 2, buttons 1 through 10. The macro first checks to see if it's already in the process of running and exits if it is.
Once the macro starts, it will loop indefinately until stopped, cycling the button colors. You would need another macro or formula that responds to the mouse click or however you're going to select a button. This macro or formula would first execute a ph_killmacrowait("CALLZ") to stop the button cycling. You could then check the "BUTT" global variable and then execute based upon that value.
Hope this helps,
Dave.
|