• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

subprocess triggers for external programs?

Is there a way to trigger an external process with arguments from Hero Lab? Alternatively sending an HTTP GET or POST to a custom URL while passing selected arguments.

I use a simple virtual table top system I put together displayed on my TV as our game board, and I would like to have a Condition change to a hero in Hero Lab be reflected in my VTT. I can write either a Python script to send a SQL statement to my database server or an HTTP GET/POST to my web server to accomplish this; however I would need Hero Lab to trigger the action and pass some simple data like some sort of HeroID and the Condition(s) with selection state.

Is something like this possible? I am sure it would be possible as a Custom Output of the whole portfolio, but that seems a bit much. I wouldn't want to have to output the whole portfolio every time a goblin dies, or a PC get nauseated. I just want a command to be issued when a condition changes. I have just purchased and started using Hero Lab so I am very novice. I have read through the manual and parts of the authoring kit Wiki, but I could not tell if this is possible.
 
I was able to write a procedure (called from each Condition) to modify the pChkName.
It pulls a mapId (as stored in state.value[mapId] via a Mechanic), the heroname, and the condition then concatenates them into a custom URL. This is used to then wrap the pChkName with the {url} modifier. So now every time I click on a condition, it toggles the flag on my virtual table top.
 
Here is my .user file with my code.

If whatever VTT you are using supports a method to change conditions directly via URL HTTP GET you should be able to make this work with some changes in the LinkCkName procedure. I use my own (DragonberryPi) which runs on a raspberry pi server on my LAN.

The most kludgey part of this is that I have to define the mapID in the .user file so I have to change it and re-compile anytime I change maps.

If anyone knows of a way to add a portfolio global (Like the publisher id) which I can set in the main window, save with the portfolio, and access from the procedure, let me know. I would like to be able to save mapIDs with the portfolios
 

Attachments

Back
Top