Skip to main content
M.Hasanin
Inspiring
August 15, 2021
Answered

exit() or Close() for the Palette to Completely Finish it in the Memory

  • August 15, 2021
  • 1 reply
  • 456 views

Hi Experts,

I Have a Script that Only use three Palette's, to let user interact with indesign, i usually use :

exit();

to end the Main Script, but if i exit the script witout closing the other Palette's (one or two) they remain in front of the user!, they shouid use small close buttons to exit the palettes (its kind of options palette's) ,  ofcourse i can add simply close() button to each palette, but does that really clear memory rather than exit()?, i read Marc Autret Artilce in 2013 about that in the following link :

https://www.indiscripts.com/post/2013/12/indesign-scripting-forum-roundup-5#hd3sb2

but the article is old!, so are 2021 make any difference? i use indesign 2021, but the script maybe it will used on (cs6 or cc2018)  just wondering, shouid i care a lot? or just use close() mixed with exit() in the main palette ? and Thanks in advance

This topic has been closed for replies.
Correct answer TᴀW

Marc's advice in that link is still 100% applicable today.

I usually would only bother doing a w.close(), but if you really want to get rid of all vestiges of that ScriptUI window, a close(), = null, and delete triple-whammy will definitely do the job!

1 reply

TᴀW
TᴀWCorrect answer
Legend
August 15, 2021

Marc's advice in that link is still 100% applicable today.

I usually would only bother doing a w.close(), but if you really want to get rid of all vestiges of that ScriptUI window, a close(), = null, and delete triple-whammy will definitely do the job!

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators
M.Hasanin
M.HasaninAuthor
Inspiring
August 15, 2021

Thanks a lot @TᴀW 

i will follow your advice

Mohammad Hasanin