ecstatic Posted April 13, 2009 Share Posted April 13, 2009 Hey guys. $Cta1 = F1 $Cta2 = F2 Send($Cta1) Sleep(500) MouseDown("Right") MouseUp("Right") Sleep(500) Send($cta2) I need my script to send("{F1}") as a key down not as keys "f1" but i also need it to be f-key customizable. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2009 Developers Share Posted April 13, 2009 $Cta1 = "{F1}" $Cta2 = "{F2}" SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ecstatic Posted April 13, 2009 Author Share Posted April 13, 2009 The problem with that is IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead($Cta1)) IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead($Cta2)) Is from my configuration GuI. So they type in their Function key. Then the bot reads it from the ini. It wont work if i do IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead("{$Cta1}")) IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead("{$Cta2}")) Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2009 Developers Share Posted April 13, 2009 (edited) IniWrite("Config.ini", "Skills", "Cta1", "{" & GUICtrlRead($Cta1) & "}") Edited April 13, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DaRam Posted April 13, 2009 Share Posted April 13, 2009 GUICtrlRead requires a GUI Control handle/name as the parameter, so of course it won't work: IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead("{$Cta1}")) IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead("{$Cta2}")) Link to comment Share on other sites More sharing options...
ecstatic Posted April 13, 2009 Author Share Posted April 13, 2009 Jos, now it does this $cta = {f1} Send($Cta1) = Send({f1}) and not Send("{F1}") Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2009 Developers Share Posted April 13, 2009 I assume you do something like: $cta = IniRead("Config.ini", "Skills", "Cta1", "") Send($Cta) Doesn't that work? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ecstatic Posted April 13, 2009 Author Share Posted April 13, 2009 lemme try. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2009 Developers Share Posted April 13, 2009 This works fine for me when run from SciTE: Iniwrite("Config.ini", "Skills", "Cta1", "{f1}") $cta = IniRead("Config.ini", "Skills", "Cta1", "") Send($Cta) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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