{"id":1253,"date":"2010-07-14T10:06:10","date_gmt":"2010-07-14T10:06:10","guid":{"rendered":"http:\/\/www.mjtnet.com\/blog\/?p=1253"},"modified":"2010-07-14T10:06:10","modified_gmt":"2010-07-14T10:06:10","slug":"launching-urls-in-default-browser-and-a-small-bug","status":"publish","type":"post","link":"https:\/\/www.mjtnet.com\/blog\/2010\/07\/14\/launching-urls-in-default-browser-and-a-small-bug\/","title":{"rendered":"Launching URLs in Default Browser (and a small bug!)"},"content":{"rendered":"<p>A quick and easy way to launch a URL in the default web browser is just to use the ExecuteFile command:<\/p>\n<p>ExecuteFile>http:\/\/www.mjtnet.com\/<\/p>\n<p>However, I have recently discovered that ExecuteFile is currently limited to a command line length of MAX_PATH (260 chars) and that if more than 260 chars are passed it will cause Macro Scheduler to crash.  This is a bug that we&#8217;ll get fixed in the next update (increase the limit if possible AND prevent a crash if more chars than can be handled are passed).<\/p>\n<p>Another way to launch a URL in the default browser is to use the Run command.  First you need to determine the path to the default browser which you can do by querying the registry:<\/p>\n<pre name=\"code\" class=\"macroscript\">Let>url=http:\/\/www.mjtnet.com\/\r\n\r\n\/\/get path of default browser ...\r\nRegistryReadKey>HKEY_CLASSES_ROOT,htmlfile\\shell\\open\\command,,browserEXE\r\n\r\nRun>%browserEXE% %url%<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A quick and easy way to launch a URL in the default web browser is just to use the ExecuteFile command: ExecuteFile>http:\/\/www.mjtnet.com\/ However, I have recently discovered that ExecuteFile is currently limited to a command line length of MAX_PATH (260 chars) and that if more than 260 chars are passed it will cause Macro Scheduler [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1253"}],"collection":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/comments?post=1253"}],"version-history":[{"count":2,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1253\/revisions"}],"predecessor-version":[{"id":1255,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1253\/revisions\/1255"}],"wp:attachment":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/media?parent=1253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/categories?post=1253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/tags?post=1253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}