i excute many script on screen
i would like to destory many script and macro at once
how can i close script window at once ?
Forum topic · General Scripting
By dussla · 2014-01-15
i excute many script on screen
i would like to destory many script and macro at once
how can i close script window at once ?
Comments (9)
Comment policy
.
If the scripts are not encrypted then you can see the global "name" of the rollouts. What you have to do then is to use for loop to destroy dialogs with the desired names.
For example:
To close the "The name of the rollout rollout you have to use
OK.. now how do you destroy the dialog on exit
OK.. now how do you destroy the dialogs upon exiting the script .. the on quit do (whatever) doesn't seem to work when you just close the rollout.. I have a main script and a few ones pop out, I can destroy them in the beginning of the script but not when I just close the rollout window.. any solutions on that?
.
If I understand you correctly yo need this:
hmm.. yes exactly..
..actually did that but placed it after the createdialog :) - forgot this should probably be the part of the rollout, thanks
.. is the global rollout necessary I do it without that, or why?
.
If your code ls this:
Then all variables are in local scope, so you can't access them.
If your code is:
Then the rollout var(rol_MyRollout) is a global var and you can access it and all controls and local variables of the rollout.
Since I always use the first aproach(all of my code is between "(" and ")") i have to declare the tollout as global.
and just realised you should also use
try (destroyDialog dialog ) catch()
because if that rollout isn't open it gives out error.. or it doesn't close the main rollout, just for future reference
better is to declare rollout var as global
try(destroyDialog ::dialog )catch()
--or
global dialog
try(destroyDialog dialog )catch()
yes - and I need the global rollout variable defined like you just did - or it wont close the rollout - also just realized this :).. what's with the ::dialog (didn't get to that part yet)
OK learning as I go.. I did programming in java years ago, and it's like learning how to walk again, this place is a great resource
If you want to avoid try-catch then you can use also
if isKindOf dialog RolloutClass do destroyDialog dialog
--or :)
if isKindOf ::dialog RolloutClass do destroyDialog dialog