SmOke_N

IEEx - IE extended library with some Javascript options

14 posts in this topic

#1 ·  Posted (edited)

This is just a revision of >IEJS.au3 Library, with more functions and a better naming attribute to what the library actually is.

You'll find standard AutoIt object functions as well as internally executed Javascript ones (functions with: _IEEx_JS* are javascript functions).

To read more on how this came about or previous versions, please see the IEJS.au3 page.

When reporting issues, please provide:

Issue you've encountered.

Replication code (If I can't run your code, I won't debug it more than likely).

AutoIt version

IE version

IE update version

SciTe Version if you ran it from SciTe

Functions:

;    _IEEx_CallObjEval()
;    _IEEx_CallObjExecScript() - Fixed
;    _IEEx_CheckAppVersionAlways()
;    _IEEx_ClassNameGetArray() - New
;    _IEEx_ClickObjByPoint()
;    _IEEx_CreateWithParams() - Fixed
;    _IEEx_EmbeddedGetVersion()
;    _IEEx_EmbeddedSetVersion()
;    _IEEx_GetAppMajorVersion()
;    _IEEx_GetObjByClassName() - New
;    _IEEx_GetObjByString() - New
;    _IEEx_GetObjEval()
;    _IEEx_GetObjParentWindow()
;    _IEEx_GetObjPos()
;    _IEEx_GetObjType()
;    _IEEx_GetScroll()
;    _IEEx_GetScrollPoint()
;    _IEEx_GetWindowSize()
;    _IEEx_ObjCheckBoxRadioSelect() - New
;    _IEEx_ObjDispatchEvent() - New
;    _IEEx_MouseEventExec()
;    _IEEx_JSClassNameGetArray()
;    _IEEx_JSClassNameGetCollection()
;    _IEEx_JSClickObj()
;    _IEEx_JSClickObjById()
;    _IEEx_JSClickObjByName()
;    _IEEx_JSClickObjByPoint()
;    _IEEx_JSDragEventObj()
;    _IEEx_JSEnable()
;    _IEEx_JSGetObjByClassName()
;    _IEEx_JSGetObjPos()
;    _IEEx_JSIsEnabled()
;    _IEEx_JSMouseEventObj()
;    _IEEx_JSMouseEventObjById()
;    _IEEx_JSMouseEventObjByName()
;    _IEEx_JSObjQuerySelector()
;    _IEEx_JSObjQuerySelectorAll()
;    _IEEx_JSTypeOf()
;    _IEEx_TabAttach()
;    _IEEx_TabCount()
;    _IEEx_TabCreate()
;    _IEEx_TabGetInstance()
;    _IEEx_VersionInfo()
;    _IEEx_WhileIsObj() - New
;    _IEEx_WhileNotIsObj() - New
;    _IEEx_WinGetBrowserObjArray()

Changes:

2014-12-30    B0.0.6    Added:    _IEEx_EmbeddedGetVersion()Get the embedded version used from something like
                                                          _IECreateEmbedded
2014-12-30    B0.0.6    Added:    _IEEx_EmbeddedSetVersion()Set the embedded version used from something like
                                                          _IECreateEmbedded (see example)
2014-12-30    B0.0.6    Added:    _IEEx_TabAttach()Similar to _IEAttach(), but browser specific and different string cases
2014-12-30    B0.0.6    Added:    _IEEx_TabCount()Get a count of the tabs open in a specific browser session
2014-12-30    B0.0.6    Added:    _IEEx_TabGetInstance()Get the tab instance number from the specific browser session
2014-12-30    B0.0.6    Added:    _IEEx_WinGetBrowserObjArray()Get all the browser objects (tabs) from a specific browser
                                                             window handle/title
2015-01-13    B0.0.7    Changed:  _IEJS format to _IEEx - Script breaking
2015-01-20    B0.0.7    Fixed     _IEEx_CreateWithParams()Issue with tryattach, wait, and focus.
                                                          Added return object/pid feature
2015-01-22    B0.0.7    Fixed:    _IEEx_CallObjExecScript()Recursion issue when IE version is 11 or higher and no exeScript
2015-01-26    B0.0.7    Added:    _IEEx_ClassNameGetArray()Retrieve an array of objects based on class
2015-01-26    B0.0.7    Added:    _IEEx_GetObjByClassName()Retrieve an object based on class
2015-01-26    B0.0.7    Added:    _IEEx_GetObjByString()Retrieve an object by its innerText or value
2015-01-26    B0.0.7    Added:    _IEEx_ObjCheckBoxRadioSelect()(Un)Check/(De)Select radio or checkbox, has dispatchevent
                                                                option as well as fireevent
