February 18, 20242 yr Hi there, I'm trying to create a voice-controlled script to set the flaps in the PMDG B737. My intention is to make a simple script, that starts when I command (for example) 'Flaps five' that will move the flaps-lever directly to the five-position. I can't however find the sim variable that contains the flap-position. So far, I am only able to use the FLAPS_INCR event (see below), that moves the flaps just one position. So for flaps 5 I have to say 'Flaps down' three times. Can you help me out with this issue? (>K:FLAPS_INCR) (WAIT:2000)·\n (SPEAK:·flaps·set) Kind regards, Vincent
February 18, 20242 yr Commercial Member OK, in MSFS default events should do the trick. I would try this: In your Button/Voice assignment, use the event AXIS_FLAPS_SET and supply the required value to set it to a specific position by entering that number into the value box (check the AAO manual about how to do this). For example, -4500-ish should set it to flaps 5 (value range of the axis is -16K to +16K) To find out about the axis values, enable "Tools->Axis advanced mode", then assign a lever to the axis event - and read the values off the AAO main dialog. Delete the assignment when you have all the values you need. Edited February 18, 20242 yr by Lorby_SI LORBY-SI
February 18, 20242 yr Author Your solution seems to work perfectly! Can you please help me out a last time: how do I assign a value (ie -4500) to the AXIS_FLAPS_SET event in a script? Now I have: (>K: AXIS_FLAPS_SET) (SPEAK: Flap set to five) in the script, but I don't know how to set a value to this event. I beg you to excuse me, I'm very mediocrate when it comes to writing scripts (and not only that). Kind regards, Vincent
February 18, 20242 yr Commercial Member 19 minutes ago, Vincentbreda said: (>K: AXIS_FLAPS_SET) (SPEAK: Flap set to five) how do I assign a value (ie -4500) to the AXIS_FLAPS_SET event in a script? That's easy. Your code is actually wrong! The "(>" is the assignment operator in RPN, not only for K-Events but for all other variables too. A value is required whenever using it. (But if it is used with a K: event, AAO will just assume a "0") You should get into the habit of providing the correct vaules every time! Be mindful of the space character between the value and the (> -4500 (>K: AXIS_FLAPS_SET)(SPEAK: Flap set to five) Edited February 18, 20242 yr by Lorby_SI LORBY-SI
February 18, 20242 yr Author Great, thank you for the excellent support! Do you happen to know a command in the script that mutes the microphone for a few seconds, so AAO doesn't hear itself speak and doesn't thus repeat a certain action?
February 18, 20242 yr Commercial Member 1 hour ago, Vincentbreda said: Great, thank you for the excellent support! Do you happen to know a command in the script that mutes the microphone for a few seconds, so AAO doesn't hear itself speak and doesn't thus repeat a certain action? That would be the same commands that are also used for the PTT key. Check the AAO manual, chapter about voice recognition. Be mindful that the script processing is asynchronous. Normally it doesn't wait until the SPEAK is complete so disabling the voice recognition and reactivating it after the SPEAK will do nothing - unless you make it wait for as long as the SPEAK takes. You will need a WAIT or SPLIT command, so the script will wait until the text has been spoken. Is this a script in the editor or a script file? Edited February 18, 20242 yr by Lorby_SI LORBY-SI
February 18, 20242 yr Author Thanks again, will surely recommend AAO to flightsimming friends!! in a while, I will upload my B737-scripts to Flightsim.to as a 'virtual copilot' with apraise for your great app.
February 18, 20242 yr Commercial Member Something like this: Quote -4500·(>K:·AXIS_FLAPS_SET)· 1·(>K:AAO_VOICEREC_OFF)· (SPEAK:·Flap·set·to·five)· (SPILT:2000)· 1·(>K:AAO_VOICEREC_ON)· But in general I would recommend using an actual PTT button, so AAO is not listening all the time. LORBY-SI
Archived
This topic is now archived and is closed to further replies.