kcd-clan Posted March 22, 2006 Share Posted March 22, 2006 I dont know i would think it would work expandcollapse popup$automsg1=IniRead(@ScriptDir&"/setup.ini","Main","automsg1","n") $automsg2=IniRead(@ScriptDir&"/setup.ini","Main","automsg2","n") $automsg3=IniRead(@ScriptDir&"/setup.ini","Main","automsg3","n") $automsg4=IniRead(@ScriptDir&"/setup.ini","Main","automsg4","n") $automsg5=IniRead(@ScriptDir&"/setup.ini","Main","automsg5","n") $automsg6=IniRead(@ScriptDir&"/setup.ini","Main","automsg6","n") $automsg7=IniRead(@ScriptDir&"/setup.ini","Main","automsg7","n") $automsg8=IniRead(@ScriptDir&"/setup.ini","Main","automsg8","n") $automsg9=IniRead(@ScriptDir&"/setup.ini","Main","automsg9","n") Dim $i HotKeySet("{NUMPAD1}","automsg1") HotKeySet("{NUMPAD2}","automsg2") HotKeySet("{NUMPAD3}","automsg3") HotKeySet("{NUMPAD4}","automsg4") HotKeySet("{NUMPAD5}","automsg5") HotKeySet("{NUMPAD6}","automsg6") HotKeySet("{NUMPAD7}","automsg7") HotKeySet("{NUMPAD8}","automsg8") HotKeySet("{NUMPAD9}","automsg9") Func automsg1() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg1,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg2() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg2,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg3() Send("{ENTER}") Sleep(700) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg3,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg4() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg4,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg5() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg5,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg6() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg6,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg7() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg7,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg8() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg8,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Func automsg9() Send("{ENTER}") Sleep(500) $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg9,"n") Send($msg) Sleep(500) Send("{ENTER}") EndFunc Do Until $i=1 Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone() Link to comment Share on other sites More sharing options...
MHz Posted March 22, 2006 Share Posted March 22, 2006 Not sure exactly what your intensions are with the script to assume of it's success, but you may need to add a Sleep(100) into your loop to save some CPU cycles. Link to comment Share on other sites More sharing options...
kcd-clan Posted March 22, 2006 Author Share Posted March 22, 2006 All triggers = = n so its not reading corret or somthing. Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone() Link to comment Share on other sites More sharing options...
MHz Posted March 22, 2006 Share Posted March 22, 2006 $msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg9,"n") to $msg=IniRead(@ScriptDir&"/setup.ini","Main", "automsg9","n") Link to comment Share on other sites More sharing options...
EFF Posted March 22, 2006 Share Posted March 22, 2006 Have You ever heard of loops? Use IniReadSection ( "filename", "section" ) instead of first 9 lines of Your code. Next: for $i = 1 To 9 HotKeySet("{NUMPAD" &$i& "}","automsg" &$i& ") next I don`t know if functions can be decalred inside loop with variables used in their names, but you can try it Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 22, 2006 Moderators Share Posted March 22, 2006 Actually I might suggest changing:$msg=IniRead(@ScriptDir&"/setup.ini","Main",$automsg9,"n")To$msg=IniRead(@ScriptDir&"\setup.ini","Main",$automsg9,"n")in all of the script above, they are all like that. 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...
jvanegmond Posted March 22, 2006 Share Posted March 22, 2006 Isn't it supposed to write in stead of read something and then return that ones value in that case you should use: IniWrite(blablabla) HotkeySet you know Func you know Iniread etc. EndFunc Sorry i'm lazy github.com/jvanegmond 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