[SCRIPT] Community Configuration Menu : V1.51 : 03/01/2012
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
New Update available:
Added Options.
You can setup single options to be displayed on the menu, allowing users to change options without needing an additional menu.
Currently 3 types of Options are available to use
Boolean: Simply On/Off options, selecting it disables or enables the option
Cycle: Can have any number of values, when selecting, cycles through all avaialble values
Select: Can have any number of values, when selecting, a menu options with all values that can be selected
Added Options.
You can setup single options to be displayed on the menu, allowing users to change options without needing an additional menu.
Currently 3 types of Options are available to use
Boolean: Simply On/Off options, selecting it disables or enables the option
Cycle: Can have any number of values, when selecting, cycles through all avaialble values
Select: Can have any number of values, when selecting, a menu options with all values that can be selected
Plugin Configurations Menu hotkey duplicating itself
Ok so here is my problem the plugin configurations menu is activated by a hotkey and it keeps duplicating it self. There are now 25 of them in the controls menu. The one I set a hotkey too still works the rest just say not bound. The real problem is I think it has caused me to reach a hotkey limit since I am unable to add one for a script I just wrote. So what script adds that menu? and how do I remove the unneeded hotkeys?
And yes, this happens in any new game I start too after a few saves and restarting the game multiple hotkey entries show up
And yes, this happens in any new game I start too after a few saves and restarting the game multiple hotkey entries show up
Don't make me slap Ye!
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
The solution is to ensure that the setup script that creates the hotkey only runs once.
So the setup checks for a global variable.
If not found, call a script that creates the hotkey, and create the global variable.
If the global variable exists, then do nothing.
This way, the script that creates the hotkey is only ever run a single time.
So the setup checks for a global variable.
If not found, call a script that creates the hotkey, and create the global variable.
If the global variable exists, then do nothing.
This way, the script that creates the hotkey is only ever run a single time.
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
Edit: Misread the OP. I looked through the hotkey manager script and the community plugin manager script and i cant see any reason why it would duplicate (i have just installed the hotkey manager and will check if duplication occurs with this)
his script (as always) is designed to add a hotkey if the hotkey manager isnt installed. but remove it if the manager installs one.
on a side note... this should really be posted on the community configuration menu post
his script (as always) is designed to add a hotkey if the hotkey manager isnt installed. but remove it if the manager installs one.
on a side note... this should really be posted on the community configuration menu post
-
- Posts: 1135
- Joined: Sun, 19. Oct 08, 18:46
yeah, Cycrow, you noob! (rofl)apricotslice wrote:The solution is to ensure that the setup script that creates the hotkey only runs once.
So the setup checks for a global variable.
If not found, call a script that creates the hotkey, and create the global variable.
If the global variable exists, then do nothing.
This way, the script that creates the hotkey is only ever run a single time.
EDIT: should maybe mention I can confirm the multiple hotkey issue.
Re: [SCRIPT] Community Configuration Menu : V1.20 : 03/06/2009
...
Last edited by Gazz on Sun, 29. Nov 09, 21:24, edited 2 times in total.
-
- Posts: 1135
- Joined: Sun, 19. Oct 08, 18:46
I think I've found the problem.
plugin.hotkeymanager.add:
... but $count can be 0. I.e. when the hotkey installed at index 0 is the one you are trying to check, the following 'if $found' block will not run. Changed to:
... I did a quick check and this appears to fix the problem.
plugin.hotkeymanager.add:
Code: Select all
007 |while $count
008 ||dec $count =
009 ||$key = $hotkeys[$count]
010 ||$name = $key[0]
011 ||if $name == $a.name
012 |||$found = $count
013 |||break
014 ||end
015 |end
016 |
017 * check if the script has changed and regesiter
018 |if $found
Code: Select all
007 |while $count
008 ||dec $count =
009 ||$key = $hotkeys[$count]
010 ||$name = $key[0]
011 ||if $name == $a.name
012 |||$found = [TRUE]
013 |||break
014 ||end
015 |end
016 |
017 * check if the script has changed and regesiter
018 |if $found
interesting, i guess thats y its working for me, you have a different version of the hotkey manager.
it was fixed awhile ago but i guess i forgot to update that package.
if u have devnet 3 access, u could just download the test one from there that has it fixed.
running 2 seperate versions, signed and unsighned, must be getting me confused
it was fixed awhile ago but i guess i forgot to update that package.
if u have devnet 3 access, u could just download the test one from there that has it fixed.
running 2 seperate versions, signed and unsighned, must be getting me confused
i've updated the hotkey manager to include the latest files, so if u redownload that, it should help.
it wont remove the existing ones, that is abit more difficult.
if u dont have any scripts that use hotkeys, then u can just remove all the hotkeys, a simple script could do this. However, if u have other scripts that use hotkeys, this would also remove them and could cause problems
ill write the script later today
it wont remove the existing ones, that is abit more difficult.
if u dont have any scripts that use hotkeys, then u can just remove all the hotkeys, a simple script could do this. However, if u have other scripts that use hotkeys, this would also remove them and could cause problems
ill write the script later today
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
Hey Cycrow,
just a note in passing, if you get the time before you update this again, could you add a true return on success when you register a script. (so my script can register a hotkey if your plugin manager isnt installed )
apologies if you've already done this and i dont have the most up to date version,
thanks
sam
just a note in passing, if you get the time before you update this again, could you add a true return on success when you register a script. (so my script can register a hotkey if your plugin manager isnt installed )
apologies if you've already done this and i dont have the most up to date version,
thanks
sam