Guest Ajantis Posted June 20, 2004 Posted June 20, 2004 Hi everyone. I have a problem with HotKeySet command. I'd like to make a script which takes a single letter from ini file and then uses this letter with conjuction with alt button to execute a function. And everything is fine except one thing. I don't know how to make HotKeySet to accept data from variable. I mean I'd like to do something like that: HotKeySet ("!" + $key, "function") It's ok, I don't get any error but when I press alt+z for example nothing happenes... I even tried to declare the $key variable manualy but that doesn't seem to help. Could someone give me some advice how to do that? Thx
pekster Posted June 20, 2004 Posted June 20, 2004 If the $key variable contains only a single letter, such as "z", then you can join the strings together with the & operator. Please also note that you should use lower-case letters unless you want to press alt-shift-z. "!z" is not the same as "!Z". To join the strings, you put the & symbol between them. Your end result looks like: HotKeySet("!" & $key, "function") [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
Guest Ajantis Posted June 20, 2004 Posted June 20, 2004 Great! Thanks pekster for fast reply . That is exactly what I was looking for .
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now