How to: Fix UI elements that move (like Radar)

free(?!) clues!

How to: Fix UI elements that move (like Radar)

Postby Kannkor » 21 May 2014, 19:06

This will provide an overview about how to fix UI windows that move, or don't stay positioned where you want them, for whatever reason.

For me, it's pushing a session to a different window, then doing something (re-logging?) that puts the radar on an entirely different screen (meaning it's off the screen entirely!).
Others have said that their radar moves a few pixels every single time they log in.
The "why" doesn't really matter.

The first thing we need to do, is determine the name of the window we want to modify. To see all the options on your screen, type the following into the console:
UIElement -list
Code: Select all
window 'window selector' - Hidden
window 'console' - Shown
window 'ogreircxml' - Shown
button 'settabvariables' - Hidden
button 'setcheckboxvariables' - Shown
window 'uixml' - Hidden
window 'ogreminiuixml' - Shown
window 'radarconfig' - Hidden
window 'eq2ogreosaxml' - Shown
frame 'main hud' - Shown
window 'ogremcp' - Shown
window 'radar window' - Shown
tooltip 'auto tooltip' - Hidden

Generally speaking, you can tell what most things do by the name. For example:
'console' - is the console you typed the command in.
'ogreminiuixml' - While it doesn't have captials in it anymore, it's actually 'Ogre Mini UI XML'. Meaning the little button with 'Show uplink/Pause/Show Main' on it.
Interestingly enough, 'uixml' is OgreBot's main UI. Apparently I haven't renamed it when I changed it like 5+ years ago. Oops.

Anyways, back on track.
In this example I will do radar. It is 'radar window'. (Radarconfig is the configuration window).
Make a script (open a text editor, and paste in the following code)
Code: Select all
function main()
{
   wait 20
   UIElement[radar window]:SetX[0]
   UIElement[radar window]:SetY[0]
}

In this example, we are setting radar to the top left corner of the screen (position 0,0). You can have it go any where you want it too.

Save the file to your /innerspace/scripts/ folder, and save it anything you want, with the file extension of ".iss". For ease, don't use spaces. I'm going to use "UIFixer.iss".
Note: Make sure it actually saves as "UIFixer.iss" and NOT as "UIFixer.iss.txt".

Once it is saved, you can do a quick test in game by typing the following into the console:
runscript UIFixer

It should move your window appropriately. If you want to test again, you can manually move it, then do the "runscript UIFixer" again.

Lets take this one step further. Lets assume you want this to run every single time you log into your tank.
In Ogrebot, on the "Load" tab, add this entry in:
runscript UIFixer

Now, every time Ogrebot is loaded (technically any time a profile is loaded, which includes when Ogrebot is loaded), it will execute your script.
Kannkor
 
Posts: 354
Joined: 06 Nov 2013, 11:49

Return to Guides & Strats

Who is online

Users browsing this forum: No registered users and 6 guests

cron