ecstatic Posted April 13, 2009 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.
Developers Jos Posted April 13, 2009 Developers 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.
ecstatic Posted April 13, 2009 Author 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}"))
Developers Jos Posted April 13, 2009 Developers 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.
DaRam Posted April 13, 2009 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}"))
ecstatic Posted April 13, 2009 Author Posted April 13, 2009 Jos, now it does this $cta = {f1} Send($Cta1) = Send({f1}) and not Send("{F1}")
Developers Jos Posted April 13, 2009 Developers 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.
Developers Jos Posted April 13, 2009 Developers 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.
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