How to navigate between Dropdown List Content via Hotkey?

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
tortellio
Expert Cheater
Expert Cheater
Posts: 55
Joined: Tue Oct 06, 2020 7:49 am
Reputation: 5

How to navigate between Dropdown List Content via Hotkey?

Post by tortellio »

For example i have a Dropdown List

Item Dropdown
- Item 01
- Item 02
- Item 03

In cheat engine, i can only access/select the content by double-clicking the Dropdown value

I want to make hotkey for navigation, so it's easier to use the Dropdown via hotkey rather than double-clicking and select the value everytime i want to use it. But i didn't see the option to navigate in cheat engine hotkey.

Can someone help?
Thank you in advance

predprey
Expert Cheater
Expert Cheater
Posts: 207
Joined: Thu Mar 02, 2017 8:46 pm
Reputation: 140

Re: How to navigate between Dropdown List Content via Hotkey?

Post by predprey »

Code: Select all

local al = getAddressList()
local mr = al.getMemoryRecordByDescription("Insert addresslist entry name here")

function rotFwdValue(mr)
  for i = 0, mr.DropDownCount - 1 do
    if mr.Value == mr.DropDownValue[i] then
      mr.Value= mr.DropDownValue[(i + mr.DropDownCount + 1) % mr.DropDownCount]
      return
    end
  end
  mr.Value= mr.DropDownValue[0]
end

function rotBwdValue(mr)
  for i = 0, mr.DropDownCount - 1 do
    if mr.Value == mr.DropDownValue[i] then
      mr.Value= mr.DropDownValue[(i + mr.DropDownCount - 1) % mr.DropDownCount]
      return
    end
  end
  mr.Value= mr.DropDownValue[0]
end

createHotkey(function() rotFwdValue(mr) end, VK_MENU, VK_UP)
createHotkey(function() rotBwdValue(mr) end, VK_MENU, VK_DOWN)
Script rotates the dropdownlist value and loops back to the front or back as needed.
Change the 'mr' variable as needed for each memory record you want and create as many corresponding hotkeys as needed.
Hotkey set are ALT+Arrow Up and ALT+Arrow Down, change keys as needed as per [Link]

User avatar
YoucefHam
Expert Cheater
Expert Cheater
Posts: 92
Joined: Sun Jan 21, 2018 10:21 pm
Reputation: 202

Re: How to navigate between Dropdown List Content via Hotkey?

Post by YoucefHam »

predprey wrote:
Mon Dec 07, 2020 1:50 am
Script rotates the dropdownlist value and loops back to the front or back as needed.
Change the 'mr' variable as needed for each memory record you want and create as many corresponding hotkeys as needed.
Hotkey set are ALT+Arrow Up and ALT+Arrow Down, change keys as needed as per [Link]
Thanks to you I manage to code a LUA file script to change the selected record Dropdown Value.

use ALT+Numpad(+) and ALT+Numpad(-) to cycle.

Put the LUA file in C:\Program Files\Cheat Engine 7.*\autorun
0-DropdownCycle.zip
(546 Bytes) Downloaded 126 times

Post Reply

Who is online

Users browsing this forum: No registered users