Posted: Sat Oct 07, 2023 7:21 am Post subject: Pop up prompt to user when scripts get enabled on CE trainer
My trainer needs some scripts and addresses to have a hotkey assigned to work properly. Is there a way to pop up the set hotkey menu for each script/address in particular automatically?
I will put a scenario here:
Script 1 [Needs hotkey for toggling the script itself]
Script 2 [Needs hotkey for toggling the script itself]
Script 3 [Needs hotkey that while pressed it changes the value to 0.5; if not pressed it stays at its original value 1.0]
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
Posted: Sun Oct 08, 2023 2:53 am Post subject:
No GUI for that no. You'll have to apply the hotkeys yourself before releasing it, or load the hotkeys from a userdefined config file (you need to program the parsing of that file yourself)
If you want to program a UI for that: create a dialog with a edit box in there and add an onkeydown event.
in the onkeydown event you can record keypresses (they are virtual keycodes that the hotkey handler supports) and display the current list of keys for that hotkey. (Also add a button to clear the list)
then an ok and cancel button where clicking ok applies the hotkey to the specific script. (e.g using createHotkey or using the memoryrecord hotkey property) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
load the hotkeys from a userdefined config file (you need to program the parsing of that file yourself)
Is there a code template I can use as I basis for this? Seems the same as coding an .asi
Dark Byte wrote:
If you want to program a UI for that: create a dialog with a edit box in there and add an onkeydown event.
in the onkeydown event you can record keypresses (they are virtual keycodes that the hotkey handler supports) and display the current list of keys for that hotkey. (Also add a button to clear the list)
then an ok and cancel button where clicking ok applies the hotkey to the specific script. (e.g using createHotkey or using the memoryrecord hotkey property)
Do you mind posting here a small example? I am not very familiar with coding trainers with CE.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum