Find more posts tagged with
Hi
What do you mean 'idle'?
Suppose that you want to close if over 1h there is no user interaction on hm session:
Try a proc like this
proc ::p_MonitorHmSession {TriggerTime TriggerScript} {
if {[focus] ne ''} {
dict set ::p_MonitorHmSession -lastused [clock seconds]
} else {
if {[clock seconds]-[dict get $::p_MonitorHmSession -lastused]>$TriggerTime*3600} {
uplevel #0 $TriggerScript
dict set ::p_MonitorHmSession -lastused [clock seconds]
}
}
after cancel [list ::p_MonitorHmSession $TriggerTime $TriggerScript]
after 5000 [list ::p_MonitorHmSession $TriggerTime $TriggerScript]
}
now start the monitor:
::p_MonitorHmSession 1 hm_exit; #after 1hour if do not focus on hm window, it will exit
Hi @tinh,
If I open two or more hypermesh windows(with script in hmcustom.tcl), the script is closing the window which is on top(please see image below).
After that it is not closing other windows. I am not keeping any focus on the windows.
Script is working fine if there is only 1 hm session present. But i need to close all the sessions which are not in use. Is there any solution for this?
<?xml version="1.0" encoding="UTF-8"?>
Hi,
For HV 14 , I found another way where I can place the code in 'hwstartup.tcl'. This file is available in '.\..\HW14.0\hw\tcl' directory.
'hwstartup.tcl' gets executed whenever HV gets launched.
Unfortunately, this tcl file is not available for HV 13 n below. Any idea what other files I can try with?
Thanks,
Roshan
License file, I don't know. But with License server, it seams that's possible. I'm not sure.