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 “How do I stop an active AutoHotkey script?“. I’ve added a closing of my standard keyboard running one . I’ve now added a hotkey
^6::ExitApp ; Exit script with Ctrl+6 key
Radial Menu Scripts
I came across d a link to Radial Menu v4. 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 & starting it on my laptop the ring was really really small and I couldn’t figure how to resize it, even looking on the forum, so I moved on from it.
The reason I moved on was I did a lookup on YouTube and I couldn’t find any video’s on it but came across Pie Menu’s by Beau Gilles
RadialMenu- More General
I came across this one also, that seems more general and not AHK.
Pulover’s macro creator AHK
Pulover’s macro creator 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.
The great thing is you can run parts of the script to test that part works, so can do it and test it incrementally.
This is pretty smart, and he’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.
He’s got 2 versions, the earlier version is in a Git repository Pie-menu-AHK which is written in AHK code.
The 2nd AutoHot Pie which is the later version and written in JSON notation.
He does an odd thing, the simple demo video’s are public, but the technical video’s are private and you need to see the notes in the public videos to find the links.
AutoHot Pie Videos:
Setting Up a Revit Profile & using v2 in Revit
After a couple of wrong starts, I got the start of a revit menu working and I’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 useful.
Its a bit tough taking screenshots as you are using FastKeys and mouse together. So no free fingers to use Greenshot. I think I’ll have to do a short video and screenshot from that.
It takes a while to get the feel of where you need to place the cursor to activate the dial item. I’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.
Currently I’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.
I set up the CSV to Revit AHK script on one key and that works well.
I’m trying to do a script that will:
select and element in revit, eg wall
select all other instances of that element
isolate the set of all the same elements
Open Colour Splasher
you then select parameter you want to colour
You then choose a colour scheme (rainbow generally)
close Colour splasher
Deselect element set so you can see the colour gradients of the elements
I’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.
Video of process
After the video I started to use Pulover’s macro creator (PMC) to try and do a closedown script for removing colour from elements. Some of the functions didn’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.
Using PMC is a good tool as it shows you some options to use, so if one doesn’t work, then you can try another.
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).
I’ll use it some more to see if I can speed up some other scripts.