Jump to content

Recommended Posts

Posted (edited)

How to save HotKey to file setting.ini?

[HotKey]

HotKey1=HotKeyCode|HotKeyModificator   ???

or

IniWrite($Ini, "HotKey", "HotKey1", _MakeWord(67, BitOR($HOTKEYF_ALT, $HOTKEYF_CONTROL)))

Then how to read?

$HotKey1= IniRead ($Ini, 'HotKey', 'HotKey1', '1603')

Need converter 

Edited by AZJIO
Posted

Mostly copy/pastes from Help file examples..

$sIni = @AppDataDir & "\HotKey-Test.ini"
$sData = "{F2}=SomeFunc" & @LF & "{F3}=SomeFunc" & @LF & "{F4}=Quit"

IniWriteSection($sIni, "HotKeys", $sData)

$vVar = IniReadSection($sIni, "HotKeys")

For $i = 1 To $vVar[0][0]
    HotKeySet($vVar[$i][0], $vVar[$i][1])
Next

While 1
    Sleep(100)
WEnd

Func SomeFunc()
    MsgBox(0, '', @HotKeyPressed)
EndFunc

Func Quit()
    Exit
EndFunc

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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
×
×
  • Create New...