Notifications
Clear all
[Closed] Monitoring dialog titles every 20sec
Dec 01, 2008 4:25 am
Is there a way to set a script to run every 20 seconds? I want to monitor the active dialog name to be able to report fumefx progress to deadline from a slave.
I have seen this code:
fn checkDialog = (
local hwnd = dialogMonitorOps.getWindowHandle()
local dialogTitle = uiAccessor.getWindowText hwnd
print dialogTitle
true
)
dialogMonitorOps.interactive = false
dialogMonitorOps.unregisterNotification id:#test
dialogMonitorOps.registerNotification checkDialog id:#test
dialogMonitorOps.enabled = true
but the fume dialog name changes and i cant get it to update when it does.
Cheers.
2 Replies
Dec 01, 2008 4:25 am
theTimer = dotNetObject "System.Windows.Forms.Timer"
dotnet.addEventHandler theTimer "tick" checkDialog
theTimer.interval = 20000
theTimer.start()
Dec 01, 2008 4:25 am
ahhh, thankyou ZeBoxx2. I did check the max help but sometimes its hard to know what to search for!
Cheers again