User Tag List

Results 1 to 8 of 8

Thread: Handy Autohotkey scripts for Fusion

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,685
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)

    Handy Autohotkey scripts for Fusion

    I'm sharing some Autohotkey scripts I've made to help speed up my work with Fusion. You'll need Autohotkey 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 Autohotkey site. 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 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 of 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)



    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 toTheRight("of a bracket") or that are ("inside double quotes and brackets").
    It works pretty well though sometimes can glitch out a little. For example you can see that it captures "Abs" on the way forward, but misses it on the way back.



    Code:
    #IfWinActive ahk_exe mmf2u.exe ahk_class #32770 ;the following code only runs while the EXPRESSION EDITOR is active
    { ;;; --------------jump to NEXT PARAMETER ---  
    
    
    !right::
    sendinput {right 2} ;position cursor ahead of any current selection
    sleep 30
    
    { ;;;         ; admin
    ControlGetFocus, activeControlVar, A
    ControlGetText, windowText, %activeControlVar%, A
    counter := 1
    vSnippetPosition := []
    	VarSetCapacity(vCaretPosition, 4, 0)
    	SendMessage, 0x00B0,, &vCaretPosition,%activeControlVar%, A
    	vCaretPosition := NumGet(vCaretPosition)	
    	  } ;;;  end admin 
    		
    Loop 		;PARSE text and record found snippet  positions
    { 
    
    cleanedWindowText := regexreplace(windowText,"im)`r`n"," ") ;convert line breaks into single characters or it gets confused
    
    	RegExMatch(cleanedWindowText, "O)\(|""\s\)", delimiter, counter) ; searches for (
    	counter := delimiter.Pos + delimiter.Len
    	if (delimiter.Value = "" )
    			break
    			vSnippetPosition.Push(delimiter.Pos)
    	}
    
    Loop 		;PICK next snippet from caret position
    	{
    	If (vCaretPosition < vSnippetPosition[A_Index]) 	
    		{ 													;select NEXT snippet
    		vSelectionPosition := vSnippetPosition[A_Index] -1	
    		break
    		}
    	Else If (vSnippetPosition[A_Index] = "")	;if no more snippets found
    		{								
    		break
    		}
    	}
    ;SELECT correct snippet. (SendMessage 0xB1 is EM_SETSEL, which highlights )
    SendMessage, 0xB1,%vSelectionPosition% ,%vSelectionPosition% , %activeControlVar%, A
    sendinput {left}^{left}^+{right}   ; select phrase before current snippet
    
    Return 
    
      } ;;;  end ---- next parameter
    
    { ;;; ------------------ jump to PREV PARAMETER ---
    
    !left::
    sendinput {left 2} ;position cursor ahead of any current selection
    sleep 30
    
    { ;;;         ; admin
    ControlGetFocus, activeControlVar, A
    ControlGetText, windowText, %activeControlVar%, A
    counter := 1
    vSnippetPosition := []
    	VarSetCapacity(vCaretPosition, 4, 0)
    	SendMessage, 0x00B0,, &vCaretPosition,%activeControlVar%, A
    	vCaretPosition := NumGet(vCaretPosition)	
    	  } ;;;  end admin 
    		
    Loop 		;PARSE text and record found snippet  positions
    { 
    cleanedWindowText := regexreplace(windowText,"im)`r`n"," ") ;convert line breaks into single characters or it gets confused
    	RegExMatch(cleanedWindowText, "O)\(|""\s\)", delimiter, counter) ; searches for (
    	counter := delimiter.Pos + delimiter.Len
    		if (delimiter.Value = "" )
    			break
    		vSnippetPosition.Push(delimiter.Pos)
    	}
    
    Loop 		;PICK next snippet from caret position
    	{
    	If (vCaretPosition < vSnippetPosition[A_Index]) 	
    		{ 													;select PREV snippet
    		vSelectionPosition := vSnippetPosition[A_Index-1] -1	
    		break
    		}
    	Else If (vSnippetPosition[A_Index] = "")	;if no more snippets found
    		{								
    		vSelectionPosition := vSnippetPosition[A_Index-1] -1	
    		break
    		}
    	}
    ;SELECT correct snippet. (SendMessage 0xB1 is EM_SETSEL, which highlights )
    SendMessage, 0xB1,%vSelectionPosition% ,%vSelectionPosition% , %activeControlVar%, A
    sendinput {left}^{left}^+{right}   ; select phrase before current snippet
    Return 
    
      } ;;;  end --- prev parameter
    #IfWinActive




    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.



    Code:
    #IfWinActive ahk_exe mmf2u.exe ahk_class #32770 ;the following code only runs while the EXPRESSION EDITOR is active
    ^`::
    
    vNewChars := 0
    { ;;;         ; admin
    ControlGetFocus, activeControlVar, A
    ControlGetText, windowText, %activeControlVar%, A
    counter := 1
    vSnippetPosition := []
    	  } ;;;  end admin 
    		
    Loop 		;PARSE text and record found snippet  positions
    { 
    cleanedWindowText := regexreplace(windowText,"im)`r`n"," ") ;convert line breaks into single characters or it gets confused
    	RegExMatch(cleanedWindowText, "O)\)", delimiter, counter) ; searches for )
    	counter := delimiter.Pos + delimiter.Len
    	if (delimiter.Value = "" )
    			break
    			vSnippetPosition.Push(delimiter.Pos)
    	}
    
    ;go through each snippet and press ctrl-enter after each one
    Loop 	
    	{
    		vSelectionPosition := vSnippetPosition[A_Index] 
    SendMessage, 0xB1,%vSelectionPosition% ,%vSelectionPosition% , %activeControlVar%, A
    sendinput {right %vNewChars%} ^{enter}
    sleep 100
    vNewChars := vNewChars +2 
    
    	 If (vSnippetPosition[A_Index+2] = "")	;if no more snippets found
    		{			
    		break
    		}
    	}
    
    Return 
    #IfWinActive

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



    Code:
    #IfWinActive ahk_exe mmf2u.exe ahk_class #32770 ;the following code only runs while the EXPRESSION EDITOR is active
    `::
    mousegetpos, origX, origY ;record current mouse position
    mousemove 160, 115
    click ; click on format button
    sleep 50
    mousemove %origX%, %origY% ; restore original mouse position after short delay
     return
     #IfWinActive



    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

    Code:
    { ;;;; ⸻⸻⸻⸻ move/resize an ACTIVE Fusion CHILD window (eg. the Event Editor). 
    #IfWinActive ahk_exe mmf2u.exe
    
    +^MButton::
    MouseGetPos, , , id, varControlID,3
    WinMove, ahk_id %varControlID%,, 284,-11,1884,1365
    return
    
    +!MButton::
    MouseGetPos, , , id, varControlID,3
    WinMove, ahk_id %varControlID%,,2549,-11,1080,1845
    return
    #IfWinActive 
    
      } ;;; 




    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
    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

    Code:
    #IfWinActive ahk_exe edrt.exe
    
     ; ⸻⸻⸻⸻ toggle native DEBUGGER 
     ^+d:: 
     {
     nativeDebuggerToggle := !nativeDebuggerToggle
    
    While  (nativeDebuggerToggle=1) {
     WinHide, ahk_class #32770 ahk_exe edrt.exe,
    return
       }
    	
    While  (nativeDebuggerToggle=0) {
     WinShow, ahk_class #32770 ahk_exe edrt.exe,
    return
       }
     
     
     return
     }
    #IfWinActive

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    355
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Oh nice! I was thinking about setting up some AHK scripts for Fusion, but you already did that, and went above and beyond! Nice work. I'm gonna check this out next time I boot up Fusion.

  3. #3
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    874
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    I love you vol

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,685
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    This tries to find all the single-word (no spaces) snippets in your code that are either toTheRight("of a bracket")...
    Got my left and right mixed up . That obviously should say toTheLeft. (I can't change it as the forum edit function still doesn't work)




    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:



    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.

    Code:
    ;Note: this code will only work when Fusion is the active window. If you want it to work everywhere on your PC, place a semicolon before the next line:
    #IfWinActive ahk_exe mmf2u.exe
    
    F12::
     vF12PressedAt := A_TickCount
    	KeyWait, F12
    vF12HeldFor:= 	A_TickCount-vF12PressedAt
    
    	If (A_PriorKey="F12" and vF12HeldFor<250) ;if F12 tapped briefly, without pressing anything else, then passthrough F12
    	sendinput {F12}	
    		Return
    return
    #If, GetKeyState("F12", "P") 
    
    
    ;-----YOUR HOTKEYS GO BELOW-----
    
    +'::EncloseSelection(chr(34),chr(34)) ;double quotes "   "
    +9::
    +0::EncloseSelection("(",")")   ;this will get triggered by both +0 and +9
    +4::EncloseSelection("Str$(",")")
    A::EncloseSelection("Abs(",")")
    F::EncloseSelection("("chr(34),chr(34)")")  ;brackets and quotes
    V::EncloseSelection("Val(",")")
    M::EncloseSelection("Min(>value<,",")")
    +M::EncloseSelection("Max(>value<,",")")
    R::EncloseSelection("Range(",",>min<,>max<)")
    .::EncloseSelection("Round(",")")
    up::EncloseSelection("Ceil(",")")
    down::EncloseSelection("Floor(",")")
    
    ;----YOUR HOTKEYS GO ABOVE----
    
    return
    
    #If
    #IfWinActive
    
    ;--------This is the function that performs the text enclosing:
    
    EncloseSelection(characterOpen,characterClose)
    {  ;wraps specified characters around pre-selected text
    oldClipboard := ClipboardAll ;store previous clipboard
    clipboard := ""  ; Start off empty to allow ClipWait to detect when the text has arrived.
    Send ^c
    ClipWait 0 ; Wait for the clipboard to contain text (if empty, will timeout after a bit)
    newText= %characterOpen%%clipboard%%characterClose%
    clipboard := ""  ; Start off empty to allow ClipWait to detect when the text has arrived.
    Clipboard := newText
    ClipWait 0  ; Wait for the clipboard to contain text.
    send ^v
    sleep 100
    Clipboard := oldClipboard ;restore previous clipboard
    
    }
    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.

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,685
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    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).

    Code:
    ; SHIFT+MOUSE WHEEL DOWN
    ~+WheelDown::
    
    ; example of how to EXCLUDE this hotkey from working in a certain program:
    if WinActive("ahk_exe Photoshop.exe")
    {   
    return   ;do nothing (so shift+wheel works as intended in certain PS editboxes)
    }
    
    ;for all other programs, execute the fast scroll:
    else
    {
    Send {Click WheelDown 0 0 relative 7}  ; scroll faster
    return
    }
    
    ; SHIFT+MOUSE WHEEL UP
    ~+WheelUp::
    
    ; example of how to EXCLUDE this hotkey from working in a certain program:
    if WinActive("ahk_exe Photoshop.exe")
    { 
    return   ;do nothing (so shift+wheel works as intended in certain PS editboxes)
    }
    
    ;for all other programs, execute the fast scroll:
    else
    {
    Send {Click WheelUp 0 0 relative 7}  
    return
    }

    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

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,685
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    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




    Code:
    #IfWinActive ahk_exe mmf2u.exe
    ^,::
    ;NOTE: if your properties window is nested rather than floating, replace "WinGetPos" below with "ControlGetPos"
    WinGetPos, xOrigin, yOrigin,,, Properties
    
    if !vPropertiesTab 
    {
    vPropertiesTab:=0 ; if variable undefined, define it now
    } 
    
    if (vPropertiesTab >0)
    {
    CoordMode, mouse, Screen
    xTab := --vPropertiesTab*33 + 20 + xOrigin
    yTab := yOrigin+40
    mousegetpos, origCursorX, origCursorY ;record current mouse position
    click, %xTab%, %yTab%
    mousemove %origCursorX%, %origCursorY% ; restore original mouse position after short delay
    return
    }
    return
    
    ^.::
    ;NOTE: if your properties window is nested rather than floating, replace "WinGetPos" below with "ControlGetPos"
    WinGetPos, xOrigin, yOrigin,,, Properties
    
    if !vPropertiesTab 
    {
    vPropertiesTab:=0 ; if variable undefined, define it now
    } 
    
    if (vPropertiesTab <6)
    {
    CoordMode, mouse, Screen
    xTab := ++vPropertiesTab*33 +20 + xOrigin
    yTab := yOrigin+40
    mousegetpos, origCursorX, origCursorY ;record current mouse position
    click, %xTab%, %yTab%
    mousemove %origCursorX%, %origCursorY% ; restore original mouse position after short delay
    return
    }
    return
    
    #IfWinActive



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

    Code:
    #IfWinActive ahk_exe mmf2u.exe
    +^a::
    ;NOTE: if your properties window is nested rather than floating, replace "WinGetPos" below with "ControlGetPos"
    WinGetPos, xOrigin, yOrigin,,, Properties
    
    CoordMode, mouse, Screen
    
    ; replace the first digit below (3 by default) with the number of the tab you want to jump to
    xTab := 3*33 +20 + xOrigin
    yTab := yOrigin+40
    mousegetpos, origCursorX, origCursorY ;record current mouse position
    click, %xTab%, %yTab%
    mousemove %origCursorX%, %origCursorY% ; restore original mouse position after short delay
    return
    
    #IfWinActive

  7. #7
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    635
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Capturing variables name list

    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 this thread 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.

    Code:
    #SingleInstance ignore
    #NoTrayIcon
    
    
    
    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    DetectHiddenWindows On
    DetectHiddenText, On
    SetKeyDelay, -1
    
    
    
    
    f1:: ;You can disable this if you'll run from StreamDeck or something
    
    
    
    
    WinActivate, ahk_exe mmf2u.exe ahk_class #32770 
    ;This class may change, you'll have to check...
    ;It works without it, but you would have to manually focus on the expression editor.
    
    
    
    
    ControlGet, vList, List, , ComboBox1, A
    Loop, Parse, vList, `n  ; Rows are delimited by linefeeds (`n).
    {
        RowNumber := A_Index
        Loop, Parse, A_LoopField, %A_Tab%  ; Fields (columns) in each row are delimited by tabs (A_Tab).
            fVars = %FVars%%A_LoopField%"`r`n"
    }
    Msgbox, "%vList%" ;This will show a popup with the whole list, you can disable it if you just want it on Clipboard instead
    clipboard := vList
    ExitApp

  8. #8
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    635
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Move conditions/actions up or down

    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.



    Code:
    #SingleInstance Force
    
    +Left:: ;Shift + Left will move up
    {
        Cut()
        Send {up}
        Paste()
        Sleep 100
        return
    }
    
    
    +Right:: ;Shift + Right will move down
    {
        Cut()
        SendInput {down}
        Paste()
        Sleep 100
        return
    }
    
    
    ;Functions
    
    
    Cut()
    {
        SendInput ^x
        sleep 10
        ClipSaved := ClipboardAll
    }
    
    
    Paste()
    {
        SendInput ^v
        SendInput {space}
        Clipboard := ClipSaved
    }

Similar Threads

  1. Handy little tip for UI design.
    By MrCyberpunk in forum Firefly
    Replies: 1
    Last Post: 18th December 2016, 04:59 AM
  2. Database/Array of multiline scripts
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th April 2012, 01:35 AM
  3. Scripts et MMF2
    By Magicflottant in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th June 2011, 02:23 AM
  4. Working in different languages (font scripts)
    By Gary_Molton in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th October 2007, 02:27 PM
  5. handy program for calldll
    By truebfd in forum Extension Development
    Replies: 2
    Last Post: 1st May 2007, 10:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •