Caravelle Posted August 31, 2007 Share Posted August 31, 2007 Can anyone please tell me why this snippet of code does nothing? (no errors are reported). I am trying to send a blank to each of the 6 Input boxes in my AutoIt GUI application, in order to clear them. I know I could achieve this by GUICtrlSetData("name", "") for each instance but because this is something I shall need a lot in many proglets, I plan to turn it into a UDF which clears all the inputs and/or edit boxes in the current window without knowing in advance what their ControlIDs are. For $Count = 1 to 6 ControlSend("", "", "[CLASS:Edit; INSTANCE:" & $Count & "]", "") Next Thanks. Caravelle Link to comment Share on other sites More sharing options...
qazwsx Posted August 31, 2007 Share Posted August 31, 2007 Right now you have the count inside "". Try removing the quotes. Link to comment Share on other sites More sharing options...
Caravelle Posted August 31, 2007 Author Share Posted August 31, 2007 I thought I had found the error, I was trying to concatenate a number into my string. However, it still does nothing when $Count is converted to a string.. For $Count = 1 to 6 ControlSend("", "", "[CLASS:Edit; INSTANCE:" & String($Count) & "]", "") Next Caravelle Can anyone please tell me why this snippet of code does nothing? (no errors are reported). I am trying to send a blank to each of the 6 Input boxes in my AutoIt GUI application, in order to clear them. I know I could achieve this by GUICtrlSetData("name", "") for each instance but because this is something I shall need a lot in many proglets, I plan to turn it into a UDF which clears all the inputs and/or edit boxes in the current window without knowing in advance what their ControlIDs are. For $Count = 1 to 6 ControlSend("", "", "[CLASS:Edit; INSTANCE:" & $Count & "]", "") Next Thanks. Caravelle Link to comment Share on other sites More sharing options...
Caravelle Posted August 31, 2007 Author Share Posted August 31, 2007 Right now you have the count inside "". Try removing the quotes.Thanks, but I can't agree with you there. $Count is between an end quote and a start quote , not the other way around. It's definitely outside quotes.Are you saying that the concatenation operator & and the items it concatenates don't have to be outside the quotation marks surrounding the string? Caravelle Link to comment Share on other sites More sharing options...
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