Surface # 1 X1 = 1642 Y1 = 56 X2 = 1719 Y2 = 75 Surface # 2 X1 = 1644 Y1 = 249 X2 = 1723 Y2 = 268 Surface # 3 X1 = 1642 Y1 = 304 X2 = 1706 Y2 = 325 Surface # 4 X1 = 1642 Y1 = 443 X2 = 1699 Y2 = 463 Determine all coordinates with the screen in your DEFINED STATE! Surface # 1 X1 = 1766 Y1 = 277 X2 = 1861 Y2 = 293 TOOLS: See AutoHotkey_for_MuseScore.pdf page 13 and 18-21 command: [ + NumpadEnter This runs the separate macro 'set surface coordinates'. This is the preferred method. With this command you can determine upto 8 surfaces and create 8 images in one go. This document is a 'book keeping' tool, a preparation for Coordinates.ahk. Copy the coordinates from this document to Coordinates.ahk. Tip: before you copy make the Image Search area just a bit bigger than the actual Image area. It acts as an extra check to keep the attention focused and allows slight shifts. Make TLC_X and TLC_Y e.g. 2px smaller: so subtract 2 2 px more to the left and 2 px higher Make BRC_X and BRC_Y e.g. 2px bigger: so add 2 2 px more to the right and 2 px lower ; ================================== STATUSBAR IMAGES ============================================= NOTICE: All your STATUSBAR IMAGES have the same search area. You find a list of all Statusbar images at the bottom of this file. See description. There you can enter the coordinates. ; =================================== TEST IMAGES ================================================= Preferably TEST the images: First save your Coordinates.ahk Exit and reload the Master. Now the updated Coordinates.ahk file is included in the Master. Test utility: in the Master: Z + U (utilities) and enter TIR. - Test Image Recognition. ; ============================= COPY HERE YOUR FOUND COORDINATES ================================== ; Copy HERE your found coordinates: ; Canvas Search Area CSA_X1 := xxxx ; Canvas Search Area Top Left Corner CSA_Y1 := yyyy CSA_X2 := xxxx ; Canvas Search Area Bottom Right Corner CSA_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; Canvas Navigation Area: no image needed! It is a surface at the topleft of the canvas ; This will be lasso selected by the navigation commands \ + Left and \ + Right. ; The commands combine PageUp and PageDown with the actual selection of something ; So there is no loss of focus CNA_X1 := xxxx ; Canvas Navigation Area Top Left Corner CNA_Y1 := yyyy CNA_X2 := xxxx ; Canvas Navigation Area Bottom Right Corner CNA_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; IMAGES in INSPECTOR - all images have unique searchcoordinates ; for an explanation of the option *40 see AutoHotkey_for_MuseScore.pdf page 12 ; Copy HERE your found coordinates: ; ImageSearch, , , IM_01_X1, IM_01_Y1, IM_01_X2, IM_01_Y2, *40 IM_01_Inspector_Inspector.png IM_01_X1 := xxxx ; Top Left Corner of Search rectangle X IM_01_Y1 := yyyy ; idem Y IM_01_X2 := xxxx ; Bottom Right Corner of Search rectangle IM_01_Y2 := yyyy ; idem Y ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_01_2_X1, IM_01_2_Y1, IM_01_2_X2, IM_01_2_Y2, *40 IM_01_2_Inspector_Displaced_Insp.png IM_01_2_X1 := xxxx ; Inspector docked but width unknown IM_01_2_Y1 := yyyy ; Search area is a ribbon from Inspector at maximum width IM_01_2_X2 := xxxx ; to Inspector at minimum width IM_01_2_Y2 := yyyy ; take care that the png does NOT contain the dots behind Insp, ; see example in documentation. png is relatively high ; in the utility 'Test Image Recognition': test this png first in the defined state ; if this png is recognized don't exit 'Test Image Recognition' but make the Inspector ; as narrow as possible and test again ; or use the hotkey Z + F2. ; see also here the related variable Insp_Loc_Dist := x ; This is the X-distance from the point of recognition of IM_01_2 to where the Inspector separator becomes active ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_02_X1, IM_02_Y1, IM_02_X2, IM_02_Y2, *40 IM_02_Inspector_Empty_Surface.png IM_02_X1 := xxxx IM_02_Y1 := yyyy IM_02_X2 := xxxx IM_02_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_03_X1, IM_03_Y1, IM_03_X2, IM_03_Y2, *40 IM_03_Inspector_Nothing_Selected.png IM_03_X1 := xxxx IM_03_Y1 := yyyy IM_03_X2 := xxxx IM_03_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_04_X1, IM_04_Y1, IM_04_X2, IM_04_Y2, *40 IM_04_Inspector_Stem.png IM_04_X1 := xxxx ; select Stem. Condition 'Play' is ticked! IM_04_Y1 := yyyy IM_04_X2 := xxxx IM_04_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_05_X1, IM_05_Y1, IM_05_X2, IM_05_Y2, *40 IM_05_Inspector_Flag.png IM_05_X1 := xxxx ; select Flag. Condition 'Play' is ticked! IM_05_Y1 := yyyy IM_05_X2 := xxxx IM_05_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_06_X1, IM_06_Y1, IM_06_X2, IM_06_Y2, *40 IM_06_Inspector_Tuplet.png IM_06_X1 := xxxx ; select Tuplet. Condition 'Play' is ticked! IM_06_Y1 := yyyy IM_06_X2 := xxxx IM_06_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_07_X1, IM_07_Y1, IM_07_X2, IM_07_Y2, *40 IM_07_Inspector_AugmentationDot1.png IM_07_X1 := xxxx ; select Dot1. Condition 'Play' is ticked! IM_07_Y1 := yyyy IM_07_X2 := xxxx IM_07_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_08_X1, IM_08_Y1, IM_08_X2, IM_08_Y2, *40 IM_08_Inspector_Select_Beam.png IM_08_X1 := xxxx ; select Beam. Condition 'Play' is ticked! IM_08_Y1 := yyyy IM_08_X2 := xxxx IM_08_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_09_X1, IM_09_Y1, IM_09_X2, IM_09_Y2, *40 IM_09_Inspector_Beam_Custom_Position_ticked.png IM_09_X1 := xxxx IM_09_Y1 := yyyy IM_09_X2 := xxxx IM_09_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_13_X1, IM_13_Y1, IM_13_X2, IM_13_Y2, *40 IM_13_Inspector_Element.png IM_13_X1 := xxxx IM_13_Y1 := yyyy IM_13_X2 := xxxx IM_13_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_14_X1, IM_14_Y1, IM_14_X2, IM_14_Y2, *40 IM_14_Inspector_Segment.png IM_14_X1 := xxxx IM_14_Y1 := yyyy IM_14_X2 := xxxx IM_14_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_17_X1, IM_17_Y1, IM_17_X2, IM_17_Y2, *40 IM_17_Inspector_Text.png IM_17_X1 := xxxx IM_17_Y1 := yyyy IM_17_X2 := xxxx IM_17_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, TrX, TrY, IM_18_X1, IM_18_Y1, IM_18_X2, IM_18_Y2, IM_18_Inspector_Triangle_Closed.png IM_18_X1 := xxxx ; inspector triangle search column IM_18_Y1 := yyyy ; pdf p 31 IM_18_X2 := xxxx IM_18_Y2 := yyyy ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_19_X1, IM_19_Y1, IM_19_X2, IM_19_Y2, *40 IM_19_Inspector_Play_Panel_Header.png ; color header playpanel when docked IM_19_X1 := xxxx ; search area is higher than inspector IM_19_Y1 := yyyy ; when at startup inspector is absent IM_19_X2 := xxxx ; see pdf p 48 IM_19_Y2 := yyyy ; to lowest possible point of play panel ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_20_X1, IM_20_Y1, IM_20_X2, IM_20_Y2, *40 IM_20_Inspector_Fingering.png IM_20_X1 := xxxx ; Search area rather big. IM_20_Y1 := yyyy ; Y1 determined by position of piano/guitar fingering IM_20_X2 := xxxx ; Y21 determined by position when IM_20_Y2 := yyyy ; string number selected ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_21_X1, IM_21_Y1, IM_21_X2, IM_21_Y2, *40 IM_21_Inspector_Stem_section_open.png IM_21_X1 := xxxx ; this Inspector image replaces IM_21_Y1 := yyyy ; statusbar image because IM_21_X2 := xxxx ; it will also work IM_21_Y2 := yyyy ; in range slection ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_22_X1, IM_22_Y1, IM_22_X2, IM_22_Y2, *40 IM_22_Inspector_Fretboard_Diagram.png IM_22_X1 := xxxx ; search area IM_22_Y1 := yyyy ; all 4 sides IM_22_X2 := xxxx ; 1-2 px IM_22_Y2 := yyyy ; bigger ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_23_X1, IM_23_Y1, IM_23_X2, IM_23_Y2, *40 IM_23_Line_triangle_section_open.png IM_23_X1 := xxxx ; search area IM_23_Y1 := yyyy ; all 4 sides IM_23_X2 := xxxx ; 1-2 px IM_23_Y2 := yyyy ; bigger ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_24_X1, IM_24_Y1, IM_24_X2, IM_24_Y2, *40 IM_24_Ornament_triangle_section_open.png IM_24_X1 := xxxx ; search area IM_24_Y1 := yyyy ; all 4 sides IM_24_X2 := xxxx ; 1-2 px IM_24_Y2 := yyyy ; bigger ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_25_X1, IM_25_Y1, IM_25_X2, IM_25_Y2, *40 IM_25_Play_ticked.png IM_25_X1 := xxxx ; search area IM_25_Y1 := yyyy ; all 4 sides IM_25_X2 := xxxx ; 1-2 px IM_25_Y2 := yyyy ; bigger ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_26_X1, IM_26_Y1, IM_26_X2, IM_26_Y2, *40 IM_26_Inspector_Beam_Section_active.png IM_26_X1 := xxxx ; IM_26_Y1 := yyyy ; IM_26_X2 := xxxx ; IM_26_Y2 := yyyy ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_27_X1, IM_27_Y1, IM_27_X2, IM_27_Y2, *40 IM_27_Clef_triangle_section_open.png IM_27_X1 := 1641 ; IM_27_Y1 := 303 ; IM_27_X2 := 1762 ; IM_27_Y2 := 328 ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_28_X1, IM_28_Y1, IM_28_X2, IM_28_Y2, *40 IM_28_TimeSig_triangle_section_open.png IM_28_X1 := 1641 ; IM_28_Y1 := 304 ; IM_28_X2 := 1762 ; IM_28_Y2 := 328 ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , IM_29_X1, IM_29_Y1, IM_29_X2, IM_29_Y2, *40 IM_29_KeySig_triangle_section_open.png IM_29_X1 := 1639 ; IM_29_Y1 := 305 ; IM_29_X2 := 1757 ; IM_29_Y2 := 328 ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , SLF_01_X1, SLF_01_Y1, SLF_01_X2, SLF_01_Y2, *40 SLF_01_SelectionFilter_All_ticked.png SLF_01_X1 := xxxx ; this coordinate will be zero SLF_01_Y1 := yyyy ; NB: the image must not be colored SLF_01_X2 := xxxx ; because 'All' is NOT selected SLF_01_Y2 := yyyy ; EXTRA: SF_OffSet_X := 50 ; to the right of the tick area e.g. of Grace Notes; ; a click there will turn the surface blue and secures ; that 'All' is NOT blue - see pdf p 60 ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , PI_X1, PI_Y1, PI_X2, PI_Y2, *40 PI_Print_Icon.png PI_X1 := xxxx ; PI_Y1 := yyyy ; PI_X2 := xxxx ; PI_Y2 := yyyy ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , DA_X1, DA_Y1, DA_X2, DA_Y2, *40 DA_Portal_Open_Down_Arrow.png DA_X1 := xxxx ; DA_Y1 := yyyy ; DA_X2 := xxxx ; DA_Y2 := yyyy ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; ImageSearch, , , MP_X1, MP_Y1, MP_X2, MP_Y2, *40 PIN_Master_Palette_Pincé.png ; NB: Make a png of the symbol while it is NOT selected! ; Minimize both subwindows. ; at the left the column with names, at the right the search field and the rectangle for the symbols MP_X1 := xxxx ; Search Area Master Palette Symbols - minimized MP_Y1 := yyyy ; used for initialisation Symbols MP_X2 := xxxx ; it is the surface of the rectangle at the rightside MP_Y2 := yyyy ; where the symbols appear ; ------------------------------------------------------------------------------------------------- ; CTS_Checked_ticked_sign.png. This same image is used in eight different situations ; so eight surfaces have to be determined ; Surface 1 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, CTS_X1, CTS_Y1, CTS_X2, CTS_Y2, *40 CTS_Checked_ticked_sign.png CTS_X1 := xxxx ; condition: when mouse clicks on toolbar selection spot CTS_Y1 := yyyy ; then these coordinates describe the area of the ticks √ CTS_X2 := xxxx ; from □ File Operations to □ Workspaces. CTS_Y2 := yyyy ; NB: the play panel must be present so there have to be 8 rows in upper section ; after the AHK initialisation of the playpanel there will be 8 rows ; utilities command: Z + U and then IPP for initialise play panel (or manual equivalent) ; ------------------------------------------------------------------------------------------------- ; Surface 2 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, FoFb_X1, FoFb_Y1, FoFb_X2, FoFb_Y2, *40 CTS_Checked_ticked_sign.png ; Toolbars from File Operations to Feedback FoFb_X1 := xxxx ; (same as CTS_X1) condition: when mouse right-clicks on toolbar selection spot FoFb_Y1 := yyyyy ; (same as CTS_Y1) then these coordinates describe the area of the ticks √ FoFb_X2 := xxxx ; (same as CTS_X2) from □ File Operations to □ Feedback FoFb_Y2 := yyyy ; NB: play panel must be present so 8 rows in upper section ; ------------------------------------------------------------------------------------------------- ; Surface 3 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, NoteInp_X1, NoteInp_Y1, NoteInp_X2, NoteInp_Y2, *40 CTS_Checked_ticked_sign.png ; Surface is Toolbars Note input and Workspaces NoteInp_X1 := xxxx ; (same as CTS_X1) condition: when mouse right-clicks on toolbar selection spot NoteInp_Y1 := yyyy ; (same as FoFb_Y2) then these coordinates describe the area of the tick √ NoteInp_X2 := xxxx ; (same as CTS_X2) around □ Note Input NoteInp_Y2 := yyyy ; NB: play panel must be present so 8 rows in upper section ; ------------------------------------------------------------------------------------------------- ; Surface 4 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, WorkSp_X1, WorkSp_Y1, WorkSp_X2, WorkSp_Y2, *40 CTS_Checked_ticked_sign.png WorkSp_X1 := xxxx ; (same as CTS_X1) condition: when mouse right-clicks on toolbar selection spot WorkSp_Y1 := yyyy ; then these coordinates describe the area of the tick √ WorkSp_X2 := xxxx ; (same as CTS_X2) around □ Workspaces WorkSp_Y2 := yyyy ; (same as CTS_Y2) NB: play panel must be present so 8 rows in upper section ; ------------------------------------------------------------------------------------------------- ; Surface 5 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, PalTick_X1, PalTick_Y1, PalTick_X2, PalTick_Y2, *40 CTS_Checked_ticked_sign.png PalTick_X1 := xxxx ; (same as CTS_X1) condition: when mouse right-clicks on toolbar selection spot PalTick_Y1 := yyyy ; tick √ area of □ Palettes only PalTick_X2 := xxxx ; (same as CTS_X2) take as highest y-coord. the point where □ turns blue PalTick_Y2 := yyyy ; take as lowest y-coord. the lowest point where □ is still blue ; ------------------------------------------------------------------------------------------------- ; Surface 6 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, SelTick_X1, SelTick_Y1, SelTick_X2, SelTick_Y2, *40 CTS_Checked_ticked_sign.png SelTick_X1 := xxxx ; (same as CTS_X1) when mouse clicks on toolbar selection spot SelTick_Y1 := yyyy ; tick √ area of □ Selection Filter SelTick_X2 := xxxx ; (same as CTS_X2) take as highest y-coord. the point where □ turns blue SelTick_Y2 := yyyy ; NB: play panel must be present so 8 rows in upper section ; ------------------------------------------------------------------------------------------------- ; Surface 7 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, FileOpTick_X1, FileOpTick_Y1, FileOpTick_X2, FileOpTick_Y2, *40 CTS_Checked_ticked_sign.png FileOpTick_X1 := xxxx ; (same as CTS_X1) when mouse clicks on toolbar selection spot FileOpTick_Y1 := yyyy ; tick √ area of □ File Operations FileOpTick_X2 := xxxx ; (same as CTS_X2) take as highest y-coord. the point where □ turns blue FileOpTick_Y2 := yyyy ; (same as SelTick_Y2 ) take as lowest y-coord. the lowest point where □ is still blue ; ------------------------------------------------------------------------------------------------- ; Surface 8 - Copy HERE your found coordinates: ; ImageSearch, Tick_X, Tick_Y, Hor_X1, Hor_Y1, Hor_X2, Hor_Y2, *40 CTS_Checked_ticked_sign.png Hor_X1 := xxxx ; Select beam - Force Horizontal (Beam) Hor_Y1 := yyyy ; tick √ area of □ Force Horizontal Hor_X2 := xxxx ; Hor_Y2 := yyyy ; ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: ; Determine the X-coordinate of the Palette images by a separator shift to the right ; starting at the left of the separator ; ImageSearch, X, Y, Pal_Loc_X1, Pal_Loc_Y1, Pal_Loc_X2, Pal_Loc_Y2, *80 Palette_Locator_Left.png ; ImageSearch, X, Y, Pal_Loc_X1, Pal_Loc_Y1, Pal_Loc_X2, Pal_Loc_Y2, *80 Palette_Locator_Right.png Pal_Loc_X1 := xxxx ; in full screen, no toolbars, yhis search area is a short ribbon Pal_Loc_Y1 := yyyy ; in extreme cases the palettes can be shifted in the inspector area Pal_Loc_X2 := xxxx ; also: the full width of canvas can be used when one Pal_Loc_Y2 := yyyy ; or more F-tooltips are absent ; related: Left_Loc_Dist := xx ; see the hotkey Z + F1. Measure the distance between the spot hit Right_Loc_Dist := xx ; by the mouse and the spot where the Palette separator becomes active Insp_Loc_Dist := x ; see the hotkey Z + F2. Distance to where the Inspector separator becomes active ; ================================================================================================= ; LIST OF ALL STATUSBAR IMAGES ; NB: ; The surface of ; Statusbar_Articulation_Tenuto_Staccato.png ; determines the Statusbar Search Area. ; This png is not used by any macro. ; see pdf p 38 ; ------------------------------------------------------------------------------------------------- ; Copy HERE your found coordinates: SB_X1 := 0 ; extreme left border SB_Y1 := yyyy ; set the height so that the surface can accomodate 2 stacked statusbars SB_X2 := xxxx ; the reason for this: in some situations the statusbar can get an extra line. SB_Y2 := yyyy ; This coordinate is of course the height (Y- resolution) of your screen minus 1 (pixel zero is the first pixel) ; Statusbar_Acciaccatura.png ; Statusbar_Appoggiatura.png ; Statusbar_Articulation.png ; Statusbar_Barline.png ; Statusbar_Beam.png ; Statusbar_Bend.png ; Statusbar_Dynamic.png ; Statusbar_Grace_Note.png ; Statusbar_Hairpin.png ; Statusbar_List_Selection.png ; Statusbar_Note_Pitch.png ; Statusbar_Nothing_Selected.png ; Statusbar_Range_Selection.png ; Statusbar_Rest.png ; Statusbar_Rest_Duration_Measure.png ; Statusbar_Slur.png ; Statusbar_Stem.png ; StatusBar_Symbol.png ; Statusbar_tacca.png ; Statusbar_Text.png ; Statusbar_TieStart.png ; StatusBar_Tremolo.png