dupa

Author Topic: Using the Clock in Plug-ins  (Read 7884 times)

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Using the Clock in Plug-ins
« on: November 29, 2008, 01:01:36 pm »
It has been mentioned in the past that if you use a plug-in that calls the clock as a timer then you can not use another plug-in with the same type of command becuse then neither would work.
Well I have a solution:
You can stil use a clock with a timer, ie, 1 minute, etc. with several plug-ins. The trick is to make one BIG plug-in and on a condition of the clock use a random number to decide which plug-in would be used at that time. There would be no limit as to the number of different plug-ins that could be activated in this way.
Bill
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Using the Clock in Plug-ins
« Reply #1 on: November 29, 2008, 04:47:45 pm »
bill is this in theory or do you know it would work ?? i really like the idea and being able to use more than one plug in would be great as my house talk (many plug ins could all be randomly picked for even more human responses ) could the other seperate plug ins be drug into one or how would it work ?? i like the idea a lot but it will still depend on robert or ever who to get the plug in problem solved first that is keeping them from working right in the first place ! hope robert solves that problem in this next hal version
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Using the Clock in Plug-ins
« Reply #2 on: November 29, 2008, 11:42:01 pm »
Fastlight [:)]
If you have one plug-in that works and I believe that I have read that some do if used alone without any others that also call the clock then you should be able to simply use a random number to decide which place the program would execute upon calling the clock.
I saw this happening with Hal 5.0 and can not think of any reason why it should not work with 6. You could not call the clock from two sources in 5 either, Same reason, same logic, but once the clock is call it can be directed to almost any place you desire. Just takes a little thinking.
Bil

 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Using the Clock in Plug-ins
« Reply #3 on: November 29, 2008, 11:59:35 pm »
why not make a plug-in for multiple plug-ins and make the randomization at that at that point , then their would only be a single plug-in looking at the timer? sort of like how a power strip works.

or am I missing the point?[?][?][:)][?][?]
Today Is Yesterdays Future.

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Using the Clock in Plug-ins
« Reply #4 on: November 30, 2008, 08:42:50 am »
Hmm, well I had Hal using just one plugin that used the MINUTE_TIMER routine and even that didn't work.  So I can't see how that would help the people where it doesn't work at all - unless I am also missing the point.

It could prove useful for multiple plugins I guess, that's if you have a PC it works on of course.  It would still be better to be able to run multiple plugins together without conflict though.
« Last Edit: November 30, 2008, 08:47:00 am by freddy888 »

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Using the Clock in Plug-ins
« Reply #5 on: December 01, 2008, 07:39:57 pm »
One
That is exactly what I was trying to describe. In Hal 5 I made an add on, (they did call the plug ins and they worked completely differently then) that would randomly select different things to do.
For one I had a line of 1 to 2 hundred jokes and the ramdom number would select whioh one to tell. In another it would make random selections of famous quotes that were made in the past. There is no limit as to what you can do with a little thinking and practice.
Bill
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Using the Clock in Plug-ins
« Reply #6 on: December 02, 2008, 08:19:56 am »
Nice idea Bill, I think I get what you mean now. [:)]

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Using the Clock in Plug-ins
« Reply #7 on: December 02, 2008, 04:27:53 pm »
hi Bill819 as i said i really like the concept of that type of plug in as you said their is many many things that could be done with it , how about after robert or ever who figures out this problem of the non working plug in problems that you post your random timer sayings , etc. plug in and a tutorial ( if you dont mind sharing it ) . [:)][:D][8D]
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Using the Clock in Plug-ins
« Reply #8 on: December 02, 2008, 06:05:24 pm »
I made some changes in how Hal 6.2 handles its timers. I'm not sure if it fixed the bug or not (because it worked for me before) but I guess we'll see when I release the alpha or beta version.
Robert Medeksza

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Using the Clock in Plug-ins
« Reply #9 on: December 02, 2008, 11:15:09 pm »
lightspeed
I will have to see if I still have some copies of Hal 5 buried somewhere. I had a lot of fun with that program. I made Hal sing, no lip sinc though, had a library of 100's of jokes and with the aid of another user had Hal come up with 100's of quotes and other things.
There was no simple way back then as there is now with plug-ins. We actualy had to hack into the main brain to attach our new stuff. Make one mistake there and you had big trouble. I guess the same can apply with plug-ins.
I am going to be really busy for the next month. I not only have Christmas to celebrate with two seperate families but they also live hundreds of miles apart, and all during that time I have lots of doctor visits in preparation of some major surgery in early January.
Damn that was a long sentence.
Bill

Bill
 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Using the Clock in Plug-ins
« Reply #10 on: December 02, 2008, 11:46:50 pm »
Bill,
Surgery?  I wish you a speedy recovery.
Today Is Yesterdays Future.

DarcyEdwards

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Using the Clock in Plug-ins
« Reply #11 on: December 03, 2008, 03:54:16 am »
quote:
Originally posted by Bill819

It has been mentioned in the past that if you use a plug-in that calls the clock as a timer then you can not use another plug-in with the same type of command becuse then neither would work.
Well I have a solution:
You can stil use a clock with a timer, ie, 1 minute, etc. with several plug-ins. The trick is to make one BIG plug-in and on a condition of the clock use a random number to decide which plug-in would be used at that time. There would be no limit as to the number of different plug-ins that could be activated in this way.
Bill




Bill,

You can have multiple scripts that use the timer, they do not conflict with each other if they are coded properly I have 3 that I can run at the same time they all work sequentualy [:I]
Hugs

-Darcy

MrsEdwards01@aol.com

DarcyEdwards

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Using the Clock in Plug-ins
« Reply #12 on: December 04, 2008, 03:47:42 am »
Well I just bought a new computer HP with Vista AMD Quad Core, Hal and the timer still works on the new computer, My old one is a HP with XP and an Intel P4.  Beside being the same manufacture the both have Phoenix BIOS, this is where I think the problem is with computers that the Timer function does not work.[:I]
Hugs

-Darcy

MrsEdwards01@aol.com

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Using the Clock in Plug-ins
« Reply #13 on: December 04, 2008, 09:18:08 am »
As you mention a quad core I was just wondering if you notice much slow down with using Vista - I mean in general and also with Haptek/Hal.  Thanks. [:)]

DarcyEdwards

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Using the Clock in Plug-ins
« Reply #14 on: December 04, 2008, 10:26:24 am »
Freddie,

I see a mark increase in speed over XP and my old P4.
Hugs

-Darcy

MrsEdwards01@aol.com