Sign in to follow this  
Followers 0
aria

sending variable value to a control

4 posts in this topic

#1 ·  Posted (edited)

I am trying to send the value of a variable to a control (input box in a window) from a function call. The function "send" does not work because it wont substitute the variable with its value. (it directly writes the name of the variable into the input control!)

eg.

;in main

$x = 56.4637 ; this is a parameter to a function call

;inside function called from main

Send ("$x") ;does not work!!

Send("eval($x)") ; does not work either!

And I cant use the controlSetText function either because the control cant be identified uniquely. (and I am guessing the same problem as above would exist)

Finally, the environment variable wont work either because it does not accept a variable as its value.

I havent used the beta version of autoit as yet, and I am not familiar with windows concepts like COM, etc. So I would appreciate some help.

Please reply!

~cheers,

:whistle:

Edited by aria

Share this post


Link to post
Share on other sites



Is this another applications Input Box? AutoInfo gives you no information on it?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

send ($x) <<<< this works! I am such an idiot, I figured it would give me a syntax error and so I didnt try it.

@SmOke_N

>Is this another applications Input Box? AutoInfo gives you no

>information on it?

Yep, it is the "proxy info" window when you press edit on the 'switch proxy' toolbar in firefox. Autoinfo cant help me to work with all the controls inside it(especially the port input boxes, because there are multiple instances of them) ? If it did, then I would not have to rely on other ways. Also I was not sure whether the function 'controlSend' would accept a variable as a value rather than a hard coded text. But I guess it must accept it similar to the Send function as pointed out by gafrost.

Thanks to all of you for helping me!

:whistle:

Edited by aria

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  
Followers 0