{"id":6633,"date":"2021-01-10T10:29:44","date_gmt":"2021-01-10T10:29:44","guid":{"rendered":"https:\/\/max-drake.cc\/?p=6633"},"modified":"2022-03-29T19:29:50","modified_gmt":"2022-03-29T19:29:50","slug":"ahk-and-pie-menus","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=6633","title":{"rendered":"AHK, Revit &#038;  Pie Menus"},"content":{"rendered":"\n<p>After getting into AHK I started to explore further.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Auto close down script with hotkey<\/h3>\n\n\n\n<p>One question I asked was can you close down a running script with a hotkey?, so a built in close command, and you can, a very interesting post on Stack Overflow &#8220;<a href=\"https:\/\/stackoverflow.com\/questions\/45700383\/how-do-i-stop-an-active-autohotkey-script\">How do I stop an active AutoHotkey script?<\/a>&#8220;. I&#8217;ve added a closing of my standard keyboard running one .  I&#8217;ve now added a hotkey <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>^6::ExitApp  ; Exit script with Ctrl+6 key<\/code><\/pre>\n\n\n\n <meta http-equiv=\"content-type\" content=\"text\/html; charset=\"> \n      <p>\n\t<div class=\"su-box su-box-style-glass\" id=\"\" style=\"border-color:#0f5897;border-radius:5px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#428bca;color:#FFFFFF;border-top-left-radius:3px;border-top-right-radius:3px\">PowerKey4Revit                               Free 30 day Trial<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:3px;border-bottom-right-radius:3px\">\n\t<div class=\"su-list\" style=\"margin-left:0px\">\n<\/p><ul>\n<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Speed up the tedious stuff and enjoy designing and documentation more<\/li>\n \t<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Works in all versions of Revit<\/li>\n<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Information to PROVE your increased speed<\/li>\n<\/ul>\n<\/div>\n\t\n\t<a href=\"https:\/\/datacapture.tk?utm_source=websiteArticle&#038;utm_medium=web&#038;utm_campaign=PushTrafficToSite20220330&#038;utm_id=PowerKey4Revit\" class=\"su-button su-button-style-glass\" style=\"color:#FFFFFF;background-color:#428bca;border-color:#3570a2;border-radius:6px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#7baeda;border-radius:6px;text-shadow:none\"> PowerKey4Revit Free 30 day Trial<\/span><\/a>\n<div class=\"su-spacer\" style=\"height:20px\"><\/div> \n\t\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-circle my-custom-spoiler su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>PowerKey4Revit VIDEO <\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\"><div class=\"su-youtube su-u-responsive-media-yes\"><iframe width=\"600\" height=\"400\" data-src=\"https:\/\/www.youtube.com\/embed\/1eFJAzWhOLU?\" frameborder=\"0\" allowfullscreen allow=\"autoplay; encrypted-media; picture-in-picture\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/div><\/div><\/div>\n\t\t<\/div><\/div>\n\t \n\n\n\n<h3 class=\"wp-block-heading\">Radial Menu Scripts <\/h3>\n\n\n\n<p>I came across d a link to <strong><a rel=\"noreferrer noopener\" href=\"\\Users\\drake\\Downloads\\______Screenshots\\2021-01-10 12_26_15-Radial menu \u2014 Mozilla Firefox.jpg\" target=\"_blank\">Radial Menu v4<\/a><\/strong>. Its a pop-up menu that you can use in windows. There is a short video on setting it up for use, the last posts seem to be around 2015, but I thought it was a pretty good concept. Unfortunately loading it &amp; starting it on my laptop the ring was really really small and I couldn&#8217;t figure how to resize it, even looking on the forum, so I moved on from it. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-rounded\"><img decoding=\"async\" width=\"1024\" height=\"831\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-1024x831.jpg\" alt=\"\" class=\"wp-image-6636 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-1024x831.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-300x243.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-768x623.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-50x41.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-62x50.jpg 62w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-100x81.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-123x100.jpg 123w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-789x640.jpg 789w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-640x519.jpg 640w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox-947x768.jpg 947w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-10-12_26_15-Radial-menu-\u2014-Mozilla-Firefox.jpg 1128w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/831;\" \/><\/figure>\n\n\n\n<p>The reason I moved on was I did a lookup on YouTube and I couldn&#8217;t find any video&#8217;s on it but came across Pie Menu&#8217;s by Beau Gilles <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">RadialMenu- More General<\/h3>\n\n\n\n<p>I came across <strong><a rel=\"noreferrer noopener\" href=\"http:\/\/radialmenu.weebly.com\/features.html\" target=\"_blank\">this one<\/a><\/strong> also, that seems more general and not AHK. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pulover&#8217;s macro creator AHK <\/h3>\n\n\n\n<p><strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.macrocreator.com\/help\/\" target=\"_blank\">Pulover&#8217;s macro creator<\/a><\/strong> helps you build and test macros written in AHK. The link goes to the help page which shows video tutorials on how to use it. <\/p>\n\n\n\n<p>The great thing is you can run parts of the script to test that part works, so can do it and test it incrementally. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pie Menu&#8217;s <\/h3>\n\n\n\n<p>This is pretty smart, and he&#8217;s an artist and uses graphic packages, so works in a similar way to building designers. So I was quite wowed by this, although it needs a bit of a think about to set-up. <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Pie Menus in AutoHotKey (Free DL - BETA)\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/ZxGt5Cr_3sk?list=PLYrGFhQTg1mSr2IKOc-mjT9CzkIDlEg9t\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>He&#8217;s got 2 versions, the earlier version is in a Git repository <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/UnBOlievable\/Pie-Menu-AHK\" target=\"_blank\">Pie-menu-AHK<\/a><\/strong> which is written in AHK code.<\/p>\n\n\n\n<p>The 2nd <strong><a href=\"https:\/\/github.com\/UnBOlievable\/AutoHotPieHRCB\" target=\"_blank\" rel=\"noreferrer noopener\">AutoHot Pie<\/a><\/strong> which is the later version and written in JSON notation. <\/p>\n\n\n\n<p>He does an odd thing, the simple demo video&#8217;s are public, but the technical video&#8217;s are private and you need to see the notes in the public videos to find the links.<\/p>\n\n\n\n<p><strong>Pie-Menu-Video<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"AHK Pie Menus In-Depth Demonstation\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/S3ajbhkymII?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><strong>AutoHot Pie Videos:<\/strong><\/p>\n\n\n\n<p>Demo<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"PieMenus 2.0 Progress Update\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/CIJ3m5vBNaA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Setting.json setup<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"AutoHotPie (beta) - Settings.json usage\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/IkGbTvAIKnQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Setting Up a Revit Profile &amp; using v2 in Revit<\/h3>\n\n\n\n<p>After a couple of wrong starts, I got the start of a revit menu working and I&#8217;ve started to test it. It is a little cumbersome, but has potential. I just need to get familiar with it and get a couple of actions working that are <strong>useful. <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"626\" height=\"527\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture.jpg\" alt=\"\" class=\"wp-image-6639 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture.jpg 626w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-300x253.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-50x42.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-59x50.jpg 59w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-100x84.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-119x100.jpg 119w\" data-sizes=\"(max-width: 626px) 100vw, 626px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 626px; --smush-placeholder-aspect-ratio: 626\/527;\" \/><\/figure>\n\n\n\n<p>Its a bit tough taking screenshots as you are using FastKeys and mouse together. So no free fingers to use Greenshot. I think I&#8217;ll have to do a short video and screenshot from that. <\/p>\n\n\n\n<p>It takes a while to get the feel of where you need to place the cursor to activate the dial item. I&#8217;d kept on trying to click the actual text, but that is not what you need to do, also I kept activating the 2nd and 3rd rings of keys through mouse movements so disabled those for the present. <\/p>\n\n\n\n<p>Currently I&#8217;m trying to write a few AHK scripts that can run in Revit and am running up against Revity issues. Lack of consistency with context menus and how to get around that. <\/p>\n\n\n\n<p>I set up the CSV to Revit AHK script on one key and that works well. <\/p>\n\n\n\n<p>I&#8217;m trying to do a script that will:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>select and element in revit, eg wall<\/li><li>select all other instances of that element<\/li><li>isolate the set of all the same elements<\/li><li>Open Colour Splasher<\/li><li>you then select parameter you want to colour<\/li><li>You then choose a colour scheme (rainbow generally)<\/li><li>close Colour splasher<\/li><li>Deselect element set so you can see the colour gradients of the elements<\/li><\/ul>\n\n\n\n<p>I&#8217;ve got a crude script working, so now I need to think up another couple of scripts to test. A sequence of commands for transforming things, preferably tedious processes that a script will help automate.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Video of process<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.youtube.com\/watch?v=QYzJqXjuVpc\n<\/div><\/figure>\n\n\n\n<p>After the video I started to use Pulover&#8217;s macro creator (PMC) to try and do a closedown script for removing colour from elements. Some of the functions didn&#8217;t work (maybe depreciated functions of AHK) but the programme gave me some ideas on how I could achieve what I wanted to do, so I finally have that part working. It took a long time. <\/p>\n\n\n\n<p>Using PMC is a good tool as it shows you some options to use, so if one doesn&#8217;t work, then you can try another. <\/p>\n\n\n\n<p>Also, it selecting an active window is a different method from Window Spy and I got a more generic result for Colour Splasher than I think I would have with Window Spy (I should check that though).<\/p>\n\n\n\n<p>I&#8217;ll use it some more to see if I can speed up some other scripts. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>After getting into AHK I started to explore further. Auto close down script with hotkey One question I asked was can you close down a running script with a hotkey?, so a built in close command, and you can, a very interesting post on Stack Overflow &#8220;How do I stop an active AutoHotkey script?&#8220;. I&#8217;ve [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6639,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,31,3,462,42],"tags":[],"class_list":["post-6633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-bim","category-data-extraction","category-macros-ahk-autoit","category-productivity"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-600x400.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-11-11_26_38-C__Users_drake_Videos_0-OBS-Capture-600x600.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6633"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6633\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/6639"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}