13lack13lade Posted September 27, 2013 Posted September 27, 2013 hi guys im trying to automate some things but clickin buttons on chrome... i have had a read through help file but couldnt seem to make it work.. guessing because its Chrome and not IE? Is there a way to ctrl + f to find edit then click it on it (seems like the easiest work around)?? Otherwise am i still able to click a button using the class name? class name is button.gwt-Button.Blue #include <Excel.au3> $oExcel = _ExcelBookOpen("T:\Inzb\Documents\Load Support\Tom\Projects\CPL\editsavelist.xlsx") ;excel book winactive("CPL - Google Chrome") sleep(500) For $i = 1 to 1471 $cityname = _ExcelReadCell($oExcel, $i, 1) $suppname = _ExcelReadCell($oExcel, $i, 2) winactive("CPL - Google Chrome") MouseClick ("Left", 112,187,1,10) Sleep(500) send("{DELETE}") send("{DELETE}") send("{DELETE}") send($cityname) sleep(500) send("{TAB}") sleep(500) send("{DELETE}") send("{DELETE}") send("{DELETE}") send($suppname) sleep(500) Send("{ENTER}") sleep(1000) ControlClick("CPL - Google Chrome","",CLASS:button.gwt-Button.Blue) sleep(1000) mouseclick ("left",968,155,1,10) ;save sleep(2600) mouseclick ("left",167,143,1,10) ;find property Next msgbox(0,"FINISHED","FINISHED")
13lack13lade Posted September 27, 2013 Author Posted September 27, 2013 (edited) i have to use chrome as the website im using doesnt load in anything but chrome so was hoping to find a work around because i was pretty sure i cant use IE functions with chrome etc... thats why my first idea would be to find edit then click it but i have no idea how to do that... I would just keep mouse clicks but the hotel name changes length meaning the edit button changes location. also cant use send tabs because the amount of tabs to send is not always the same... Edited September 27, 2013 by 13lack13lade
JohnOne Posted September 27, 2013 Posted September 27, 2013 ControlClick("CPL - Google Chrome","","[CLASS:button.gwt-Button.Blue]") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Kidney Posted September 27, 2013 Posted September 27, 2013 it would be much easier to do this in IE or FireFox. however, if you have to use chrome, then i would suggest trying imagesearch. it is not the easiest thing to do but it is a work around. you can search for images on the screen like the save button or input boxes and use mouseclick. here is a little thing i put together since i couldnt find the original. hopefully it will help you. ImageSearch.zip
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