Sign in to follow this  
Followers 0
Krush

Using INI files to define hotkeys

7 posts in this topic

I've been using ini files to write out my hotkeys so the user of the script could change them based on their setup, but it doesn't appear to be working, most notably I tried to simple have the ini file write out {NUMPAD7} and !{NUMPAD7} for 2 of them and all it seems to do is take over the 1 key (non num pad key).

Share this post


Link to post
Share on other sites



show some code?

Share this post


Link to post
Share on other sites

Global  $mhotkey_Func1  =   IniWrite(@ScriptDir&"\_Macros.ini", "Macro Hotkey", "Function 1",   "{NUMPAD7}")
Global  $mhotkey_Func2  =   IniWrite(@ScriptDir&"\_Macros.ini", "Macro Hotkey", "Function 2",   "!{NUMPAD7}")

; Hotkeys
HotKeySet($mhotkey_Func1,       "Func1")
HotKeySet($mhotkey_Func2,       "Func2")

This for example causes problems.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Oh that fixes it I bet Write returns 1 if it's successful thus all my hotkeys were mapped to 1. Glad it was something small.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0