2015-01-26    B0.0.7    Added:    _IEEx_ObjDispatchEvent()similar to fireEvent
2015-01-26    B0.0.7    Added:    _IEEx_WhileIsObj()waits until an object is no longer an object (could come in handy for
                                                    waiting on page loads rather than hoping you have the right about of
                                                    Sleep(n) allocated)
2015-01-26    B0.0.7    Added:    _IEEx_WhileNotIsObj()waits until a variable is an object (could come in handy for
                                                    waiting on page loads rather than hoping you have the right about of
                                                    Sleep(n) allocated)
2015-01-26    B0.0.8    Fixed:    _IEEx_GetAppMajorVersion()Was being passed regular objects but only checking for browser
                                                            Thank you mLipok for reporting and testing for me

 

2015-01-26IEEx.B007.zip

2015-01-26IEEx.B008.zip

.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Trying to use and:
 

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseClickExample.au3" /UserParams  
+>17:23:16 Starting AutoIt3Wrapper v.14.801.2025.5 SciTE v.3.5.2.0   Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:UsersuserAppDataLocalAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:UsersuserAppDataLocalAutoIt v3SciTE
>Running AU3Check (3.3.13.19)  from:C:Program Files (x86)AutoIt3Beta  input:Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseClickExample.au3
+>17:23:16 AU3Check ended.rc:0
>Running:(3.3.13.19):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseClickExample.au3"  
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
"Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEEx.au3" (188) : ==> The requested action with this object has failed.:
Return $oExec.execScript($sScript)
Return $oExec^ ERROR

->17:23:21 AutoIt3.exe ended.rc:1
+>17:23:21 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 5.593

EDIT:

IE 11.0.9600.17501
IEup. 11.0.15 KB3008923
Win 7 Pro 64Bit
SciTE latest Beta

_IEEx_VersionInfo:
Version: B0.0.7
Release Date: 2015-01-13

Edited by mLipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

and second issue:

 

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseEventGetPosGetScrollExample.au3" /UserParams   
+>17:32:56 Starting AutoIt3Wrapper v.14.801.2025.5 SciTE v.3.5.2.0   Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:UsersuserAppDataLocalAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:UsersuserAppDataLocalAutoIt v3SciTE
>Running AU3Check (3.3.13.19)  from:C:Program Files (x86)AutoIt3Beta  input:Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseEventGetPosGetScrollExample.au3
+>17:32:56 AU3Check ended.rc:0
>Running:(3.3.13.19):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "Z:TOOLsMacroFORUM___FORUM -- z forumIEEx.B007ExamplesIEExMouseEventGetPosGetScrollExample.au3"   
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
!>17:33:23 AutoIt3.exe ended.rc:-1073741571
+>17:33:23 AutoIt3Wrapper Finished.
>Exit code: 3221225725    Time: 26.82

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

LOL, that was fast!!!

Not having IE11 sucks... I'll see what I can do, thanks.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Issue fixed I believe, thanks mLipok for helping!


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:Documents and SettingsDanPollakDesktopIEEx.B008ExamplesIEExClassNameArrayExample.au3" /UserParams    

+>11:39:08 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0   Keyboard:00000409  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86    Environment(Language:0409)

+>         SciTEDir => C:Program FilesAutoIt3SciTE   UserDir => C:Documents and SettingsDanPollakLocal SettingsApplication DataAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:Documents and SettingsDanPollakLocal SettingsApplication DataAutoIt v3SciTE

>Running AU3Check (3.3.12.0)  from:C:Program FilesAutoIt3  input:C:Documents and SettingsDanPollakDesktopIEEx.B008ExamplesIEExClassNameArrayExample.au3

+>11:39:08 AU3Check ended.rc:0

>Running:(3.3.12.0):C:Program FilesAutoIt3autoit3.exe "C:Documents and SettingsDanPollakDesktopIEEx.B008ExamplesIEExClassNameArrayExample.au3"    

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

"C:Documents and SettingsDanPollakDesktopIEEx.B008ExamplesIEEx.au3" (1650) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$aORet[$iCount] = $oItem

