Jump to content
Sign in to follow this  
zxc3

Check the text changes in the Сhrome window.

Recommended Posts

Are there any examples of a script for Сhrome that allows you to check whether the information in the browser window has changed with a certain periodicity and signal this for 32-bit Windows.

Share this post


Link to post
Share on other sites

Do a 'Chrome' search on this site...specifically in the example scripts forum...plenty of UDFs devoted to just that.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
6 hours ago, jdelaney said:

Do a 'Chrome' search on this site...specifically in the example scripts forum...plenty of UDFs devoted to just that.

Thanks for your reply. But I do not want to install an extension for Chrome. Are there any other options?

Share this post


Link to post
Share on other sites

Use Internet Explorer.  Or, copy the whole page, and do a regexp to find your text change. 

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
5 hours ago, zxc3 said:

Thanks for your reply. But I do not want to install an extension for Chrome. Are there any other options?

See FAQ 31, particularly IUIAutomation here

 

That is your recourse, or what @jdelaney said

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
1 hour ago, jdelaney said:

Use Internet Explorer.  Or, copy the whole page, and do a regexp to find your text change. 

Thank you, it's interesting. And in more detail, how to do it. Only for Сhrome.

Share this post


Link to post
Share on other sites

so you are telling me you have not even google searched it before asking? 

google this "copy source of webpage in autoit"

i just tested a solution and it read my source from chrome. check it, from an old post, this will retrieve just the text, not the source, which is what I THINK you want, I am probably wrong

ConsoleWrite(_INetGetText('https://www.autoitscript.com/forum/') & @LF)

Func _INetGetText($sURL)
    Local $bStr = InetRead($sURL, 19)
    If @error Then
        Return SetError(1, 0, 0)
    EndIf

    Local $oHTML = ObjCreate("HTMLFILE")
    If @error Then Return SetError(2, 0, 0)

    $oHTML.Open()
    $oHTML.Write(BinaryToString($bStr))

    ; $oHTML....

    Return SetError(0, 0, $oHTML.Body.InnerText)
EndFunc ;==>_INetGetText

running that on the forum page I get this output

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
Jump to content 



 
Existing user? Sign In   
  
Sign In



 
 
  
Remember me Not recommended on shared computers 
  
Sign in anonymously 

Sign In 

Forgot your password? 
Or sign in with one of these services


Sign in with Facebook 
Sign in with Microsoft 
Sign Up 
All Content  
All Content 




Advanced Search 
 
Browse 
Forums 
Downloads 
Guides 
Calendar 
Forum Rules 
More 
Wiki 
AutoIt Resources 
Release 
Installer 
Help file 
Editor 
Beta 
Installer 
Help file 
Editor 
Git 
More 
More 
All Activity 
Home 

Forums
General 
Announcements and Site News 
AutoIt releases and site announcements.
310 
posts 
 
AutoIt v3.3.14.3 Released 
By Jon 
6 hours ago 
Chat 
General chat for Active Members. Not accessible to guests or search engines.
172,478 
posts 
 
By AZJIO 
1 hour ago 
Administration 
User Moderation 
364 
posts 
 
Nikolas92 
By Melba23 
November 26, 2017 
AutoIt v3 
AutoIt Help and Support 
AutoIt General Help and Support 
AutoIt GUI Help and Support 
AutoItX Help and Support 
Old AutoIt v2 Help and Support 
Help and support for AutoIt. 
881,739 
posts 
 
Check the text changes in … 
By Earthshine 
10 minutes ago 
AutoIt Technical Discussion 
AutoIt Projects and Collaboration 
Technical discussions, betas, editors, help file, add-on tools, etc.
34,436 
posts 
 
is the new version of auto… 
By Melba23 
5 hours ago 
AutoIt Example Scripts 
Share your cool AutoIt scripts, UDFs and applications with others. 
158,076 
posts 
 
LCD Countdown Timer 
By Gattaca 
1 hour ago 
Scripting and Development 
Developer General Discussion 
General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. 
3,066 
posts 
 
what is a GUI you think of… 
By rcmaehl 
18 hours ago 
Language Specific Discussion 
PowerShell 
C# / .NET 
C++ / C / Win32 
VBScript 
JavaScript 
SQL 
Misc 
Common IT Admin-related languages have their own forums. Feel free to post about any other language in the Misc forum.
2,538 
posts 
 
