AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

make hotkeys a variable read from .ini file

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Serenity



Joined: 08 Nov 2004
Posts: 896

PostPosted: Wed Feb 23, 2005 11:09 pm    Post subject: make hotkeys a variable read from .ini file Reply with quote

I have this idea for pixelget2, and other compiled scripts, where the hotkeys for functions within the script are stored in a seperate .ini file, enabling the user to change hotkeys without recompiling or having AutoHotkey installed.

I tried the following, but doesn't work. Any ideas if/how this can be done?

first, the settings.ini file:
Code:
[test]
hotkey=^F

and for the script:
Code:
IniRead, Test, settings.ini, test, hotkey

and the hotkey section in the script:
Code:
%Test%::
msgbox, hotkey works!
return

_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 23, 2005 11:18 pm    Post subject: Reply with quote

Code:
[test]
hotkey=^F


Code:
IniRead, Test, settings.ini, test, hotkey
Hotkey, %Test%, label
return

label:
msgbox, Hotkey works!
return


Documentation
Back to top
View user's profile Send private message
Serenity



Joined: 08 Nov 2004
Posts: 896

PostPosted: Wed Feb 23, 2005 11:20 pm    Post subject: Reply with quote

fantastic! thanks jonny. Smile
_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group