Jump to content
Sign in to follow this  

controlsend variable?

Recommended Posts


Ok guys, you have been more help than i can express, however i have one last question. I am almost done with my script and i am ahaving a problem with the last section.

here is my code for this section...

$file = FileOpen("temp.txt", 0)

; Check if file opened for reading OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")



; Read in lines of text until the EOF is reached

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

MsgBox(0, "Line read:", $line)

ControlSendPlus("DirectBuy Temp Code - Message - Microsoft Word", "", "_WwG1", "$line",1 )



So the code is reading a value from the text file...saving it to a variable..then ouputing it to a message box, then I am trying to send it to an edit box in an email that is already open...earlier in the script i am succesfully writing to the email fields with the controlsend key, so i know it is not the classname i am using, i am just not sending the variable correctly..or is it noteven possible to send a variable with control send?

If not could you suggest an alternate way?

Thanks guys

Share this post

Link to post
Share on other sites

You seem to be sending the literal text "$line" to the control, as opposed to the actual contents of the $line variable. Removing the quotes around the offending parameter would fix that right up.

Share this post

Link to post
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
Sign in to follow this