Coded UI projects rule 
By Earthshine 
Tuesday at 04:23 PM 
IT Administration 
Operating System Deployment 
Microsoft Deployment Toolkit 
System Center Configuration Manager 
OS deployment and related technologies.
93 
posts 
 
Windows Pocess Database 
By satanico64 
January 15 
Windows Client 
Windows client and related technologies (Windows 10, 8, 7, XP, VDI, App-V, etc).
548 
posts 
 
Is that a Browser or Serve… 
By JLogan3o13 
December 20, 2017 
Windows Server 
Windows Server and related technologies (AD, Group Policy, etc).
76 
posts 
 
connect to new wifi networ… 
By JLogan3o13 
January 18 
Office 
Microsoft Office and related technologies (Office ProPlus, 365, deployment, etc).
243 
posts 
 
How To Make More Money As … 
By JLogan3o13 
January 12 
Who's Online   56 Members, 4 Anonymous, 932 Guests (See full list) 
AdamUL 
BrewManNH 
water 
Earthshine 
zaraijamel 
Melba23 
argumentum 
abdulrahmanok 
KiloLima 
krista611 
c.haslam 
SchneiMi 
Jasp402 
monter 
jordanrenault 
Moonscarlet 
smartkey 
Zedna 
WB123 
maniootek 
KarlosTHG 
JuanFelipe 
ChrisL 
funkey 
jpm 
Jfish 
rcmaehl 
mohanad4egy 
Ganreizu 
Autom8 
Pretend2Script 
gonzo070777 
Gattaca 
kalucas 
Wolfteeth 
Danp2 
qwert 
xHappyEnding 
genius257 
Corleone221 
TheSlig 
000000000 
ViciousXUSMC 
BrunoJ 
youtuber 
zxc3 
cbs803 
milos83 
jchd 
Danyfirex 
Bert 
Juvigy 
NguyenLe 
weirddave 
MLPerez007 
ArC 
General Statistics
169,270
Total Topics 
1,287,880
Total Posts 
72,851
Total Members 
4,882
Most Online 
 
Newest Member
tonycnx
Joined 02/02/2018 12:33 PM 
 
Popular Now
 
7
Browse a Intenet Webpage in a hidden mode 
By jordanrenault
Started 7 hours ago 
Latest Topic Updates
 
6
Check the text changes in the Сhrome window. 
By zxc3
Started 23 hours ago 
 
14
_ArraySort lacks ability to compare case-sensitively 
By c.haslam
Started 20 hours ago 
 
7
Browse a Intenet Webpage in a hidden mode 
By jordanrenault
Started 7 hours ago 
 
4
GUICtrlCreateTabItem("") Not working? 
By rcmaehl
Started 19 hours ago 
 
5
LCD Countdown Timer 
By timmy2
Started October 29, 2013 
Latest Files Updates
 
AD - Active Directory UDF
By water






   6941   5 
 
cDebug.au3
By c.haslam






   52   0 
 
OutlookEX
By water






   3289   0 
 
Beats Player
By careca






   1588   0 
 
UninstallByShortcut
By careca






   22   0 
All Activity 
Home 
Theme 
AutoIt (Default) 
AutoIt (Round Avatars) 
AutoIt (Forced Desktop View) 
AutoIt (Dark) 
Privacy Policy 
Contact Us 
Community Software by Invision Power Services, Inc. 
× 
Existing user? Sign In 
Sign Up 
Browse
Back 
Browse 
Forums 
Downloads 
Guides 
Calendar 
Forum Rules 
Wiki 
AutoIt Resources
Back 
Release
Back 
Installer 
Help file 
Editor 
Beta
Back 
Installer 
Help file 
Editor 
Git 
+>10:52:05 AutoIt3.exe ended.rc:0
+>10:52:05 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.091

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
On 02.02.2018 at 6:41 PM, Earthshine said:

so you are telling me you have not even google searched it before asking? 

google this "copy source of webpage in autoit"

i just tested a solution and it read my source from chrome. check it, from an old post, this will retrieve just the text, not the source, which is what I THINK you want, I am probably wrong

ConsoleWrite(_INetGetText('https://www.autoitscript.com/forum/') & @LF)

