11-24-2016, 09:35 AM
VLC does not enable the event, or even does not create the accessible COM object, until something searches for the object. Some programs use "enable accessibility on demand" to start faster, use less memory, etc.
Use this window-triggered function to auto-enable VLC Play/Pause button accessible events.
Function Enable_acc_events_in_VLC
Trigger !cv"VLC media player" "QWidget"
Use this window-triggered function to auto-enable VLC Play/Pause button accessible events.
Function Enable_acc_events_in_VLC
Trigger !cv"VLC media player" "QWidget"
int w=TriggerWindow
Acc a.Find(w "PUSHBUTTON" "" "class=QWidget[]descr=^(Play|Pause)" 0x1088)
;out "VLC acc events enabled"
;Possibly enables events only of part of objects, including the Play/Pause button.
;If need to enable for all objects, use this slower code:
;Acc a.Find(w "ALERT")