How to create a simple loop?
I would like to create a simple loop however I'm not very good in programing... My script is like this but instead of '...' I would like to create a loop which would work till I press return or escape. Is there any simple method?
*createbutton(5, 'Triad', 18, 0, 4, BUTTON, 'Create Triad', 'macroTriad')
*beginmacro(macroTriad) <cr>
*createlistpanel(nodes,1,'Select nodes') <cr>
*createelement(103,1,1,1) <cr>
...
*createlistpanel(nodes,1,'Select nodes') <cr>
*createelement(103,1,1,1) <cr>
*endmacro() <cr>
Kind regards,
Lukasz
Find more posts tagged with
Sort by:
1 - 8 of
81
Hi MEIYARASU19
Refer the example script from below link
Hi MEIYARASU19
Refer the example script from below link
Thank you
Hi,
I don't understand what you want exactly, a simple loop looks like this ...
------------------------------------------------------------------------------
*createmarkpanel elements 1 'Select elements ...'
set element_mark [hm_getmark elements 1]
foreach eid $element_mark {
tk_messageBox -message 'Element : $eid'
}
------------------------------------------------------------------------------
or
------------------------------------------------------------------------------
set stop 0
while {$stop == 0} {
# your code here
set stop 1
}
------------------------------------------------------------------------------
Regards,
Mario