Paki Posted March 7, 2006 Share Posted March 7, 2006 Sry for my newb question but i very need this Can i made some ini file or something else to change hotkey? I need it cose i have a lil script where i set hotkey to Backspace. But other people may be want set hotkey to other key without editing script. Can it be done? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 Have you tried to do it yet? $HKValue = IniRead('Path to ini', 'Section', 'key', 'Not Found') HotKeySet('"' & $HKValue & '"', 'FunctionToCall') 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 More sharing options...
Paki Posted March 7, 2006 Author Share Posted March 7, 2006 here what i try $HKValue = IniRead('C:\Temp\myfile.ini', 'Section1', 'key', 'Hotkey') HotKeySet('"' & $HKValue & '"', 'go') While 1 sleep ("10") WEnd Func go() Sleep(100) Send("{F8}") MouseClick("right") Sleep(1250) MouseMove(369,237, 3) MouseClick("left") Sleep(200) Send("p") Sleep(50) MouseMove(108,144, 0) MouseClick("left") EndFunc and this ini file Section1 Key=F10 but it didnt do anything when i push F10. I do something wrong here? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 Your ini should look like: [section] Key={F10}Your section has to have brackets, and curly brackets for the F10 hotkey command. 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 More sharing options...
Paki Posted March 7, 2006 Author Share Posted March 7, 2006 Hmm i change this but it does not want to work $HKValue = IniRead('C:\Temp\myfile.ini', 'Section', 'key', 'Not Found') HotKeySet('"' & $HKValue & '"', 'go') While 1 sleep ("10") WEnd Func go() Sleep(100) Send("{F8}") MouseClick("right") Sleep(1250) MouseMove(369,237, 3) MouseClick("left") Sleep(200) Send("p") Sleep(50) MouseMove(108,144, 0) MouseClick("left") EndFunc I make ini file this path C:\Temp\myfile.ini here it is [section]Key={F10} btw big thanks for help Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 (edited) Just out of curiousity... is your actual ini file in C:\Temp? $HKValue = IniRead('C:\Temp\myfile.ini', 'Section', 'key', 'Not Found') If Not $HKValue <> 'Not Found' Then MsgBox(0, 'Error', 'IniFile is not where you say it is') HotKeySet('"' & $HKValue & '"', 'go') While 1 Sleep(10) WEnd Func go() Sleep(100) Send("{F8}") MouseClick("right") Sleep(1250) MouseClick("left", 369, 237, 1, 3) Sleep(200) Send("p") Sleep(50) MouseClick("left", 108, 144, 1, 1) EndFuncRun this code... Edited March 7, 2006 by SmOke_N 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 More sharing options...
Paki Posted March 7, 2006 Author Share Posted March 7, 2006 may be i am so stupid but i have check it 100 times ini file in the right place but script dont see him..... Link to comment Share on other sites More sharing options...
taurus905 Posted September 14, 2007 Share Posted September 14, 2007 Just out of curiousity... is your actual ini file in C:\Temp? $HKValue = IniRead('C:\Temp\myfile.ini', 'Section', 'key', 'Not Found') If Not $HKValue <> 'Not Found' Then MsgBox(0, 'Error', 'IniFile is not where you say it is') HotKeySet('"' & $HKValue & '"', 'go') While 1 Sleep(10) WEnd Func go() Sleep(100) Send("{F8}") MouseClick("right") Sleep(1250) MouseClick("left", 369, 237, 1, 3) Sleep(200) Send("p") Sleep(50) MouseClick("left", 108, 144, 1, 1) EndFuncRun this code...SmOke_N, Do you have some time to look at this to see if there is something that sticks out at you now as being wrong? I am unable to get it to work, but I like your concept. Thanks. taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 14, 2007 Share Posted September 14, 2007 SmOke_N,Do you have some time to look at this to see if there is something that sticks out at you now as being wrong? I am unable to get it to work, but I like your concept.Thanks.taurus905You're either being funny or you forgot to post/upload what you wanted SmOke_N to look at. Then again there's the forum bug could have messed up your message Link to comment Share on other sites More sharing options...
crash748 Posted September 14, 2007 Share Posted September 14, 2007 Maybe the problems was the ini file use this script to make it DirCreate ( "C:\Temp\" ) Iniwrite('C:\Temp\myfile.ini', 'Section', 'key', '{F10}') Link to comment Share on other sites More sharing options...
BillLuvsU Posted September 14, 2007 Share Posted September 14, 2007 Umm, just a small guess here, but when he edited the INI I think he accidently delited the @CRLF. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
crash748 Posted September 14, 2007 Share Posted September 14, 2007 Umm, just a small guess here, but when he edited the INI I think he accidently delited the @CRLF.That what I think too Link to comment Share on other sites More sharing options...
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