Jump to content

Hotkeyset using a ini


Bert
 Share

Recommended Posts

I'm designing a script that will read a INI file to see what key will be used for a hotkeyset.

$keySET = iniread("unplus.ini", "qkeys", "key", "{F6}")
;msgbox (0, "ok", $keySET) ;test to see what is sent 
$keyA = HotKeySet($keySET, "_F6_Func")

my ini entry looks like this:

[Qkeys]

key = ""{F7}""

The msgbox reports this

"{F7}"

I tried setting the ini like this also

[Qkeys]

key = "{F7}"

The wierd part is the hotsetkey when I run it is {"

any thoughts?

Link to comment
Share on other sites

  • Moderators

I'm designing a script that will read a INI file to see what key will be used for a hotkeyset.

$keySET = iniread("unplus.ini", "qkeys", "key", "{F6}")
;msgbox (0, "ok", $keySET);test to see what is sent 
$keyA = HotKeySet($keySET, "_F6_Func")

my ini entry looks like this:

[Qkeys]

key = ""{F7}""

The msgbox reports this

"{F7}"

I tried setting the ini like this also

[Qkeys]

key = "{F7}"

The wierd part is the hotsetkey when I run it is {"

any thoughts?

Just out of curiousity, because I don't feel like making an ini lol.

Does this work?:

$keySET = iniread("unplus.ini", "qkeys", "key", "{" &  "F6" & "}") 
;msgbox (0, "ok", $keySET);test to see what is sent 
$keyA = HotKeySet($keySET, "_F6_Func")

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Nevermind, I decided to test it myself, and yes it does work...

$keySET = iniread("unplus.ini", "qkeys", "key", "{" &  "F6" & "}")
;msgbox (0, "ok", $keySET);test to see what is sent
$keyA = HotKeySet($keySET, "_F6_Func")

While 1
    Sleep(1000)
WEnd

Func _F6_Func()
    MsgBox(0, "", "")
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...