Author Topic: Trigger an event from command line  (Read 1035 times)

Cast0077

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Trigger an event from command line
« on: April 25, 2012, 02:12:31 pm »
I was wondering if Elve has a way to trigger an event from the command line? I am thinking of switching or at least running Elve along side my Girder setup and one handy feature in Girder is the ability to trigger an event by running event.exe "event name here"

This allows me to pass events from another program like Eventghost to girder. Is something like this possible in Elve?

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2852
    • View Profile
    • Codecore Technologies
Re: Trigger an event from command line
« Reply #1 on: April 25, 2012, 09:11:21 pm »
Yes however the approach is different.

Elve supports reusable named action lists, called Scenes. Scenes are created in Elve Management Studio. You should copy and paste your event's action list into a scene, then replace the action list in the event with a single action line to run the new scene.

Using this approach allows you to run the scene from a variety of places, one of which is via the ElveCommandLine.exe command line tool. So you don't actually trigger the event, you just run the same action list that the event runs.

Here are the command line parameters:

ElveCommandLine.exe <username> <password> <command> [paramters]
The user must be granted permission to the 3rd party web service.

COMMANDS:
    RunScene : Runs the specified scene.
      PARAMETER: The scene's scripting identifier.
      EXAMPLE: ElveCommandLine.exe joe lizard runscene Turn_Off_All_Lights

    RunScript : Runs the specified script.
      PARAMETER: The script to run. It's usually a good idea to wrap it in quotation marks. Inner quotation marks must be escaped with a backslash character \.
      EXAMPLE: ElveCommandLine.exe joe lizard runscript ""return \""Hello\"";
      EXAMPLE: ElveCommandLine.exe joe lizard runscript ""lighting.TurnOnLight(12);""


Please let me know if you want more information.
« Last Edit: April 25, 2012, 09:15:14 pm by John Hughes »
John Hughes
Codecore Technologies