It's just a test but the above is linked so that I can update and design the UI with ease through use of a Photoshop GUI that prompts some AHK scripting:
Feels really cool to accomplish something like this, even if so simple, for someone who's never done much coding and it could really revolutionize my workflow. I know I can't be doing things very well because my current script is just stitched together from other examples I'd searched for:
Code: Select all
;
#IfWinActive, ahk_exe illustrator.exe
;Header
Gui, 1:Margin , 0, 0
GUI, 1:+AlwaysOnTop -Border -SysMenu +Owner -Caption +ToolWindow
GUI, 1:Add, Picture, , guiAI.png
GUI, 1:Show, NoActivate X0 Y0 autosize, dropDesk
Gui, 2:Margin , 0, 0
GUI, 2:+AlwaysOnTop -Border -SysMenu +Owner -Caption +ToolWindow
GUI, 2:Add, Picture, , guiAItoolbar.png
GUI, 2:Show, NoActivate X950 Y0 autosize, dropDesk
Gui, 3:Margin , 0, 0
GUI, 3:+AlwaysOnTop -Border -SysMenu +Owner -Caption +ToolWindow
GUI, 3:Add, Picture, , guiAIsidepanel.png
GUI, 3:Show, NoActivate X575 Y1195 autosize, dropDesk
I tried an #IfWinNotActive for ahk_exe illustrator.exe but kept getting an error saying I had an Else but no "if", so I figure I can't use that as an If Statement but I don't understand how to hide a GUI in this context or where that goes in the syntax hierarchy itself when I want it to rely on multiple variables: hide/destroy/or fade when Illustrator is minimized, closed, or when I switch the window to a different program like Photoshop. I don't really get the grammar of when to build the GUI compared to when to modify it over time like this, so far I've been using AHK for a lot of key remappings and input sequences. Any help from examples I can look at or points in the right direction?