Jump to content

Controlsend text


Recommended Posts

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?

Link to comment
Share on other sites

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 command

ControlSend ( "title", "text", controlID, $text)

 

Hope this will be useful for you..
 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...