09-04-2025, 09:09 AM
Dear Sirs,
it seems that event for starting system dialog #32770 is never raised (see sample script below).
Only event for dialog end is catched.
I'm trying to get the selected path of choosen file(s) after hitting button (Open/Save/SaveAs ...) on the system dialog cn:#32770. Therefore I try to use a general Hook but DialogEnd message seems to be too late because window might be already released.
My idea was to start a timer to detect changes of path value (cn:#32770, id: 41477) at DialogStart and stop timer later after DialogEnd is raised - but without luck till now.
If anyone has an idea how to implemente such a hook to catch the user selected filepath, please let me know.
it seems that event for starting system dialog #32770 is never raised (see sample script below).
Only event for dialog end is catched.
I'm trying to get the selected path of choosen file(s) after hitting button (Open/Save/SaveAs ...) on the system dialog cn:#32770. Therefore I try to use a general Hook but DialogEnd message seems to be too late because window might be already released.
My idea was to start a timer to detect changes of path value (cn:#32770, id: 41477) at DialogStart and stop timer later after DialogEnd is raised - but without luck till now.
If anyone has an idea how to implemente such a hook to catch the user selected filepath, please let me know.
// script "TestEventHook.cs"
using Au.Triggers;
script.setup(trayIcon: true, sleepExit: true);
ActionTriggers Triggers = new();
new WinEventHook(EEvent.SYSTEM_DIALOGEND, EEvent.SYSTEM_DIALOGEND, k => {
var cf = new wndChildFinder(id: 41477);
bool found = k.w.IsMatch(cn: "#32770", contains: cf);
print.it($"SYSTEM_DIALOGEND found={found} => {k}");
});
new WinEventHook(EEvent.SYSTEM_DIALOGSTART, EEvent.SYSTEM_DIALOGSTART, k => {
var cf = new wndChildFinder(id: 41477);
bool found = k.w.IsMatch(cn: "#32770", contains: cf);
print.it($"SYSTEM_DIALOGSTART found={found} => {k}");
});
Triggers.Run();