Work on hypermesh while macro is running in background?
Hello,
Is it possible to work on hypermesh when we are running a Tcl/Tk script?
I would like to use 'after 10000' command to halt the execution of the script for some time and I would like to work on hypermesh meanwhile.
Thank you.
Answers
-
Hi Harish,
If i'm not wrong, after 10000 will merely delay execution of next line. So what operation do you want to do in hypermesh?
0 -
IMHO, Hypermesh session can't run on multi-thread proc. So you can't do different tasks in parallel.
@ Altair's experts: correct me if I'm wrong?
0 -
Hi Livil Lyle, 'after 10000' I gave as an example. Actually, I would like the execution of the program to be halted by 30 minutes.
Basically, I'm trying to write a 'save as' reminder program, which saves the file every 30min in a specified format.
0 -
Hi Harish
To halt a runnning script, you can use tkwait
Ex:
proc ::p_RunningScript args {
#a very long time script
for {set i 0} {$i<1000000000} {incr i}
Do something...
if {!($i%1000)} update
if {$::halt} {
tkwait variable ::halt
}
}
}
#before running, indicate halt=0
set ::halt 0
::p_RunningScript
#to halt above script, set halt = 1
set ::halt 1
#then call your save as reminder
p_SaveAsReminder
#to continue the halt script:
set ::halt 0
/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
0