Hello forum!
I use FL Studio 12 and I'm trying to make a script that selects (with 2 mouse clicks) certain menu options.
Menu looks like this:
I want to press "ctrl+=" to select "beat". Press again it goes to "1/2 beat"; then 1/4 beat, 1/2 step, 1/4 step... and repeats the list/order.
Also I want to press "ctrl+-" for the reverse order, so this way I can go up and down in the menu. Also if I press and hold a hotkey, it doesn't go in a loop but makes only one selection.
I managed to make only one command but I don't know how to make different commands to run in order/cycle. Came with this:
;Snap to grid selection -> Ctrl + =
#IfWinActive ahk_class TFruityLoopsMainForm
^=:: MouseGetPos CurX, CurY
Sleep 50
MouseClick, left, 941, 100 ; click drop-down menu
Sleep 50
MouseClick, left, 941, 441 ; select an option
MouseMove %CurX%, %CurY%, 0
return
===============================================================
Can you help me add others to the list please?
;beat
MouseClick, left, 941, 100
MouseClick, left, 941, 437
;1/2 beat
MouseClick, left, 941, 100
MouseClick, left, 941, 413
;1/4 beat
MouseClick, left, 941, 100
MouseClick, left, 941, 361
;1/2 step
MouseClick, left, 941, 100
MouseClick, left, 941, 287
;1/4 step
MouseClick, left, 941, 100
MouseClick, left, 941, 237
====
If there is an easier way to make this, please let me know. Thanks in advance!
Drop-down menu: up&down selection (FL Studio)
Re: Drop-down menu: up&down selection (FL Studio)
I think it won't work for such application because it's not a regular menu item.BoBo wrote:WinMenuSelectItem
This command will not work with applications that use non-standard menu bars
I'm a total noob with coding
Re: Drop-down menu: up&down selection (FL Studio)
Can someone please at least tell what command to start with? I can't find any info on how to... for example (i don't know how to properly explain this):
press A = mouse action 1
press A = mouse action 2
press A = mouse action 3
press A = mouse action 1 (again)
press A = mouse action 2
Et cetera...
so i can loop those commands in certain order.
press A = mouse action 1
press A = mouse action 2
press A = mouse action 3
press A = mouse action 1 (again)
press A = mouse action 2
Et cetera...
so i can loop those commands in certain order.
Re: Drop-down menu: up&down selection (FL Studio)
not sure if your still looking and i do not have a solution i do have a couple alternatives
i tried making something like this for fl studio but the problem is the menu's are not accessible to my knowledge
even with 1 click to open the menu you still cant move through it
what i ended up doing is make hotkeys for each of the options i wanted and i added splash text just below the current mouse position to tell you what you just pressed this one is for 1-2 beat
the font i use is not standard installed you could replace Vertigo Upright 2 B... with something you do have or just download and install that font
the line that has progress the w166 is the witdh of the box for the text, fs32 is the font size
the sleep turns the text off after 350ms this also means you cant reuse the hotkey until the cycle is done
mx is the position of the text relative to your current mouse position this is half of the width of w166 in progress line to get it centered
my is the position in height in my case 22 pixels below my mouse pointer
you will probably need to replace the coordinates with coordinates of your own screen i use weird dpi settings also replace ^+d with the hotkey you want
another option is this post on image forums that uses 2 hotkeys 1 for strait stuff and another for triplets https://forum.image-line.com/viewtopic.php?t=173156
i personally do not like that option it involves to many key pressed but it is sort of what your looking for
if you use the above do not remove any of the , in the progress line after 1-2 beat
if anything else i made about 60 custom hotkeys for fl studio some invented and some just remapped
i tried making something like this for fl studio but the problem is the menu's are not accessible to my knowledge
even with 1 click to open the menu you still cant move through it
what i ended up doing is make hotkeys for each of the options i wanted and i added splash text just below the current mouse position to tell you what you just pressed this one is for 1-2 beat
Code: Select all
#IfWinActive ahk_class TFruityLoopsMainForm
^+d::
MouseGetPos CurX, CurY
Send {Click 786, 85} ; A click on position of -> SNAP MENU
Send {Click 793, 469} ; A click on position of -> 1/2 BEAT
MouseMove %CurX%, %CurY%, 0
mouseGetPos,mx,my
mx-=83
my+=22
Progress, cw000000 CTFFFFFF W166 ZX1 ZY1 x%mx% y%my% m b fs32 zh0, 1/2 Beat, , , Vertigo Upright 2 B...
Sleep 350
Progress, Off
return
the line that has progress the w166 is the witdh of the box for the text, fs32 is the font size
the sleep turns the text off after 350ms this also means you cant reuse the hotkey until the cycle is done
mx is the position of the text relative to your current mouse position this is half of the width of w166 in progress line to get it centered
my is the position in height in my case 22 pixels below my mouse pointer
you will probably need to replace the coordinates with coordinates of your own screen i use weird dpi settings also replace ^+d with the hotkey you want
another option is this post on image forums that uses 2 hotkeys 1 for strait stuff and another for triplets https://forum.image-line.com/viewtopic.php?t=173156
i personally do not like that option it involves to many key pressed but it is sort of what your looking for
if you use the above do not remove any of the , in the progress line after 1-2 beat
if anything else i made about 60 custom hotkeys for fl studio some invented and some just remapped
Re: Drop-down menu: up&down selection (FL Studio)
Hello, this works for me (AHKv2):
This is a version for AHKv1 (using F1 and F2) adjusted to your coordinates (not tested):
Code: Select all
F1::DoMagic(1)
F2::DoMagic(0)
DoMagic(HappyVar)
{
Static pos := 0 ; current
, coords := { 0: [655,66] ; control [x,y]
, 1: [630,324] ; beat
, 2: [629,303] ; 1/2 beat
, 3: [625,264] ; 1/4 beat
, 4: [631,211] ; 1/2 step
, 5: [624,170] } ; 1/4 step
BlockInput TRUE
pos := HappyVar ? (pos+1 > 5 ? 1 : pos+1) : (pos-1 < 1 ? 5 : pos-1)
Click coords[0][1], coords[0][2]
Sleep 250
Click coords[pos][1], coords[pos][2]
BlockInput FALSE
}
Code: Select all
F1::DoMagic(1)
F2::DoMagic(0)
DoMagic(HappyVar)
{
Static pos := 0 ; current
, coords := { 0: [941,100] ; control [x,y]
, 1: [941,437] ; beat
, 2: [941,413] ; 1/2 beat
, 3: [941,361] ; 1/4 beat
, 4: [941,287] ; 1/2 step
, 5: [941,237] } ; 1/4 step
BlockInput ON
pos := HappyVar ? (pos+1 > 5 ? 1 : pos+1) : (pos-1 < 1 ? 5 : pos-1)
Click % coords[0][1], % coords[0][2]
Sleep 250
Click % coords[pos][1], % coords[pos][2]
BlockInput OFF
}
Who is online
Users browsing this forum: Bing [Bot], DecimalTurn, Google [Bot], macromint, peter_ahk and 349 guests