Func _INetGetText($sURL)
    Local $bStr = InetRead($sURL, 19)
    If @error Then
        Return SetError(1, 0, 0)
    EndIf

    Local $oHTML = ObjCreate("HTMLFILE")
    If @error Then Return SetError(2, 0, 0)

    $oHTML.Open()
    $oHTML.Write(BinaryToString($bStr))

    ; $oHTML....

    Return SetError(0, 0, $oHTML.Body.InnerText)
EndFunc ;==>_INetGetText

running that on the forum page I get this output

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
Jump to content 



 
Existing user? Sign In   
  
Sign In



 
 
  
Remember me Not recommended on shared computers 
  
Sign in anonymously 

Sign In 

Forgot your password? 
Or sign in with one of these services


Sign in with Facebook 
Sign in with Microsoft 
Sign Up 
All Content  
All Content 




Advanced Search 
 
Browse 
Forums 
Downloads 
Guides 
Calendar 
Forum Rules 
More 
Wiki 
AutoIt Resources 
Release 
Installer 
Help file 
Editor 
Beta 
Installer 
Help file 
Editor 
Git 
More 
More 
All Activity 
Home 

Forums
General 
Announcements and Site News 
AutoIt releases and site announcements.
310 
posts 
 
AutoIt v3.3.14.3 Released 
By Jon 
6 hours ago 
Chat 
General chat for Active Members. Not accessible to guests or search engines.
172,478 
posts 
 
By AZJIO 
1 hour ago 
Administration 
User Moderation 
364 
posts 
 
Nikolas92 
By Melba23 
November 26, 2017 
AutoIt v3 
AutoIt Help and Support 
AutoIt General Help and Support 
AutoIt GUI Help and Support 
AutoItX Help and Support 
Old AutoIt v2 Help and Support 
Help and support for AutoIt. 
881,739 
posts 
 
Check the text changes in … 
By Earthshine 
10 minutes ago 
AutoIt Technical Discussion 
AutoIt Projects and Collaboration 
Technical discussions, betas, editors, help file, add-on tools, etc.
34,436 
posts 
 
is the new version of auto… 
By Melba23 
5 hours ago 
AutoIt Example Scripts 
Share your cool AutoIt scripts, UDFs and applications with others. 
158,076 
posts 
 
LCD Countdown Timer 
By Gattaca 
1 hour ago 
Scripting and Development 
Developer General Discussion 
General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. 
3,066 
posts 
 
what is a GUI you think of… 
By rcmaehl 
18 hours ago 
Language Specific Discussion 
PowerShell 
C# / .NET 
C++ / C / Win32 
VBScript 
JavaScript 
SQL 
Misc 
Common IT Admin-related languages have their own forums. Feel free to post about any other language in the Misc forum.
2,538 
posts 
 
Coded UI projects rule 
By Earthshine 
Tuesday at 04:23 PM 
IT Administration 
Operating System Deployment 
Microsoft Deployment Toolkit 
System Center Configuration Manager 
OS deployment and related technologies.
93 
posts 
 
Windows Pocess Database 
By satanico64 
January 15 
Windows Client 
Windows client and related technologies (Windows 10, 8, 7, XP, VDI, App-V, etc).
548 
posts 
 
Is that a Browser or Serve… 
By JLogan3o13 
December 20, 2017 
Windows Server 
Windows Server and related technologies (AD, Group Policy, etc).
76 
posts 
 
connect to new wifi networ… 
By JLogan3o13 
January 18 
Office 
Microsoft Office and related technologies (Office ProPlus, 365, deployment, etc).
243 
posts 
 
How To Make More Money As … 
By JLogan3o13 
January 12 
Who's Online   56 Members, 4 Anonymous, 932 Guests (See full list) 
AdamUL 
BrewManNH 
water 
Earthshine 
zaraijamel 
Melba23 
argumentum 
abdulrahmanok 
KiloLima 
krista611 
c.haslam 
SchneiMi 
Jasp402 
monter 
jordanrenault 
Moonscarlet 
smartkey 
Zedna 
WB123 
maniootek 
KarlosTHG 
JuanFelipe 
ChrisL 
funkey 
jpm 
Jfish 
rcmaehl 
mohanad4egy 
Ganreizu 
Autom8 
Pretend2Script 
gonzo070777 
Gattaca 
kalucas 
Wolfteeth 
Danp2 
qwert 
xHappyEnding 
genius257 
Corleone221 
TheSlig 
000000000 
ViciousXUSMC 
BrunoJ 
youtuber 
zxc3 
cbs803 
milos83 
jchd 
Danyfirex 
Bert 
Juvigy 
NguyenLe 
weirddave 
MLPerez007 
ArC 
General Statistics
169,270
Total Topics 
1,287,880
Total Posts 
72,851
Total Members 
4,882
Most Online 
 
