Official ScriptUO EasyUO Scripts > Script Snippets
TrailMyx's OffsetClick generator
TrailMyx:
Here's a quick script that helps you determine where buttons are located on any gump relative to the position of the gump on the screen. Use in combination with the "OffsetClick" sub to make your button position determination effortless (i.e. put that calculator down.)
Usage:
1) Run Script
2) Open/select gump you want to determine positions of
3) Hover mouse over button in question
4) Hit ALT-F1 to capture that position
5) Cut/Paste (from right mouse button context) the string found in "String" edit box
6) Hit ALT-F1 to start actively scanning again
7) Rinse/Repeat
--- Code: easyuo ---set #LPC 100gosub showEUOMenu1set %update_rate 5set %timer #SCNT2 + %update_rateset %MODE CAPTURErepeat if #SCNT2 > %timer && %MODE = CAPTURE { menu set EUOEditMenu #CONTNAME menu set EUOEditSize #CONTSIZE menu set EUOEditX #CONTPOSX menu set EUOEditY #CONTPOSY set %tempx #CURSORX - #CONTPOSX set %tempy #CURSORY - #CONTPOSY set %string gosub , #SPC , OffsetClick , #SPC , %tempx , #SPC , %tempy menu set EUOEditString %string set %timer #SCNT2 + %update_rate } onhotkey F1 ALT { if %MODE = CAPTURE { set %MODE HOLD menu delete EUOLabel6 } else { set %MODE CAPTURE menu Text EUOLabel6 4 136 ALT-F1 to capture } wait 10 }until #FALSE;--------- EasyUO Menu Designer Code Begin ---------sub showEUOMenu1 menu Clear menu Window Title TM's Offset Click Generator menu Window Color BtnFace menu Window Size 236 147 menu Font Transparent #true menu Font Align Right menu Font Name MS Sans Serif menu Font Size 8 menu Font Style menu Font Color WindowText menu Font Transparent #false menu Font Align Left menu Text EUOLabel1 128 8 Current Menu menu Text EUOLabel2 128 32 Current Size menu Text EUOLabel3 60 60 X Coord menu Text EUOLabel4 60 84 X Coord menu Text EUOLabel5 176 112 String menu Text EUOLabel6 4 136 ALT-F1 to capture menu Font BGColor Window menu Edit EUOEditMenu 0 4 121 menu Edit EUOEditSize 0 28 121 menu Edit EUOEditX 0 56 53 menu Edit EUOEditY 0 80 53 menu Edit EUOEditString 0 108 169 menu Show 421 270return;--------- EasyUO Menu Designer Code End ---------
Use in combination with this little OffsetClick sub:
--- Code: easyuo ---;-------------------------------------------------------------------------------sub OffsetClick set %tempx %1 + #CONTPOSX set %tempy %2 + #CONTPOSY click %tempx %tempy freturn
camotbik:
Nice and easy.
Coragin:
You mean we have to copy and paste this? Ugh, so much work...wheres the download? :p
Scrripty:
Just a nice little tidbit here makes working with menus really easy... if you change the sub name to "sub OffsetClickR" and set the click %tempx %tempy to R instead of F you have a handy way of right clicking menus that are open in only 2 little easy subs. :) And you can use the click position you generated for left clicking the menu to right click it also, so it's just a cut and paste for both functions. :)
Example below:
--- Code: ---;-------------------------------------------------------------------------------
sub OffsetClickR
set %tempx %1 + #CONTPOSX
set %tempy %2 + #CONTPOSY
click %tempx %tempy r
return
--- End code ---
[/quote]
Khameleon:
LOL that looks similar to my offsetclick sub :P I guess there's not much more you can do with it eh :P
Navigation
[0] Message Index
[#] Next page
Go to full version