Jump to content

Set Hotkeys in script according to ini file


Recommended Posts

I have an ini file similar to this:

[section]

^d=function1

^f=function2

Now I have my script reading from this ini like this:

[/s][s]$readsection = IniReadSection(@ScriptDir & "\temp.ini", "section")
For $i = 1 To $readsection[0][0]
     HotKeySet($readsection[$i][1], $readsection[$i][0])
Next[/s][s]

I want it to read the key/value pairs in the ini file and set all the keys in the ini files as hotkeys, and all the values in the ini as the function to go to when the hotkey is pressed.

is this the right way to do it? because when lets say a key/value pair looks like this: ^g=showmsgbox and i press Ctrl+g

it doesn't go to the showmsgbox() function.

Edited by IWantIt
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...