Newest Member
tonycnx
Joined 02/02/2018 12:33 PM 
 
Popular Now
 
7
Browse a Intenet Webpage in a hidden mode 
By jordanrenault
Started 7 hours ago 
Latest Topic Updates
 
6
Check the text changes in the Сhrome window. 
By zxc3
Started 23 hours ago 
 
14
_ArraySort lacks ability to compare case-sensitively 
By c.haslam
Started 20 hours ago 
 
7
Browse a Intenet Webpage in a hidden mode 
By jordanrenault
Started 7 hours ago 
 
4
GUICtrlCreateTabItem("") Not working? 
By rcmaehl
Started 19 hours ago 
 
5
LCD Countdown Timer 
By timmy2
Started October 29, 2013 
Latest Files Updates
 
AD - Active Directory UDF
By water






   6941   5 
 
cDebug.au3
By c.haslam






   52   0 
 
OutlookEX
By water






   3289   0 
 
Beats Player
By careca






   1588   0 
 
UninstallByShortcut
By careca






   22   0 
All Activity 
Home 
Theme 
AutoIt (Default) 
AutoIt (Round Avatars) 
AutoIt (Forced Desktop View) 
AutoIt (Dark) 
Privacy Policy 
Contact Us 
Community Software by Invision Power Services, Inc. 
× 
Existing user? Sign In 
Sign Up 
Browse
Back 
Browse 
Forums 
Downloads 
Guides 
Calendar 
Forum Rules 
Wiki 
AutoIt Resources
Back 
Release
Back 
Installer 
Help file 
Editor 
Beta
Back 
Installer 
Help file 
Editor 
Git 
+>10:52:05 AutoIt3.exe ended.rc:0
+>10:52:05 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.091

 

