Wingens Posted July 16, 2015 Posted July 16, 2015 Hi,i am creating a hotkey script for my work.Now i am hitting a wall, i have to be able to send a line of text using a combination of keys.The problem i have is not in the combination but in the line of text i am trying to send.What i am trying to send contains the symbol: !Everytime i use my script it does send my line of text until it needs to send the !First i tried: ControlSend("", "", "", "svm{$}8{4}{!}", 0)ControlSend("", "", "", "{enter}")Right now i changed the code to read the line of text from a ini file but still the problem.Maybe someone has any ideas?
Developers Jos Posted July 16, 2015 Developers Posted July 16, 2015 Have you tried sending them in RAW mode?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.
Shoby Posted July 16, 2015 Posted July 16, 2015 Hello Wingens,If you state your issue briefly, We can try to help you out.. You have problems to read from .ini file ?
Wingens Posted July 16, 2015 Author Posted July 16, 2015 Tried the raw mode did not solve my problem.I have no problem with reading the ini file but it sends:svm$84it loses the: ! at the end.
Shoby Posted July 16, 2015 Posted July 16, 2015 Wingens,Create a ini file with Section name and Key-value format.For example [Text]Word= "The word that you want to send to ur script"Then in your script,Assign any variable to retrieve the text from .ini file like,$text = IniRead (@ScriptDir & "\.ini", "Text", "Word","")Then send this $text value to ur controlsend commandControlSend ( "title", "text", controlID, $text) Hope this will be useful for you..
Wingens Posted July 16, 2015 Author Posted July 16, 2015 My code right now is like that:$var = IniRead(@ScriptDir & "\pass.ini", "names", "pass", "") ControlSend("", "", "", $VAR)
Shoby Posted July 16, 2015 Posted July 16, 2015 Wingens, Try this..Controlsend("Untitled - Notepad","","[CLASS:Edit; INSTANCE:1]","svm{$}{8}{4}+{1}")Its working for me here..
Wingens Posted July 16, 2015 Author Posted July 16, 2015 it does send it in a notepad or notepad ++,but in IE it sends it differently:svM$8$!Somehow it chages...
Zobengrauzis Posted July 16, 2015 Posted July 16, 2015 if its IE, why no go with IE functions (_IEAttach, _IEFormElementSetValue etc).They are more realible for tasks in thee
Wingens Posted July 16, 2015 Author Posted July 16, 2015 Need to read into that, don't know how that works yet...
Wingens Posted July 17, 2015 Author Posted July 17, 2015 The last one worked changed it a bit to between every character a sleep(50) because don't know why but some times it changes the characters is sends... thx The last one worked changed it a bit to between every character a sleep(50) because don't know why but some times it changes the characters is sends... thx
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