^ ERROR

->11:39:14 AutoIt3.exe ended.rc:1

+>11:39:14 AutoIt3Wrapper Finished.

>Exit code: 1    Time: 6.191

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

IE11 Dan?

Edit:
I believe I've fixed that issue, but I think I'll wait until anymore are found.  The fix if you want to insert yourself until then:

Func _IEEx_JSClassNameGetArray(ByRef $oObj, $sClass, $sTag = Default)

    Local $oItems = _IEEx_JSClassNameGetCollection($oObj, $sClass)
    If @error Then
        Return SetError(@error, @extended, 0)
    EndIf

    $sTag = ((StringLen($sTag) And Not IsKeyword($sTag)) ? StringLower($sTag) : "")

    Local $iLen = Int($oItems.length)
    If @error Or $iLen = 0 Then
        Return SetError($_IESTATUS_InvalidValue, -1, 0)
    EndIf
    
    Local $aORet[$iLen]
    Local $iCount = 0
    For $oItem In $oItems
        If StringLen($sTag) Then
            If $sTag <> StringLower($oItem.tagName) Then ContinueLoop
        EndIf
        If $iCount = $iLen Then ExitLoop
        $aORet[$iCount] = $oItem
        $iCount += 1
    Next

    ReDim $aORet[$iCount]
    Return SetError($_IESTATUS_Success, 1, $aORet)
EndFunc   ;==>_IEEx_JSClassNameGetArray

.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

No, actually IE8. This is on an old XP box. :o:)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Little confused by _IEEx_WhileNotIsObj.

How would one pass an object if that object does not exist in the functions current form (IEEx.B008)? 

EDIT:

Because the first thing the function does is...

If Not IsObj($oObj) Then
    Return SetError($_IESTATUS_InvalidDataType, 1, 0)
EndIf
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I believe _IEEx_JSClassNameGetArray is still broken. When I run the example, $iLen = 6, yet $oItems appears to contain 49 items.

Edit: This is somewhat confirmed by IEExClassNameCollectionExample.au3, which outputs 49 "Tag" lines with the last 43 being blank.

Edited by Danp2

Share this post


Link to post
Share on other sites

