-k-
If I do this:
Code:
Break On Cls
Run("Notepad.exe")
Sleep(1)
$dum = SetFocus("Untitled – Notepad")
$text = "asdf","asdfa","asdfasdf","adfasfd"
$scr = "Untitled – Notepad"
$dum = Send($text, $scr)
Function Send($Input,$I)
Dim $, $Checkstring
$dum = SetFocus($I)
;Sendkeys("config t {enter}")
For each $ in $Input
;$test = CheckString($)
$dum = SetFocus($I)
$dum = SendKeys($+"{ENTER}")
Next
EndFunction
Function CheckString ($letters)
Dim $a, $i, $s
$a = ""
For $i= 1 to Len($letters)
$a = Substr($letters, $i, 1)
Select
Case $a = "+"
$a = "{+}"
Case $a = "^"
$a = "{^}"
Case $a = "~"
$a = "{~}"
Case $a = "("
$a = "{(}"
Case $a = ")"
$a = "{)}"
Case $a = "{"
$a = "{{}"
Case $a = "}"
$a = "{}}"
EndSelect
$s = $s+$a
Next
$checkstring = $s
EndFunction
with version 4.51 I get:
Code:
asdf
asdfa
asdfasdf
adfasfd
in notepad
with v4.52 i get:
Code:
asdfEasdfaEasdfasdfEadfasfdE
so there's something broken...
for you, this:
CheckString($)
echos the result of checkstring to the console. You want:
$test = checkstring($)
sendkeys($test)
or
sendkeys(checkstring($))
(which is golf code
)