Chases/GoBack API error

Discussion and chat related to developing interfaces to the Titan software using the web API.

Moderator: Moderators

iaguilera
Posts: 8
Joined: 19 Apr 2024, 09:28

Chases/GoBack API error

Postby iaguilera » 19 Jul 2024, 12:19

Hello

I'm trying to use the API:
/titan/script/2/Chases/GoBack?handle={handle}

When trying to use it, I always get the error:
"Error: Error executing an Action Script"

Other APIs like /titan/script/2/Chases/NextStep work fine.

It's a bug? Some workaround to make it work? I have tried using titanId and location and both fail.

Thanks.
icke_siegen
Posts: 1114
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Chases/GoBack API error

Postby icke_siegen » 19 Jul 2024, 12:42

How exactly are you calling this? In particular what is your request parameter ("handle=...")?
icke_siegen
Posts: 1114
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Chases/GoBack API error

Postby icke_siegen » 19 Jul 2024, 13:47

Looks like an error to me, I'll bring it into the system - maybe Gregory has another solution.

You can toggle the connected chase's direction to backwards and then call NextStep like this:

http://localhost:4430/titan/script/2/Chases/Direction/Backwards
http://localhost:4430//titan/script/2/Chases/NextStep?handle_userNumber=1

In order to return to forwards you can call

http://localhost:4430/titan/script/2/Chases/Direction/Forwards

Some other options require the config setting to enable API tied to your GUI, see other thread. Only then some GUI-related macros and functions are available through API.

You would have e.g. these options:
  1. Using web API press "Prev Step" with this request: http://localhost:4431/titan/script/2/Menu/InjectInput?type=OnButtonDown&id=PreviousStep&group=&index=0
  2. In Titan, record a macro which presses 'Prev Step'. Then use web API to call this macro: http://localhost:4431/titan/script/2/Macros/Run?macroId=UserMacro.Macro1

These ways work with the currently connected chase.
iaguilera
Posts: 8
Joined: 19 Apr 2024, 09:28

Re: Chases/GoBack API error

Postby iaguilera » 19 Jul 2024, 18:41

Great, backwards solution is ok for me.

Thanks a lot for your help!!

Who is online

Users browsing this forum: No registered users and 1 guest