RadovanJ Posted March 14, 2008 Posted March 14, 2008 Hi, is it possible to use variable ($title=My window) in title advanced description ("[TITLE:My Window;") in this example ? Example: WinWait("[TITLE:My Window; CLASS:My Class]", "") Thanks R.Jencik
Tzackel Posted March 14, 2008 Posted March 14, 2008 WinWait("[TITLE:" & $title & "; CLASS:My Class]", ""); like this?
RadovanJ Posted March 14, 2008 Author Posted March 14, 2008 I do not know exactly what does this syntax mean: " & $title & " but if strings & allows use variable in this code, then YES. Thanks R.Jencik
Tzackel Posted March 14, 2008 Posted March 14, 2008 "&" is the operator to join strings $var="My "; $var1="Window"; $win="[TITLE:" & $var & $var1 & "]"; = "[TITLE:My Window]"
RadovanJ Posted March 14, 2008 Author Posted March 14, 2008 I am sorry, but when "&" is the operator to join strings, why must i use this, also when a i have single word title ?For example:MyWindow without spaceI do not want join variables. I have only one variable.WinWait("[TITLE:" & $title & "; CLASS:My Class]", "");Thank you very much for explanation.R. Jencik
MHz Posted March 14, 2008 Posted March 14, 2008 (edited) I do not want join variables. I have only one variable. WinWait("[TITLE:" & $title & "; CLASS:My Class]", "");You are correct. Tzackel broke it down a little too much which may have confused you. I am sure that Tzackel did not mean to confuse you. You can even skip the 2nd parameter (text parameter) as is optional. Edit: For learrning about the operator "&" An example of joining variables, strings, numbers... but is not a concern for your above issue $variable = 'variable part' $answer = 'this is a string ' & 'and' & ' this is a ' & $variable & ' number ' & 10 MsgBox(0, '', $answer) Easy once you get used to the language but learn at your own speed. Edited March 14, 2008 by MHz
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