FrancescoDiMuro Posted July 16, 2018 Share Posted July 16, 2018 1 minute ago, milkmoron said: Is the ID search-text? Yes Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 WinActivate ( "Customer Center - Google Chrome" ) ControlSend ( "Customer Center - Google Chrome", "", "search-text", "CLIENT NAME" ) This is what is I'm running but I cant get it to send the text Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 16, 2018 Share Posted July 16, 2018 @milkmoron To automate things in a browser, I told you that you should use others UDFs, like IE UDF, Chrome UDF, FireFox UDF... Best Regards. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 22 minutes ago, FrancescoDiMuro said: @milkmoron To automate things in a browser, I told you that you should use others UDFs, like IE UDF, Chrome UDF, FireFox UDF... Best Regards. Okay thanks I thought you meant it was optional. Link to comment Share on other sites More sharing options...
AutoBert Posted July 16, 2018 Share Posted July 16, 2018 43 minutes ago, milkmoron said: How do i find the controlid of a search field in a chrome browser? For browser you need a other form of automation: https://www.autoitscript.com/wiki/User_Defined_Functions#Browsers Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 3 hours ago, FrancescoDiMuro said: @milkmoron To automate things in a browser, I told you that you should use others UDFs, like IE UDF, Chrome UDF, FireFox UDF... Best Regards. I can't get the Chrome UDF to do anything but open a chrome browser. It doesn't work to insert text. I tried all the instructions to install. Even the example script does not fill things in any ideas? I tried IUI also but it seems too complicated. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 16, 2018 Share Posted July 16, 2018 @milkmoron Can you please provide the webpage you are trying to automate? Explain as much as you can what are you trying to do, and post the code you are working with Best Regards. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 2 minutes ago, FrancescoDiMuro said: @milkmoron Can you please provide the webpage you are trying to automate? Explain as much as you can what are you trying to do, and post the code you are working with Best Regards. Just the example script. http://www.december.com/html/demo/form.html expandcollapse popup#Include <Array.au3> #Include <Chrome.au3> ; Close any existing Chrome browser ; Start Chrome with the URL "http://www.december.com/html/demo/form.html" _ChromeStartup("http://www.december.com/html/demo/form.html") ; Wait for the page with the document title of "HTML Form Example" _ChromeDocWaitForExistenceByTitle("HTML Form Example", 10) ; Set the value of the field labelled "Your age:" to "8" _ChromeObjSetValueByName("user-age", "8") ; Select the radio button labelled "Female" _ChromeInputSetCheckedByName("user-gender", true, 1) ; Check the checkbox labelled "Marc Andreessen" _ChromeInputSetCheckedByName("knows-marc", true, 0) ; Select the option with the text "Lynx" _ChromeOptionSelectWithTextByObjName("Lynx", "favorite-web-browser") ; Select the option with the value of "daring" (Cherry Garcia) _ChromeOptionSelectWithValueByObjName("daring", "tried-ice-cream") ; Set the value of the field labelled "Guess the secret password:" to "password" _ChromeObjSetValueByName("password-guess", "password") ; Select the radio button labelled "Yes" _ChromeInputSetCheckedWithValueByName("Yes", "nickname", true) ; Set the value of the field labelled "it is:" to "fred" _ChromeObjSetValueByName("user-nickname", "fred") ; Click the button labelled "Send this survey" _ChromeInputClickByType("submit") ; Wait for the page with the document title of "Thank You" _ChromeDocWaitForExistenceByTitle("Thank You", 10) Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 16, 2018 Share Posted July 16, 2018 On 12/7/2018 at 1:15 AM, milkmoron said: Thanks I'll try it out Im trying to search business and client names from a single column and paste it into the search bar of the online web system. After that I want to copy text fields from the other agencies system into our system. Can you please provide the source code of this page ( at least, the controls you are trying to automate ) Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 7 minutes ago, FrancescoDiMuro said: Can you please provide the source code of this page ( at least, the controls you are trying to automate ) Sent in a PM. Is the ChromeUDP up to date? Alot of the people in the thread said it no longer works. Link to comment Share on other sites More sharing options...
milkmoron Posted July 16, 2018 Author Share Posted July 16, 2018 (edited) So I got the script to login and search a static customer name. After Searching I want to click into the customer which is a link to open a application on the desktop. how can I do this _IEAction($oAMSClientSearch, "click") doesn't bring anything up. Actually Scratch that It Opens a new webpage and then you click into the policy which brings up the application. Still can't get it to work though. Edit: Got it to open with a static link using _IELinkClickByText. Edited July 16, 2018 by milkmoron Link to comment Share on other sites More sharing options...
milkmoron Posted July 17, 2018 Author Share Posted July 17, 2018 (edited) I'm trying to click into a link but I can't find the id by using inspect element. I also tried simplespy. The link seems to be generated by javascript code. Is there a way to define these and then click them? Edited July 17, 2018 by milkmoron Link to comment Share on other sites More sharing options...
milkmoron Posted July 17, 2018 Author Share Posted July 17, 2018 #include <Excel.au3> #include <Array.au3> #include <IE.au3> ControlFocus ( "View Activity", "", "") Local $oViewActivity = ControlGetFocus ( "View Activity" ) Global $oName1 = ControlGetHandle ( $oViewActivity, "", "Name" ) Local $sText = ControlGetText($oName1, "", "") ;ControlFocus ("[REGEXPTITLE:(?i)(Activity.*)]", "", "" ) MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $oName) ;ControlFocus ( "Activity / Suspense", "", "") WinActivate ( "Activity / Suspense" ) Local $oActivitySuspense = ControlGetFocus ( "Activity / Suspense" ) ;ControlSetText ( "$oActivitySuspense", "", "Description:", "Test" ) ControlSend ( "$oActivitySuspense", "", "Description:", "string" ) MsgBox ( 0, "Worked", "It Worked" ) Trying to copy paste text fields in a application. Do I need to use a UDF? I think I have it setup correctly Link to comment Share on other sites More sharing options...
milkmoron Posted July 17, 2018 Author Share Posted July 17, 2018 (edited) So I'm using IUIAutomation and I'm not sure if I'm doing this correctly but heres my code to select the description text area. Store the value for later and send it to another text area. #include "UIAWrappers.au3" ControlFocus ( "View Activity", "", "") Local $oViewActivity = ControlGetFocus ( "View Activity" ) _UIA_SETVAR("Description","classname:=WindowsForms10.EDIT.app.0.30495d1_r9_ad118") Local $oPolicy = _UIA_Action("Description","getvalue") MsgBox($MB_SYSTEMMODAL, "", "The text in Name1 is: " & $oPolicy) ControlFocus ( "Activity / Suspense", "", "") WinActivate ( "Activity / Suspense" ) _UIA_SETVAR("FIADescription","title:=Description:") ;_UIA_SETVAR("FIADescription","classname:=WindowsForms10.EDIT.app.0.30495d1_r9_ad14 _UIA_Action("FIADescription","sendkeys", $oPolicy) It pauses during Local $oPolicy = _UIA_Action("Description","getvalue") Edited July 17, 2018 by milkmoron 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