Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Mouse inputs Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 03 2004 at 22:39 | IP Logged Quote dhoward

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.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: May 03 2004 at 22:49 | IP Logged Quote johnsde

TonyNo

I hope I have it correct:

  Under Macros I have one labled three

  Under Macro Detail ID:three     Description:three

seq 10   type: Formula  Value: Immediate   with the formula above   

Back to Top View johnsde's Profile Search for other posts by johnsde
 
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: May 04 2004 at 00:30 | IP Logged Quote johnsde

Dave

You can ignore my last post,missed page 2. I will try your last post when I get home. I've been looking for a book that might help me understand more do you have any suggestions.

 

johnsde

Back to Top View johnsde's Profile Search for other posts by johnsde
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 06 2004 at 10:04 | IP Logged Quote dhoward

John,

Just wanted to know how it was going?

Concerning a book...not much out there specific to PowerHome .  However, if you're interested in something to familiarize yourself with basic programming, probably the easiest is something like the Teach Yourself Visual Basic in 21 Days type of book.  VB is a very popular language and relatively easy to learn.

Another suggestion would be to get a book that teaches Javascript and HTML.  This would probably be more applicable to PowerHome because you could use the HTML and Javascript to customize the PowerHome web pages as well as teach you the basics of programming.

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
johnsde
Newbie
Newbie
Avatar

Joined: April 01 2004
Location: United States
Online Status: Offline
Posts: 17
Posted: May 09 2004 at 23:10 | IP Logged Quote johnsde

Dave

Just to let you know your download for the macro did the trick. I did not have a vary good understanding of how to make a macro. I'am getting to the point of putting in the commands for redrat3. The program will have 6 tabs with 10 buttons to scan through for each tab with the tenth button to change to the next tab. On each tab there is two other buttons to stop and start the scaning and to pick the button its stopped on.  Still doing a little tinkering with the program before starting redrat3 and then the 2 inputs.

Thanks to you and TonyNo                    

johnsde                                            

Back to Top View johnsde's Profile Search for other posts by johnsde
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 10 2004 at 11:09 | IP Logged Quote dhoward

Thats great John.  Let me know how it goes or if you encounter any problems and Im sure we'll get them worked out.

Good luck,

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward'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

<< Prev Page of 2
  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