fun fun fun... (actually it is, No feedback on the other so I didn't know these were would be broke :) ).

@John, cute huh?  I must admit, that's a standard first line for me in EVERY object udf lol.  I probably did it without thinking... Thanks

@Danp2... it's a javascript issue, I will look over it and try to find an alternative... thanks


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

I am curious, why you use 

Local $oDPWE = Execute('$oObj.document.getElementById("IEExAutEvalObjId")')

instead:

Local $oDPWE = $oObj.document.getElementById("IEExAutEvalObjId")

?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

I hope someone can help me. (if this isn't outdated)

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Hans\Desktop\YouTube Upvote Downloader\YouTube upvotes loader with IEEX.au3" /UserParams    
+>19:05:52 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0   Keyboard:00000807  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0407)  CodePage:0  utf8.auto.check:4    # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Hans\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Hans\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Hans\Desktop\YouTube Upvote Downloader\YouTube upvotes loader with IEEX.au3
+>19:05:52 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Hans\Desktop\YouTube Upvote Downloader\YouTube upvotes loader with IEEX.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
"C:\Program Files (x86)\AutoIt3\Include\IEEX.au3" (280) : ==> The requested action with this object has failed.:
If String($oTag.classname) = $sClass Then
If String($oTag^ ERROR
->19:07:49 AutoIt3.exe ended.rc:1
+>19:07:49 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 117.6

It happens, when i'm trying to _IEEx_GetObjByClassName frequently in succession.

 

I hope u can help and have a nice day.

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

  • Similar Content

    • Patryk
      By Patryk
      Dear Colleagues,
      I have no idea how to refer to style.display in my loop. There is a button like: 
      <input name="ctl00$bodyPlaceholder$btnFecharProcessamento" class="button" id="bodyPlaceholder_btnFecharProcessamento" style="display: none;" onclick="FecharJanelaProcessamento();return false;" type="submit" value="Fechar"> I want it to be clicked as soon as button's style change from style="display: none;" to  style= ="display: inline-block;" 
      This is what I got, but it's not working...
      Func GetButtons() $oButtons = _IEGetObjByName($oForm,"ctl00$bodyPlaceholder$btnFecharProcessamento",-1) $i = 0 While $i <> 1 For $oBtn In $oButtons If _IEFormElementGetValue($oBtn) = "Fechar" And $oBtn.document.style.display = "display: inline-block;" Then $i = 1 _IEAction($oBtn, "focus") _IEAction($oBtn, "click") ExitLoop EndIf Next WEnd EndFunc  
      I will really appreciate if you could help me with these loop!
    • Omnitica
      By Omnitica
      Hello!
      I'm new to the forums! Couldn't find any threads covering this issue. Sorry if I'm wrong.

      I'm having problems changing the text/value of a input box. The particular box doesn't have a name or id, just: class="jq_hotkeys_enabled form-control".
      This class appears multiple times throughout the source, so I don't think It's right to reference that object. 
      See image 1.
      However, I've managed to find a object with the name "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper" which contains the value of the input box, and the id for the person in the dropdown/combobox left of it. (with "dummy-1" selected).
      See image 2.
      As you can see the value is 3982,4545     ( name , time )
      But when I try to change the value of it by doing:
      #include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") The box doesn't get its new value. I  can see in the source that it's changed though.
      See image 3.
       
      However, if I do: 
      #include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") $oIE.document.parentwindow.execScript("theForm.submit()") ; But it needs to reload the page The box gets its new value after the page reloads by the theForm.submit() function. 
      This is a bit unfortunate as I want the changes to happen instantly like when I type in the box with the keyboard... or select in the combobox.
      Maybe someone knows how I can do this? Looking forward to an answer! 
      Thanks in advance.
       
      Note: Unfortunately I can't provide with the real URL as it is constricted to employees in the company I work for, but let me know If I should provide anything else.
       



    • kawliga751
      By kawliga751
      I have a workplace GUI that has a search field function that pulls up customer records to allow changes. I am attempting to 1)LOGIN 2)Enter Search field, enter a number and then {ENTER} 3)change specific field once customer record loads. I have very limited experience in GUI manipulation but I am able to login using the below:
      #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/ASAG/index.htm') Call ("RacksheetSignIn") Func RacksheetSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/RackSheets/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc However I can't seem to use the _IEGetObjByName or Mouseclick to focus on the search field to allow me to enter my search criteria. When I "inspect element" in the Search field I get the attached:
       
      Any help would be MUCH appreciated
       
       
       

    • TotalAuto
      By TotalAuto
      Hi All
      I am new to AutoIT, its community, and pretty much programming in general. 
      After a bit of online research, I decided to focus on AutoIT as my first programming attempt as it seems quite powerful and amazing once you become advanced at it. I have read some introductory pdfs which where good, including from the guy I think who invented it. I also watched various sketchy youtube videos, checked out the forum etc. I have to admit it's a bit confusing starting off but I reckon if I just keep pushing forward with continual hard work I can only get better.  
      My first AutoIT project has been to open Internet Explorer and automatically log into Twitter to save doing it manually. I plan to run this after windows start up via task scheduler. I am using the #include <IE.au3> UDF but for some reason about 20% of the time I receive the following orange error notifications at the bottom of the editor (pic attached). When it happens the IE browser just doesn't open but the program continues to run which mucks up the script. 
      Does anyone know why this is happening and how it can be fixed? Also is there some other better, less error prone way, to open IE and automatically log in?
      I have tried to use the Get Object NAME and ID commands to insert the username and password (i.e. the xxxxxxxxxx's) but when I right click to use "Inspect element" there is no name or id. It seems to be some sort of java script reference?
      I am using Windows 7 with latest updates and Internet Explorer version 11.
      As this is my first post I hope I am following protocols, and if not, please let me know and I will improve.
      Thanks

    • ur
      By ur
      For the below form, I am able to automate using below code for textboxes.

      #include <IE.au3> Local $oIE = _IEAttach("http://localhost:18170/MartAdmin/", "url") _IELoadWait($oIE) $Search = _IEGetObjById($oIE,"x-auto-16-input") _IEPropertySet($Search, 'innerText','Uday KIran') $Search = _IEGetObjById($oIE,"x-auto-18-input") _IEPropertySet($Search, 'innerText','Uday KIran') But for the Login button, there is no id or name.
      The html code when I click on Inspect element in browser, shown below.
      <button tabindex="0" class="x-btn-text" style="width: 64px; position: relative;" type="button">Log In</button> Please let me know how to click this.?