Author |
|
dhewison Newbie
Joined: February 28 2008 Location: United Kingdom
Online Status: Offline Posts: 25
|
Posted: September 15 2010 at 13:48 | IP Logged
|
|
|
Hi,
I am trying to create a timed event from a script that will run a script with parameter passing, however I cannot get past what I think is a nested quotes problem. Using the web interface\formula to run tests ph_createtimedevent( 2, "ph.runscript_3(x,"path", ..... needs nested quotes and it fails.
Is it possible ? Anyone know how to do it ?
The core problem I am trying to solve is to track what procedure or function is asking for a device to be on or off, i.e. :
time 00: function 1 switches device 1 on
time 01: function 2 switches device 1 on
time 02: function 1 no longer requires device 1 on
time 03: function 2 no longer requires device 1 on
at time 02 although function 1 no longer requires device 1 on, function 2 has not requested it to be switched off so it should stay on until all interestd functions have said it can switch off. My answer, at present, is to have an integer "demand" variable for each device, each bit allocated to a specific function. Each function then sets or clears its allocated bit and only when all bits are cleared does the device get switched off. This is fairly straight forward when done inside a script but I cannot figure out how to program future (timed) events.
Maybe I'm just heading towards a dead end, if anyone knows a better (or working) way I would be greatful to hear it.
David
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: September 15 2010 at 14:19 | IP Logged
|
|
|
Within PH you can use single and double quotes.
"xxxxx 'yyyyy' zzzzz" or
'xxxxx "yyyyy" zzzzz'
__________________ Lee G
|
Back to Top |
|
|
dhewison Newbie
Joined: February 28 2008 Location: United Kingdom
Online Status: Offline Posts: 25
|
Posted: September 16 2010 at 03:46 | IP Logged
|
|
|
Thanks Lee, I'll give that a try
David
|
Back to Top |
|
|
dhewison Newbie
Joined: February 28 2008 Location: United Kingdom
Online Status: Offline Posts: 25
|
Posted: September 16 2010 at 09:35 | IP Logged
|
|
|
Hi Lee,
Thats sorted the problem thankyou.
David
|
Back to Top |
|
|