Sign in to follow this  
Followers 0
AZJIO

I'm a retard and necro'd a topic for no good reason

3 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I did the same thing here: http://www.autoitscript.com/forum/index.php?showtopic=107965

Edit: Without RegisterHotkey

Edited by Mat

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