{"id":2456,"date":"2009-08-21T14:05:58","date_gmt":"2009-08-21T14:05:58","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/21\/close-that-dialog\/"},"modified":"2017-01-06T21:24:09","modified_gmt":"2017-01-07T02:24:09","slug":"close-that-dialog","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/21\/close-that-dialog\/","title":{"rendered":"Close that Dialog!"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\">Jiro<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/24871-autowarndlg\"><tt>AutoWarnDlg<\/tt><\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15233\">Jan Simon<\/a>.\r\n   <\/p>\r\n   <p>By this time, some of you may know that I am attracted to visual tools. I was browsing through the File Exchange last week,\r\n      and with this <a href=\"https:\/\/blogs.mathworks.com\/community\/2009\/08\/03\/more-dialogs-than-you-can-shake-a-stick-at\/\">post<\/a> by Ken &amp; Mike fresh in my mind, Jan's entry caught my attention.\r\n   <\/p>\r\n   <p>When I was in school, I was performing a large parameter study on a lengthy simulation. Back then, there was no <a href=\"https:\/\/www.mathworks.com\/products\/parallel-computing\/\">Parallel Computing Toolbox<\/a> so I ended up running computations hours at a time. In order to provide some visual feedback, I used dialog boxes to display\r\n      the status every hour. I also wanted to be able to stop the run at those times, but if I happened to be away from the desk,\r\n      I wanted it to continue. Jan's <tt>AutoWarnDlg<\/tt> would've done the job.\r\n   <\/p>\r\n   <p>Along with a flashy, blinking icon, his dialog box has a nice auto-select feature. Now, you can create warning dialogs that\r\n      would go away automatically if unattended.\r\n   <\/p>\r\n\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2456#respond\">Comments<\/a>?\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_1e3a1ff4a4614a55b31f8205ff5e62cf() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='1e3a1ff4a4614a55b31f8205ff5e62cf ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 1e3a1ff4a4614a55b31f8205ff5e62cf';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Jiro Doke';\r\n        copyright = 'Copyright 2009 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_1e3a1ff4a4614a55b31f8205ff5e62cf()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.8<br><\/p>\r\n<\/div>\r\n<!--\r\n1e3a1ff4a4614a55b31f8205ff5e62cf ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\r\n% Jiro>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/24871-autowarndlg\r\n% |AutoWarnDlg|> by \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15233\r\n% Jan Simon>.\r\n%\r\n% By this time, some of you may know that I am attracted to visual tools. I\r\n% was browsing through the File Exchange last week, and with this\r\n% <https:\/\/blogs.mathworks.com\/community\/2009\/08\/03\/more-dialogs-than-you-can-shake-a-stick-at\/ post>\r\n% by Ken & Mike fresh in my mind, Jan's entry caught my attention.\r\n% \r\n% When I was in school, I was performing a large parameter study on a\r\n% lengthy simulation. Back then, there was no\r\n% <https:\/\/www.mathworks.com\/products\/parallel-computing\/ Parallel Computing\r\n% Toolbox> so I ended up running computations hours at a time. In order to\r\n% provide some visual feedback, I used dialog boxes to display the status\r\n% every hour. I also wanted to be able to stop the run at those times, but\r\n% if I happened to be away from the desk, I wanted it to continue. Jan's\r\n% |AutoWarnDlg| would've done the job.\r\n% \r\n% Along with a flashy, blinking icon, his dialog box has a nice auto-select\r\n% feature. Now, you can create warning dialogs that would go away\r\n% automatically if unattended.\r\n%\r\n% <html>\r\n% <img\r\n% src=\"https:\/\/www.mathworks.com\/matlabcentral\/fx_files\/24871\/5\/AutoWarnDlg.png\">\r\n% <\/html>\r\n%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2456#respond Comments>?\r\n##### SOURCE END ##### 1e3a1ff4a4614a55b31f8205ff5e62cf\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Jiro's pick this week is AutoWarnDlg by Jan Simon.\r\n   \r\n   By this time, some of you may know that I am attracted to visual tools. I was browsing through the File Exchange last week,\r\n      and... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/21\/close-that-dialog\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2456"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2456"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2456\/revisions"}],"predecessor-version":[{"id":8327,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2456\/revisions\/8327"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}