Caravelle 0 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 Share this post Link to post Share on other sites
qazwsx 0 Posted August 31, 2007 Right now you have the count inside "". Try removing the quotes. Share this post Link to post Share on other sites
Caravelle 0 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 Share this post Link to post Share on other sites
Caravelle 0 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 Share this post Link to post Share on other sites