You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from SimConnect import *
from SimConnect.EventList import *
from SimConnect.RequestList import *
def trigger_event(event_name, value_to_use = None):
EVENT_TO_TRIGGER = ae.find(event_name)
if EVENT_TO_TRIGGER is not None:
if value_to_use is None:
EVENT_TO_TRIGGER()
else:
EVENT_TO_TRIGGER(int(value_to_use))
print("success")
return True
else:
print("Error: %s is not an Event" % (event_name))
return False
sm = SimConnect()
ae = AircraftEvents(sm)
trigger_event('COM_STBY_RADIO_SET', dec_to_bcd(125.850))
trigger_event('COM_STBY_RADIO_SET', dec_to_bcd(125.850))
File "D:\SharedFolder\PythonProjects\MFS-WINWING\send.py", line 122, in trigger_event
EVENT_TO_TRIGGER(int(value_to_use))
File "C:\Users\VHDX-DEFAULT\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\SimConnect\EventList.py", line 8, in call
self.event = self.sm.map_to_sim_event(self.deff)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\VHDX-DEFAULT\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\SimConnect\sc.py", line 60, in getattr
raise AttributeError
The text was updated successfully, but these errors were encountered:
python 3.12
trigger_event('COM_STBY_RADIO_SET', dec_to_bcd(125.850))
File "D:\SharedFolder\PythonProjects\MFS-WINWING\send.py", line 122, in trigger_event
EVENT_TO_TRIGGER(int(value_to_use))
File "C:\Users\VHDX-DEFAULT\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\SimConnect\EventList.py", line 8, in call
self.event = self.sm.map_to_sim_event(self.deff)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\VHDX-DEFAULT\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\SimConnect\sc.py", line 60, in getattr
raise AttributeError
The text was updated successfully, but these errors were encountered: