Handy Autohotkey scripts for Fusion

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm sharing some Autohotkey scripts I've made to help speed up my work with Fusion. You'll need Please login to see this link.installed to use these (it's easy to set up). Then you just add some/all of the following snippets of code as you wish, and they'll work while your Autohotkey .AHK file is running. Please note that I'm not an expert at the Autohotkey scripting language (I actually can't stand syntax-based programming - having to write code for Autohotkey made me realise just how much I love Fusion!), so some of these may have room for improvement. If something's not working for you, I wouldn't be of much help so you'll need to figure it out yourself, sorry. But please feel free to post any improvements to these scripts, or other scripts you use.

    The hotkeys that these use are easy to change. Look for the bits near the top of each snippet with a double colon after them. For example, one of the snippets uses alt-leftarrow for its hotkey (!left::). You could change that to alt-ctrl-rightarrow (!^right::) or win-shift-Q (#+q::) or shift+ctrl+win+middleMouseButton (+^#MButton::) or to the "next track" button on your multimedia keyboard (Media_Next::). There's a full reference of possibilities on the Please login to see this link.. Most of these snippets are pretty short, though a couple of them are a bit messier. Here's a list of the functions - all their code/notes/gifs are lower down.

    • Type cl\ to automatically type Clickteam
    • Make Ctrl-F do Find All instead of Find
    • hotkey to jump directly to Search field
    • alt-left/alt-right to jump through 'parameters' in the expression editor
    • Ctrl-`(tilde) to separate out code for easier reading
    • `(tilde) to Auto-format code
    • Ctrl-Shift-middleclick titlebar of a Fusion window (eg. event editor) to move it to a preset position. Ctrl-Alt-middeclick it to move to a different preset position
    • Hotkey to move Fusion's various toolbar windows to where you like them
    • Ctrl-Shift-D to toggle debugger window while in runtime

    Hope some of you find these useful!




    Type cl\ to automatically type Clickteam
    This works everywhere (eg. the forums). Type C then L then Backslash and it'll instantly turn into "Clickteam ".

    Code
    :*:cl\::Clickteam{space}



    Make Ctrl-F do Find All instead of Find
    Once you start using the newer :cf25+: Find All feature you'll probably never go back to the older one. So this lets you use the new one with the trusty Ctrl-F hotkey.

    Code
    #IfWinActive ahk_exe mmf2u.exe
    ^f::^+f
    #IfWinActive




    F14 to jump directly to Search field
    Go to the search-as-you-type field without taking your hands off the keyboard (or having to tab through all the way to it).
    This one works with various searchable windows, like expression editor, create new object (frame editor), and create object (event editors) windows.
    (I have a keycap with a loupe on it on my keyboard, mapped to F14 - obviously you can use a different hotkey)

    Please login to see this picture.

    Code
    #IfWinActive ahk_exe mmf2u.exe ahk_class #32770 ;the following code only runs while the EXPRESSION EDITOR (or other Fusion child windows) is active
    F14::      ; ⸻⸻⸻⸻  go to Search-As-You-Type field
    ControlFocus, Edit1
    sendinput ^a
    return
    #IfWinActive



    alt-left/right to jump through 'parameters' in the expression editor
    "Parameters" is the wrong word, but I wasn't sure what to call it. This tries to find all the single-word (no spaces) snippets in your code that are either toTheLeft("of a bracket") or that are ("inside double quotes and brackets").
    It works ok though sometimes can glitch out a little.



    Ctrl-`(tilde) to separate out code for easier reading
    Definitely not perfect, but can be useful. Basically finds every closing bracket and inserts a line break after it with ctrl-enter.

    Please login to see this picture.


    `(tilde) to Auto-format code
    this one just simulates clicking the button so you can do it without taking your hands of the keyboard

    Please login to see this picture.


    Ctrl-Shift-middleclick titlebar of a Fusion window (eg. event editor) to move it to a preset position. Ctrl-Alt-middeclick it to move to a different preset position
    This is particularly useful for multimonitor setups. Format is X, Y, Width, Height



    Shift-Ctrl-F15 to move Fusion's various toolbar windows to where you like them
    Yes, you'll want to change the hotkey for this one. Format is X, Y, Width, Height

    Code
    +^F15::
    ; move the panel windows into correct positions.
    WinMove, ahk_exe mmf2u.exe,Workspace Toolbar, -284,0,285,1440
    WinMove, ahk_exe mmf2u.exe,Properties, 0,57,297,1363
    WinMove, ahk_exe mmf2u.exe,Find, -900,0,616,1440
    WinMove, ahk_exe mmf2u.exe,Layers Toolbar, 2291, 0, 270,1411
    WinMove, ahk_exe mmf2u.exe,Event explorer, 2291, 0, 270,1411
    WinMove, ahk_exe mmf2u.exe,Library Toolbar, 2560, 110, 1080, 1000
    return



    Ctrl-Shift-D to toggle debugger window while in runtime
    This lets you turn it off and on without your game losing window focus

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 4 times, last by Volnaiskra (June 23, 2023 at 10:11 AM).

  • Here's another snippet I forgot to include above. It's actually a whole bunch of hotkeys within one hotkey, sort of. The idea is that you select some text, hold down F12 and press a second key. Autohotkey will surround your selected text with certain characters, depending which 'second key' you pressed. It effectively turns F12 into another modifier key like shift or ctrl. But it won't interfere with normal taps of F12, which will continue to function as normal. You can of course change the hotkey from F12 to something else.

    Here I press F12+$ (F12+shift+4) to quickly turn a 'value' into a string:

    Please login to see this picture.

    This is what I would have gotten with different combinations:

    (blablabla)             (F12+shift-9 or F12+shift-0)
    "blablabla"             (F12+shift-')
    Abs(blablabla)           (F12-a)
    ("blablabla")            (F12+f)
    Val(blablabla)           (F12+v)
    Min(>value<,blablabla)      (F12+m)
    Max(>value<,blablabla)      (F12+shift-m)
    Range(blablabla,>min<,>max<) (F12+r)
    Round(blablabla)         (F12+.)
    Ceil(blablabla)           (F12+up)
    Floor(blablabla)          (F12+down)

    You can delete the ones you don't want or easily modify the hotkeys or add your own.

    Like most of the snippets here, this is based on example code that I found through google. One of the cool things about this script is that although it uses the clipboard to store and recreate your selected text, it won't mess with text that was in your clipboard before. It saves your original clipboard at the beginning, and restores it at the end. One caveat though is that it will only restore the clipboard in plain text. So if you had something other than plain text saved in your clipboard (eg. a picture, Fusion event, or Windows Explorer folder) then that clipboard entry will effectively get wiped.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 2 times, last by Volnaiskra (June 23, 2023 at 10:12 AM).

  • Hold Shift while scrolling to scroll much faster.
    This is helpful in a number of programs, such as web browsers. It's also great for scrolling through long Fusion frames. You can tweak the speed by changing the 7 to another number. The higher the faster; I've found 7 to be the sweet spot personally. This hotkey might interfere with certain programs that already have a set function for shift-scroll, in which case you can exclude those programs by EXE (as Photoshop is in this example - just enter the name of the exe file you want to exclude in place of Photoshop.exe.........leave the ahk_exe bit intact).


    Hold Ctrl while scrolling to scroll all the way to the top or bottom
    This one nicely complements the previous hotkey.

    Code
    ~^+WheelDown::
    Send ^{end}  
    return
    
    
    ~^+WheelUp::
    Send ^{home}  
    return

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • A very simple one, but one that I've really appreciated since I started using it:

    Ctrl-D to duplicate current action/condition/event/comment
    Simply simulates pressing Ctrl-C then Ctrl-V, but requires fewer keypresses

    Code
    #IfWinActive ahk_exe mmf2u.exe
    ^d::sendinput ^c^v
    #IfWinActive


    Ctrl-< & Ctrl-> (Ctrl+comma & Ctrl-dot) to navigate tabs in Property Window
    If your Properties window is nested (it probably is), see Note

    Please login to see this picture.



    Ctrl-Shift-A to jump straight to AltVals tab
    Change the 3 in xTab := 3*33 +20 + xOrigin to pick a different tab

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Here's a small contribution, with this AHK script you can capture global/alt values/strings directly to your clipboard from any open Expression Editor window that has the dropdown list with the names.
    This can be used to *kinda of* get and compare variables by name or get a name of a particular variable as mentioned in Please login to see this link. of Volnaiskra.

    The script is simple to use, just open Fusion, open any Expression Editor window that contains the list of the variables names and press F1, it should display a popup with the list and automatically copy it to the clipboard.
    You can disable the popup list by commenting it with the character ";" at the start of the "Msgbox" piece of it.

  • Since Volnaiskra showed interest, here's one more, it can move conditions/actions.
    The condition/action has to be fully highlighted (inverted colors) for it to work.
    One cool thing is that even tho it uses cut and paste, it will restore the original contents of your clipboard after it's done! :)

    Unfortunately because of how Fusion pasting and selection works you can't move it bellow the last condition/action, in the case of conditions it will move to the next event.
    (This issue will also move the last condition/action 2 steps upwards)

    Be aware that this can fail because of a issue Fusion has been having with copying/cutting content lately, which may delete the condition/action, if this happens just undo it.

    Please login to see this picture.

  • Ctrl-Middle-click on Event or Group to instantly activate/deactivate

    Please login to see this picture.


    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 5 times, last by Volnaiskra (July 15, 2023 at 3:57 AM).

  • Ctrl-Shift-Z for redo in the Expression Editor & Animation Editor

    Ctrl-Shift-Z is a much more efficient hotkey for redo than the default Ctrl-Y because it's easier to use it alongside Ctrl-Z (undo), allowing you to step forward and back through your history more quickly and with less finger gymnastics. Fusion lets you remap the Redo hotkey for the main editors, but in the Expression Editor & Animation Editor the redo function remains hard-coded at Ctrl-Y. This fixes that.


    Code
    #IfWinActive ahk_exe mmf2u.exe ahk_class #32770 
    ; ⸻⸻⸻⸻ CTRL-SHIFT-Z for REDO
    ^+z::send ^y
    #IfWinActive


    Alt-Middle Mouse Click to negate a condition or action

    This makes negating an action or condition practically instant. It works by simulating the standard right-click menu method.


    Please login to see this picture.


    Code
    #IfWinActive Fusion ahk_exe mmf2u.exe 
    ;;; ⸻⸻⸻⸻ ALT-MMB to NEGATE a condition or action
    !MButton:: 
    BlockInput, MouseMove 
    sendinput {Rbutton}n
    BlockInput, MouseMoveOff
    return
    #IfWinActive




    Enable Ctrl-Backspace to work properly while editing Comments or Group names

    By default, Ctrl-Backspace creates a little rectangle character in these windows, instead of deleting the previous word as it should. This fixes that


    Mouse button #4/#5 to add a new Action or Condition

    This will insert a new action or condition into the current event. It works no matter which portion of the event you currently have selected (eg. if you have an action selected, the normal Fusion shortcut for 'add condition' won't work, but this hotkey will). Once you try working this way, you'll never go back. The following code requires your Fusion preferences to contain a shortcut ctrl-shift-A for Insert>Action and ctrl-shift-C for Insert>condition (though they can of course be easily changed to match whatever your Fusion shortcuts are)


    Code
    #IfWinActive Fusion ahk_exe mmf2u.exe 
    ;;; ⸻⸻⸻⸻   MOUSE 4 & 5 =  add ACTION/CONDITION (+ctrl = prev/next frame)
    xbutton2::sendinput {home 2}{end}^+c ;add condition
    xbutton1::sendinput {end 2}^+a ;add action
    #IfWinActive


    Prevent accidental ZOOMING while PANNING with MMB

    If you frequently pan the Frame Editor with the middle mouse button, you might find yourself accidentally zooming sometimes, which can get annoying. This prevents that.




    Hold MMB for full-size object preview in Library Toolbar

    The Library Toolbar's small thumbnails sometimes makes objects hard to tell apart. This will bring up a full-size preview when you press the middle mouse button, and close it when you release it, saving you from having to manually close each preview window. This speeds up the process of previewing many objects.


    Please login to see this picture.


    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 5 times, last by Volnaiskra (June 23, 2023 at 10:06 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!