Thanks, but it does not work for me. What does it take to make it work?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By water
      Internet Explorer is nearly dead, newer versions of Firefox can't any longer be automated using Stilgar's FF UDF.
      Hence more and more users (including me) need to look at automating Webbrowsers using WebDriver.
      That's why I have started to create a tutorial in the wiki.
      It should describe all necessary steps from intallation to usage.

      I'm still collecting ideas for the tutorial - that's where you come into play.
      What do you expect to see in such a tutorial?
      Which browsers should be covered (Firefox, Chrome and Edge are settled)? Any questions for the FAQ? Which (high level) coding examples do you expect (like "How to attach to a running browser instance") ... Like to see your comments
       
      ToDo-List:
      Add "Tools" section and add ChroPath plugin. Done. FAQ: "How to attach to a running browser instance". Done. Explain the difference between iuiautomation, iaccessible, autoit, webdriver. Done. The AutoIt FAQ 40 has been extended. Detailed description of each function. Done Example for "how to deal with downloading". Use function _WD_DownloadFile. Example for "how to deal with popups (alerts, print or save dialog). Use function_WD_AlertRespond to respond to a user prompt. Example for "how to deal with multiple tabs". Use functions _WD_NewTab (create a new tab), _WD_Window (close or switch to a tab) and _WD_Attach (attach to existing tab).
    • By nooneclose
      Good morning, all. I am having a very hard time figuring out why my code "breaks" every second (and every time after) iteration in the loop. 
      I am trying to automate the process of filling out a form for work. I need to find and send data to seven fields and get data from one field. 
      Here are a couple of pictures of the fields I am interacting with. The fields are on the same forum/page. (the green boxed ones)
       


      Here is my code so far. 
       
      #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ;Allows for the combining of UDFs by disabling error messages. (I get error messages for "problems" that dont actually exsist) #include <AD.au3> ;Allows Active Directory functions #include <Array.au3> ;Allows special Array functions #include <Constants.au3> ;Allows constants to be used #include <Date.au3> ;Allows Date and Time functions #include <DateTimeConstants.au3> ;Allows Date and Time constant functions #include "DTC.au3" ;Allows Custom Date and Time functions #include <IE.au3> ;Allows Internet Explorer functions #include <Misc.au3> ;Allows the "is pressed" function to be used #include <MsgBoxConstants.au3> ;Allows Message box function to be used #include <OutlookEX.au3> ;Allows the Outlook functions #include <String.au3> ;Allows special string functions #include <StringConstants.au3> ;Allows String constant functions #include <Timers.au3> ;Allows timer functions ;#RequireAdmin ;Requests admin privliges before starting program ; Special UDFs for UIA automation #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <debug.au3> #include <WinAPI.au3> #include "UIAWrappers.au3" #AutoIt3Wrapper_UseX64=N ;Should be used for stuff like tagpoint having right struct etc. when running on a 64 bits os ;******************************************************************************* ; Format and send the vaild E-mail's contents ;******************************************************************************* Func SendEmailData() ConsoleWrite("Action 16: Send E-mail Data to it's proper fields" & " at line: " & @ScriptLineNumber & @CRLF) ;=============================================================================== ; Store the Elements ;=============================================================================== ; Description _UIA_setVar("oDescription","Title:=Description:;controltype:=UIA_EditControlTypeId;class:=") ; Long Description OK Button _UIA_setVar("oLongButton","Title:=Long Description;controltype:=UIA_ImageControlTypeId;class:=") _UIA_setVar("oLongOk","Title:=OK;controltype:=UIA_ButtonControlTypeId;class:=") ; Work Order Number _UIA_setVar("oWorkOrderNum","Title:=Work Order:;controltype:=UIA_EditControlTypeId;class:=") ; Location _UIA_setVar("oLocation","Title:=Location:;controltype:=UIA_EditControlTypeId;class:=") ; Work Type _UIA_setVar("oWorkType","Title:=Work Type:;controltype:=UIA_EditControlTypeId;class:=") ; Reported By Date _UIA_setVar("oDate","Title:=Reported Date:;controltype:=UIA_EditControlTypeId;class:=") ; Reported By Person _UIA_setVar("oCustomer","Title:=Reported By:;controltype:=UIA_EditControlTypeId;class:=") ; Reported By Email _UIA_setVar("oEmail","Title:=Reported By Email:;controltype:=UIA_EditControlTypeId;class:=") ; Reported By Phone _UIA_setVar("oPhone","Title:=Reported By Phone:;controltype:=UIA_EditControlTypeId;class:=") Local $WorkType = "CM" ; Send the stored data to the proper field Local $stringSplitter = ", " Local $conCateStrings = $eDescription & $stringSplitter & $eComments Local $ComStringLen = StringLen($eComments) Local $TrimedDesc = StringTrimLeft($eDescription, 1) ;=============================================================================== ; Check to see if the Description and the Long Description can be concatenated If StringLen($conCateStrings) <= 100 Then Sleep(2000) _UIA_action("oDescription","highlight") Sleep(300) _UIA_Action("oDescription","setfocus") Sleep(300) _UIA_action("oDescription","click") Sleep(500) _UIA_action("oDescription", "setvalue", $conCateStrings) _UIA_action("oDescription","highlight") ; Wipes the long description so no duplication happens $eComments = "" ;=============================================================================== ; Send the Long Description in place of the Description ElseIf $TrimedDesc = "Other" AND $ComStringLen <= 100 Then Sleep(2000) _UIA_action("oDescription","highlight") Sleep(300) _UIA_Action("oDescription","setfocus") Sleep(300) _UIA_action("oDescription","click") Sleep(500) _UIA_action("oDescription", "setvalue", $eComments) _UIA_action("oDescription","highlight") Sleep(2000) ;=============================================================================== ; Send the Long Description in place of the Description and Send the rest of it to the Long Description field ElseIf $TrimedDesc = "Other" AND $ComStringLen >= 100 Then SplitLongDesc() ; Description gets the first 100 Characters $eDescription = $FirstLine ; Long Description gets the rest $eComments = StringMid($sNewString, 101) Sleep(2000) _UIA_action("oDescription","highlight") Sleep(500) _UIA_Action("oDescription","setfocus") Sleep(500) _UIA_action("oDescription","click") Sleep(500) _UIA_action("oDescription", "setvalue", $eDescription) _UIA_action("oDescription","highlight") Sleep(2000) ;=============================================================================== ; Send the Description and some of the Long Description ElseIf StringLen($eDescription) <= 80 AND $eComments <> "" Then SplitLongDesc() ; Description gets the first 100 Characters $eDescription = $FirstLine ; Long Description gets the rest $eComments = StringMid($sNewString, 101) Sleep(2000) _UIA_action("oDescription","highlight") Sleep(300) _UIA_Action("oDescription","setfocus") Sleep(300) _UIA_action("oDescription","click") Sleep(500) _UIA_action("oDescription", "setvalue", $eDescription) _UIA_action("oDescription","highlight") Sleep(2000) ;=============================================================================== ; Send the original Description Else Sleep(2000) _UIA_action("oDescription","highlight") Sleep(300) _UIA_Action("oDescription","setfocus") Sleep(300) _UIA_action("oDescription","click") Sleep(500) _UIA_action("oDescription", "setvalue", $eDescription) _UIA_action("oDescription","highlight") Sleep(2000) EndIf ;=============================================================================== ; Click the long description button Sleep(2000) _UIA_action("oLongButton","highlight") Sleep(300) _UIA_Action("oLongButton","setfocus") Sleep(300) _UIA_action("oLongButton", "click") _UIA_action("oLongButton", "highlight") _UIA_action("oLongButton", "click") Sleep(2000) ;=============================================================================== ; Send the long description Sleep(1000) if StringLen($eComments) >= 250 Then Sleep(500) Send($eComments) Sleep(10000) ElseIf StringLen($eComments) >= 150 Then Sleep(500) Send($eComments) Sleep(6000) ElseIf StringLen($eComments) <= 10 Then Sleep(500) Send($eComments) Sleep(1500) Else Sleep(500) Send($eComments) Sleep(4000) EndIf ;=============================================================================== ; Click the ok button Sleep(2000) _UIA_action("oLongOk","highlight") Sleep(300) _UIA_Action("oLongOk","setfocus") Sleep(300) _UIA_action("oLongOk", "click") _UIA_action("oLongOk", "highlight") Sleep(2000) ;=============================================================================== ; The work order number _UIA_action("oWorkOrderNum","highlight") Sleep(300) _UIA_Action("oWorkOrderNum","setfocus") Sleep(300) _UIA_action("oWorkOrderNum", "getvalue", $WoNum) _UIA_action("oWorkOrderNum","highlight") ;MsgBox("", "Work order number", $WoNum[2]) ;=============================================================================== ; The Location field Sleep(2000) _UIA_action("oLocation","highlight") Sleep(300) _UIA_Action("oLocation","setfocus") Sleep(300) _UIA_action("oLocation", "setvalue", $eLocation) _UIA_action("oLocation","highlight") ;=============================================================================== ; The Work Type field Sleep(2000) _UIA_action("oWorkType","highlight") Sleep(300) _UIA_Action("oWorkType","setfocus") Sleep(300) _UIA_action("oWorkType", "setvalue", $WorkType) _UIA_action("oWorkType","highlight") ;=============================================================================== ; The Reported By Date Sleep(2000) _UIA_action("oDate","highlight") Sleep(300) _UIA_Action("oDate","setfocus") Sleep(300) _UIA_action("oDate", "setvalue", $eSentOn) _UIA_action("oDate","highlight") ;=============================================================================== ; The Requested by field Sleep(2000) _UIA_action("oCustomer","highlight") Sleep(300) _UIA_Action("oCustomer","setfocus") Sleep(300) _UIA_action("oCustomer", "setvalue", $eReportedBy) _UIA_action("oCustomer","highlight") ;=============================================================================== ; The Requested by E-mail Sleep(2000) _UIA_action("oEmail","highlight") Sleep(300) _UIA_Action("oEmail","setfocus") Sleep(300) _UIA_action("oEmail", "setvalue", $eSenderAddress) _UIA_action("oEmail","highlight") ;=============================================================================== ; The Requested by Phone Sleep(2000) _UIA_action("oPhone","highlight") Sleep(300) _UIA_Action("oPhone","setfocus") Sleep(300) _UIA_action("oPhone", "setvalue", $eRoomPhone) _UIA_action("oPhone","highlight") MouseClick("left", 1843, 437, 2) Sleep(1500) Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Send("{UP}") Sleep(1000) MouseClick("left", 591, 279, 2) Sleep(3000) $lCount += 1 ConsoleWrite("Action 16: Finished" & " at line: " & @ScriptLineNumber & @CRLF) Sleep(2000) EndFunc  
      That is not all the code but that is the function that keeps "breaking" and by "breaking" I mean the program acts like it doesn't know where the description field is after the first iteration.
      My code will just click somewhere in the far top left corner and somehow shrink the browser in the process of finding the description field.  
       
      The code works perfectly the first iteration but after that, it "breaks" (doesn't know where to click/send data to). 
      As always any help is greatly appreciated. 
       
      NOTE: By the time 'Action 16' runs Chrome has already been opened and has navigated to the proper webpage.  I am trying to loop 'Action 16' multiple times. I do not leave that webpage while looping. 
    • By nooneclose
      Good morning, I am having a hard time figuring out how to read or get the valve (628850) from the red squared box in the picture below. 

      Here is what I have tried so far. (see code below. Also, I'm very sorry my code is sloppy.)
       
      #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ;Allows for the combining of UDFs by disabling error messages. (I get error messages for "problems" that dont actually exsist) #include <AD.au3> ;Allows Active Directory functions #include <Array.au3> ;Allows special Array functions #include <Constants.au3> ;Allows constants to be used #include <Date.au3> ;Allows Date and Time functions #include <DateTimeConstants.au3> ;Allows Date and Time constant functions #include "DTC.au3" ;Allows Custom Date and Time functions #include <IE.au3> ;Allows Internet Explorer functions #include <Misc.au3> ;Allows the "is pressed" function to be used #include <MsgBoxConstants.au3> ;Allows Message box function to be used #include <OutlookEX.au3> ;Allows the Outlook functions #include <String.au3> ;Allows special string functions #include <StringConstants.au3> ;Allows String constant functions #include <Timers.au3> ;Allows timer functions ;#RequireAdmin ;Requests admin privliges before starting program #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <debug.au3> #include <WinAPI.au3> #include "UIAWrappers.au3" #AutoIt3Wrapper_UseX64=N ;Should be used for stuff like tagpoint having right struct etc. when running on a 64 bits os ; Sets the script to accept coordinates off the program window and not the screen AutoItSetOption('MouseCoordMode', 0) ; Defines the time it takes to send text to the software/program AutoItSetOption('SendKeyDelay', 10) ;******************************************************************************* ; Close the script if "End" is pressed ;******************************************************************************* Local $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") HotKeySet("{END}", "Terminate") Func Terminate() MsgBox($MB_ICONINFORMATION, "DEATH", "AI Stoped!", 5) Exit EndFunc ;******************************************************************************* ; Script has started ;******************************************************************************* Sleep(2000) MsgBox($MB_ICONINFORMATION, "WO_AI", "AI Started!", 5) Sleep(1500) ;******************************************************************************* ; Main functions of the program ;******************************************************************************* test() ;=============================================================================== ; Function Definitions ;=============================================================================== Func test() MsgBox("", "TESTing", "Timer Started") Sleep(15000) MsgBox("", "TESTing", "timer Finished") ;~ *** Standard code maintainable *** AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("oP1","Title:=Work Order Tracking - Google Chrome;controltype:=UIA_PaneControlTypeId;class:=Chrome_WidgetWin_1") ;Work Order Tracking - Google Chrome _UIA_setVar("oP2","Title:=Work Order Tracking;controltype:=UIA_DocumentControlTypeId;class:=Chrome_RenderWidgetHostHWND") ;Work Order Tracking _UIA_setVar("oP3","Title:=  Work Order Tracking;controltype:=UIA_CustomControlTypeId;class:=") ;  Work Order Tracking _UIA_setVar("oP4","Title:=main form;controltype:=UIA_GroupControlTypeId;class:=") ;main form _UIA_setVar("oP5","Title:=;controltype:=UIA_CustomControlTypeId;class:=") ; _UIA_setVar("oP6","Title:=View Work Details;controltype:=UIA_CustomControlTypeId;class:=") ;View Work Details _UIA_setVar("oP7","Title:=;controltype:=UIA_CustomControlTypeId;class:=") ; _UIA_setVar("oP8","Title:=Location: Location description Long Description Include Children? Include Children: unchecked Include Ancestors? Include Ancestors: unchecked Include History? Include History: unchecked Work Scope Minimize Work Scope Section Minimize Work Scope Section Work Scope Work Close Filter CTRL+Z Close Filter CTRL+Z Filter Filter Table Filter Table Next Row [CTRL+Down Arrow] Next Row [CTRL+Down Arrow] 1 - 4 of 4 Download Hide Table: Work Hide Table: Work Work Work Table Button Group;controltype:=UIA_CustomControlTypeId;class:=") ;Location: Location description Long Description Include Children? Include Children: unchecked Include Ancestors? Include Ancestors: unchecked Include History? Include History: unchecked Work Scope Minimize Work Scope Section Minimize Work Scope Section Work Scope Work Close Filter CTRL+Z Close Filter CTRL+Z Filter Filter Table Filter Table Next Row [CTRL+Down Arrow] Next Row [CTRL+Down Arrow] 1 - 4 of 4 Download Hide Table: Work Hide Table: Work Work Work Table Button Group _UIA_setVar("oP9","Title:=;controltype:=UIA_CustomControlTypeId;class:=") ; _UIA_setVar("oP10","Title:=Work;controltype:=UIA_TableControlTypeId;class:=") ;Work _UIA_setVar("oP11","Title:=;controltype:=UIA_CustomControlTypeId;class:=") ; _UIA_setVar("oP12","Title:=Record Detail Menu;controltype:=UIA_DataItemControlTypeId;class:=") ;Record Detail Menu ; Clicks on the main record field _UIA_setVar("oUIElement","Title:=Record ;controltype:=UIA_EditControlTypeId;class:=") ;ControlType:=UIA_EditControlTypeId;classname:=") ; Trying to click on / get value from the 3rd from top record field (this is me trying to use the id to access the record box) Local $otest =_UIA_getObjectByFindAll("Record.mainwindow", "id:=ma9038468_tdrow_[C\:1]_txt-tb[R\:3].;ControlType:=UIA_DataItemControlTypeId", $treescope_subtree) ;~ Actions split away from logical/technical definition above can come from configfiles ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") ;~_UIA_Action("oP3","highlight") _UIA_Action("oP3","setfocus") ;~_UIA_Action("oP4","highlight") _UIA_Action("oP4","setfocus") ;~_UIA_Action("oP5","highlight") _UIA_Action("oP5","setfocus") ;~_UIA_Action("oP6","highlight") _UIA_Action("oP6","setfocus") ;~_UIA_Action("oP7","highlight") _UIA_Action("oP7","setfocus") ;~_UIA_Action("oP8","highlight") _UIA_Action("oP8","setfocus") ;~_UIA_Action("oP9","highlight") _UIA_Action("oP9","setfocus") ;~_UIA_Action("oP10","highlight") _UIA_Action("oP10","setfocus") ;~_UIA_Action("oP11","highlight") _UIA_Action("oP11","setfocus") ;~_UIA_Action("oP12","highlight") _UIA_Action("oP12","setfocus") _UIA_action("oUIElement","highlight") _UIA_Action("oUIElement","setfocus") _UIA_action("oUIElement","click") Sleep(2500) _UIA_action($otest,"highlight") _UIA_Action($otest,"setfocus") _UIA_action($otest,"click") MsgBox("", "End of program", "death") EndFunc I'm using $otest to try and click on the box, through the id that chrome gives it, with the UIA functions. I am kind of completely new to the UIA UDF but I do find it capable of doing a lot of cool things.   
      as always any help would be greatly appreciated. I know how hard you people hard. Thank you for taking the time to help us. 
    • By UGH
      Autoit team are assbags.    They want to hold out that they are soooo much smarter than everyone else and they really don't want to help anyone with their questions.   In that case then why have a website.   Oh i know, they get their kicks out of laughing at everyone. 
       
       
       
       
       
       
       
    • By nooneclose
      I want to check some Excel data against data on a website in Chrome. I use Chrome because the site I use does not function properly in Internet Explorer or Firefox. I know how to do the Excel stuff I just can not figure out how to send to Chrome, let alone check to see if the data matches or not. I am also having trouble finding any help online while searching for Chrome functions for Autoit. I have a Chrome UDF installed but I still can not figure out how to get my code to properly function. (I am not posting code because I am  sure my code isn't right, to begin with)
      As usual, any and all help would be greatly appreciated. 
×
×
  • Create New...