• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - How to obtain current slider value (1 Viewer)

Joined
Jan 29, 2023
RedCents
156¢
Hi all. I'm having an issue where my screen gets dark sometimes (perhaps when I camp other toons out? not sure). My "fix" is to go into options and nudge the gamma a little bit which brightens it right up.

I'm a bit of a noob on using /notify to manipulate controls, but through searching I found that I can affect the gamma slider using a command like this:
/notify OptionsDisplayPage ODP_GammaSlider newvalue 9
The above sets the gamma slider to 47%. A newvalue of 19 sets is to 100%.

What I'd like to do is to query the current gamma value from the slider so that I can make two hotbuttons, one to increment the gamma and one to decrement the gamma.

So my question is: How can I query the current value of ODP_GammaSlider. Thanks.
 
Anytime you can "notify" a window, you would be able to get information from that same window.

${Window[OptionsDisplayPage].Child[ODP_GammaSlider].MemberGoesHere}


This is part of the Window datatype. Here are the potential members of the window TLO.

Without checking in game you'll need to try some options to see if you can find one that gives you the value. Usually with a slider there's also an input box so you can type in manually, this will typically house the current value. I've always known what I want to set slider values to, and never bothered to check what the current value is (think, choosing quantity when buying items).

Try

Text
Tooltip

One of these may get the results you want. Replace "MemberGoesHere" with the member you want to use. Alternately you'd need to know the name of the child window for the input box and try to get the value from it using Text/Tooltip
 
Had the gamma problem a while back, every time a toon would log out it would darken my screen. I want to say I ended up turning off windows gamma and it stopped messing with my gamma.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    149.2 KB · Views: 2
from a programming perspective I suppose thinking about it that it could be 100%. So you may need to get the .Length and if it's 4, then you know it's 100%, and if it's not, then get the Left[2]}
 
Thanks @ChatWithThisName. This is very helpful. I see that I can get the length of the string, then strip out the last digit, resulting in a string that contains an integer. I just don't see any functionality to convert that string to an actual integer so that I can do math on it.

What I think I'm going to do is to make a Lua script with the following specification:
1. Maintains an .ini file with just one integer in it, which is your desired gamma (read upon launch and write upon changes).
2. Every 5 seconds or so it'll reapply the current gamma value to the game (in case you've logged off recently and hosed your gamma).
3. Register "/gammaup" and "/gammadown" (or "/gamma+" and "/gamma-" if those are allowed) callbacks so that it can change its value (and write the .ini).

If I get really ambitious then the .ini will have different values per zone, much like the KissAssist_Info.ini does, so that you can have separate desired gamma values per zone. In this case that logic that applies the gamma every 5 seconds will be modified to check what zone you're in and if it is different than it was last iteration then it'll read the value for the new zone from the .ini file and start applying that. Now I just need to figure out how to read/write/modify .ini files. But there are many examples of that. I'll need to protect against race conditions by having the /gamma+ and /gamma- functions ensure that they think they're in the correct zone before applying. This is because if you're in a dark zone with a high gamma, then zone, then see it to be very bright for a moment before the 5 second loop iterates, then hit "/gamma-", we want to instead apply the gamma value for the new zone immediately as opposed to adjusting the gamma for the old zone.

Maybe there is a callback that I can get upon zone transition? I'd need to look into that.

Anyway, thanks again.
 
Well technically all things in Macros are "strings" so you can just
/declare theValue int outer ${Window[OptionsDisplayPage].Child[ODP_GammaValueLabel].Left[2]} and that should allow you to do the math with ${theValue}
 
Question - How to obtain current slider value

Users who are viewing this thread

Back
Top