Vectortech Posted December 13, 2011 Share Posted December 13, 2011 I need help modifying a current script that I use. I now have to add a function to click or select a input box. I can't have the script just "enter" through to the box any longer. The box actually has to be clicked on with a mouse click.#include<array.au3> ;included for _Arraydisplay#include<excel.au3>$path = @DesktopDir & '\cyclecount.xls' ;@Desktopdir replaces "C:\Documents and Settings\Purchasing\Desktop"$oExcel = _ExcelBookOpen($path,0)$aExcel = _ExcelReadSheetToArray($oExcel);_ArrayDisplay($aExcel)_ExcelBookClose($oExcel)WinActivate("[CLASS:DEJAWINT]", "")For $iRow = 1 To $aExcel[0][0] ;$iRow will be incremented untill the last column is reachedControlSend("[CLASS:DEJAWINT]", "", "", $aExcel[$iRow][1])ControlSend("[CLASS:DEJAWINT]", "", "", "{Enter}")ControlSend("[CLASS:DEJAWINT]", "", "", "{1}") ; The next line needs to change to an actual click on the input box nowControlSend("[CLASS:DEJAWINT]", "", "", "{Enter}")ControlSend("[CLASS:DEJAWINT]", "", "", $aExcel[$iRow][2])ControlSend("[CLASS:DEJAWINT]", "", "", "{Enter 4}")NextThanks in advanceVectortech Link to comment Share on other sites More sharing options...
martin Posted December 13, 2011 Share Posted December 13, 2011 (edited) It's not clear to me what the input box is you want to click, but have you tried ControlClick? Edited December 13, 2011 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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