more G-Labs products

Author Topic: Call a Program and Pass an Argument  (Read 702 times)

April 28, 2016, 08:34:53 PM
Read 702 times

Deggle

  • *
  • Information
  • Newbie
  • Posts: 11
Hi,

Hopefully just a quick one...

Taking the included sunrise scene program as an example, I can start this by requesting:

.../api/HomeAutomation.HomeGenie/Automation/Programs.Run/8

What I'd like to do is pass an argument - for this example, perhaps a duration that the scene should last, say

.../api/HomeAutomation.HomeGenie/Automation/Programs.Run/8/3600

Is this possible, and if so how do I access the argument in the C#?

Many thanks,

Tim

April 28, 2016, 08:54:05 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Use the special string variable PROGRAM_OPTIONS_STRING  to read the passed argument value.

April 28, 2016, 09:01:31 PM
Reply #2

Deggle

  • *
  • Information
  • Newbie
  • Posts: 11