TouchOdeath

3.3.14.2 AU3stripper IE.au3 Objevent unsolvable func ERR

18 posts in this topic

#1 ·  Posted (edited)

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y
Local $oIE = _IECreate("https://" & "somesite.com", 0, 1, 1)

I recently updated to 3.3.14.2

If I build this script I consistently get:

-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __ieinternalerrorhandlerderegister
E:\apps\AutoIt3\include\IE.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler) 

I reinstalled autoit to make sure that wasn't the issue, but didn't fix the problem.  Any ideas??  For now I'll downgrade til a solution is found.

 

Edited by TouchOdeath

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

At the moment you have to use the function:

ObjEvent()

EDIT:
Example 1 in HelpFile use it like this:

; Error monitoring. This will trap all COM errors while alive.
    ; This particular object is declared as local, meaning after the function returns it will not exist.
    Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")

 

Hint
For now I suggest to you to use it as Global scope, as this is easier, but not prefered/recomended.

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

If you look in IE.au3 $__g_oIEErrorHandler is already declard Global....

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

But did you use :

_IEErrorHandlerRegister()

and btw. It looks like your snippet works well (at least for me).

Can you provide any repro script for you issue ?

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

mLipok, everything is in the first post, nothing is left out.  While that wasn't the script I used to orginally stumbled upon the error, I tried to make a script with the least amount of code and still get the error so I can show everyone.  A script as simple as that shouldn't give me any problems but it does.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ok I use exactly the same snippet from you OP.

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y
Local $oIE = _IECreate("https://" & "somesite.com", 0, 1, 1)

here is my console output:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "Z:\IE_test.au3" /UserParams    
+>20:28:21 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\user\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\user\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:Z:\IE_test.au3
+>20:28:21 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "Z:\IE_test.au3"    
--> Press Ctrl+F11 to Restart or Ctrl+Break -or- F11 to Stop
+>20:28:23 AutoIt3.exe ended.rc:0
+>20:28:23 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.542

 

Show me yours.

 

btw.

You are not using exactly the same snippet like in your OP, as you get this error:

-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.

did you use
 

#Au3Stripper_Parameters=/SO

or /SF or /SV 

??

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

#7 ·  Posted (edited)

Tools -> go doesn't use au3stripper, but Tools-> Build does.

test456.au3

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y
global $oIE = _IECreate("https://" & "somesite.com", 0, 1, 1)

Tools->Build:

>"E:\apps\AutoIt3\SciTE\..\AutoIt3.exe" "E:\apps\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "G:\AutoitVersion\test456.au3"
+>13:33:49 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => E:\apps\AutoIt3\SciTE   UserDir => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\fAutoitVersion\test456.au3
+>13:33:49 AU3Check ended.rc:0
>Running Au3Stripper (15.920.938.0)  from:E:\apps\AutoIt3\SciTE\Au3Stripper cmdline:
-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __ieinternalerrorhandlerderegister
e:\apps\autoit3\include\ie.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler) 

-#############################################################################################
-#### Au3Stripper Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####
-#############################################################################################
- 0.30 Iteration 1 Strip Functions result: Output  1255 lines, stripped 1689 Func lines and 1001 Commentlines
- 0.45 Iteration 2 Strip Variables result: Output  926 lines and stripped 329 lines
- 0.56 Iteration 3 Strip Variables result: Output  918 lines and stripped 8 lines
- 0.66 Iteration 4 Strip Variables result: Output  918 lines and stripped 0 lines
+> Source    3993 lines 166331 Characters.
+> Stripped  2026 Func/Var lines and  1001 comment lines, Total 128903 Characters.
+> Saved     75% lines 77% Characters.
+> 0 Au3Stripper v15.920.938.0 finished created:G:\AutoitVersion\test456_stripped.au3
+>13:33:50 Au3Stripper ended.rc:0
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456_stripped.au3
+>13:33:50 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\apps\AutoIt3\aut2exe\aut2exe.exe  /in "G:\AutoitVersion\test456_stripped.au3" /out "C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AU3A72.tmp.exe" /nopack /comp 2
+>13:33:50 Aut2exe.exe ended.C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AU3A72.tmp.exe. rc:0
+>13:33:51 Created program:G:\AutoitVersion\test456.exe
+>13:33:51 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.417

 

Edited by TouchOdeath

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Sorry

I just realized that 

#Au3Stripper_Parameters=/SO

is deffault, as I use /MO so this was look for me very strange.

And I miss / not understand you correctly you are trying to compile / build   instead RUN - like I was doing few last post.

EDIT:

Wait a moment..

 

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

#9 ·  Posted (edited)

Try the latest beta which can be found here: https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

UEZ, I replaced all 3 files, same result :/

mLipok, the /MO builds without error, but that still doesn't answer the question as to why the default /SO still errors.  I still don't know if anyone else builds the same 3 lines of codes do they get the same build results as me.  If they didn't then that might mean it may be an installation problem of some sort.... 

Edited by TouchOdeath

Share this post


Link to post
Share on other sites

It is only a warrning.

You must read this 3 lines toogether

-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __ieinternalerrorhandlerderegister
e:\apps\autoit3\include\ie.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler)

 

But this realy could be a problem in some cases.

So try to 

  1. Run
  2. Compile and run EXE

this following 2 examples:

 

EXAMPLE 1:

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y

Local $oIE = _IECreate("https://" & "somesite.com", 0, 1, 1)

; Deliberately cause error by calling non-existing method
$oIE.PlayMeARockAndRollSong()

 

EXAMPLE 2:

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y

_IEErrorHandlerRegister(__IEInternalErrorHandler)

Local $oIE = _IECreate("https://" & "somesite.com", 0, 1, 1)

; Deliberately cause error by calling non-existing method
$oIE.PlayMeARockAndRollSong()

 


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

#12 ·  Posted (edited)

It is only a warrning.

Nah ... let's make sure we state proper/true statements here! ;)

The Error/Warning generated by au3stripper is pretty clear and discussed many times. It is clear that ie,au3 isn't coded with au3stripper in mind so you better make sure it doesn't break the script!

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

mLipok, I'll run your tests when I come back from the Dr, will be back shortly.  It would really be nice to know if yalls build output throws the same error or not.

Share this post


Link to post
Share on other sites

mLipok, I'll run your tests when I come back from the Dr, will be back shortly.  It would really be nice to know if yalls build output throws the same error or not.

For console output ther would be no differences.
But just try to run, to see what happen.

Nah ... let's make sure we state proper/true statements here! ;)

The Error/Warning generated by au3stripper is pretty clear and discussed many times. It is clear that ie,au3 isn't coded with au3stripper in mind so you better make sure it doesn't break the script!

That's what I meant, but thanks for the detailed explanation.

 


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

#15 ·  Posted (edited)

I don't really understand why run and then compile and run.... but I'll post as much information as possible.

Example 1:  Run

>"E:\apps\AutoIt3\SciTE\..\AutoIt3.exe" "E:\apps\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "G:\AutoitVersion\test456.au3" /UserParams    
+>15:34:19 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => E:\apps\AutoIt3\SciTE   UserDir => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456.au3
+>15:34:20 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\apps\AutoIt3\autoit3.exe "G:\AutoitVersion\test456.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
"G:\AutoitVersion\test456.au3" (7) : ==> The requested action with this object has failed.:
$oIE.PlayMeARockAndRollSong()
$oIE^ ERROR
->15:34:21 AutoIt3.exe ended.rc:1
+>15:34:21 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 1.741

Build:

>"E:\apps\AutoIt3\SciTE\..\AutoIt3.exe" "E:\apps\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "G:\AutoitVersion\test456.au3"
+>15:34:45 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => E:\apps\AutoIt3\SciTE   UserDir => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456.au3
+>15:34:45 AU3Check ended.rc:0
>Running Au3Stripper (15.920.938.0)  from:E:\apps\AutoIt3\SciTE\Au3Stripper cmdline:
-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __ieinternalerrorhandlerderegister
e:\apps\autoit3\include\ie.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler) 

-#############################################################################################
-#### Au3Stripper Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####
-#############################################################################################
- 0.33 Iteration 1 Strip Functions result: Output  1256 lines, stripped 1689 Func lines and 1014 Commentlines
- 0.53 Iteration 2 Strip Variables result: Output  927 lines and stripped 329 lines
- 0.64 Iteration 3 Strip Variables result: Output  919 lines and stripped 8 lines
- 0.75 Iteration 4 Strip Variables result: Output  919 lines and stripped 0 lines
+> Source    4007 lines 166679 Characters.
+> Stripped  2026 Func/Var lines and  1014 comment lines, Total 129221 Characters.
+> Saved     75% lines 77% Characters.
+> 0 Au3Stripper v15.920.938.0 finished created:G:\AutoitVersion\test456_stripped.au3
+>15:34:45 Au3Stripper ended.rc:0
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456_stripped.au3
+>15:34:45 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\apps\AutoIt3\aut2exe\aut2exe.exe  /in "G:\AutoitVersion\test456_stripped.au3" /out "C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AUF107.tmp.exe" /nopack /comp 2
+>15:34:46 Aut2exe.exe ended.C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AUF107.tmp.exe. rc:0
+>15:34:46 Created program:G:\AutoitVersion\test456.exe
+>15:34:46 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.421

Executing the exe, it pulls up the website, then "AutoIt Error".  'Error: The requested action with this object has failed.'

 

Example 2:  Run

>"E:\apps\AutoIt3\SciTE\..\AutoIt3.exe" "E:\apps\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "G:\AutoitVersion\test456.au3" /UserParams    
+>15:36:53 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => E:\apps\AutoIt3\SciTE   UserDir => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456.au3
+>15:36:53 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\apps\AutoIt3\autoit3.exe "G:\AutoitVersion\test456.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
--> COM Error encountered in test456.au3 (17) :
----> $IEComErrorNumber         = 0x80020006 (-2147352570)
----> $IEComErrorWinDescription = Unknown name.
----> $IEComErrorDescription    = 
----> $IEComErrorSource         = 
----> $IEComErrorHelpFile       = 
----> $IEComErrorHelpContext    = 
----> $IEComErrorLastDllError   = 0
----> $IEComErrorRetcode        = 0x00000000
+>15:36:54 AutoIt3.exe ended.rc:0
+>15:36:54 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 1.237

Build:

>"E:\apps\AutoIt3\SciTE\..\AutoIt3.exe" "E:\apps\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "G:\AutoitVersion\test456.au3"
+>16:13:26 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => E:\apps\AutoIt3\SciTE   UserDir => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TouchOdeath\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456.au3
+>16:13:26 AU3Check ended.rc:0
>Running Au3Stripper (15.920.938.0)  from:E:\apps\AutoIt3\SciTE\Au3Stripper cmdline:
-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: _ieerrorhandlerregister
e:\apps\autoit3\include\ie.au3(2520,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $sFunctionName) 

-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __ieinternalerrorhandlerderegister
e:\apps\autoit3\include\ie.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler) 

-#############################################################################################
-#### Au3Stripper Found   2 Error(s)!!!!    This means your script could have problems running properly.  ####
-#############################################################################################
- 0.31 Iteration 1 Strip Functions result: Output  1268 lines, stripped 1678 Func lines and 1013 Commentlines
- 0.48 Iteration 2 Strip Variables result: Output  939 lines and stripped 329 lines
- 0.59 Iteration 3 Strip Variables result: Output  931 lines and stripped 8 lines
- 0.70 Iteration 4 Strip Variables result: Output  931 lines and stripped 0 lines
+> Source    4007 lines 166676 Characters.
+> Stripped  2015 Func/Var lines and  1013 comment lines, Total 128653 Characters.
+> Saved     75% lines 77% Characters.
+> 0 Au3Stripper v15.920.938.0 finished created:G:\AutoitVersion\test456_stripped.au3
+>16:13:31 Au3Stripper ended.rc:0
>Running AU3Check (3.3.14.2)  from:E:\apps\AutoIt3  input:G:\AutoitVersion\test456_stripped.au3
+>16:13:31 AU3Check ended.rc:0
>Running:(3.3.14.2):E:\apps\AutoIt3\aut2exe\aut2exe.exe  /in "G:\AutoitVersion\test456_stripped.au3" /out "C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AU6EED.tmp.exe" /nopack /comp 2
+>16:13:32 Aut2exe.exe ended.C:\Users\TouchOdeath\AppData\Local\AutoIt v3\Aut2exe\~AU6EED.tmp.exe. rc:0
+>16:13:32 Created program:G:\AutoitVersion\test456.exe
+>16:13:33 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 7.115

Executing the exe, it pulls up the website, no error box.

Edited by TouchOdeath

Share this post


Link to post
Share on other sites

I don't really understand why run and then compile and run.... but I'll post as much information as possible.

 

When you only RUN then you see that Example 1 and Example 2 put different errors in console output.
The first ends with an error.
The second captures the error, reports it, and ends up normal.

When you compile and Run EXE then you see that 
The first example ends with an MsgBox with AutoIt error.
The second example ends without any MsgBox.

 

As jos said:

The Error/Warning generated by au3stripper is pretty clear and discussed many times. It is clear that ie,au3 isn't coded with au3stripper in mind so you better make sure it doesn't break the script!

 

And I want to say:

In your case this is the only warning you to know that the use /SO can cause problems in some particular case.
Because after a fashion in your case should not cause the error. Provided the proper use of the UDF.


In this case I used the:

_IEErrorHandlerRegister(__IEInternalErrorHandler)

to illustrate to you when your case could prove to be fatal (I mean you see an AutoIt Error MsgBox).

But this usage of:

_IEErrorHandlerRegister(__IEInternalErrorHandler)

Has nothing to do with Au3Stripper.
So I again point you to what Jos said: "you better make sure it doesn't break the script!"


btw.

If you want to see when Au3Stripper can show you this warrning, and it will have a very important significance

just try to use this script:

#include <IE.au3>
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/SO

Call(Example, 1)
Call("Example", 2)

$sTest = "Example"
Call($sTest, 3)

$sTest2 = "Example2"
Call($sTest2, 4)

Func Example($vParam)
    MsgBox(0, 'test', $vParam)
EndFunc   ;==>Example

Func Example2($vParam)
    ; how you think did this MsgBox will appear, after run this as compiled EXE  ?
    MsgBox(0, 'test2', $vParam)
EndFunc   ;==>Example2

 

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

Well.. your doing two completely different things.... your going to get different output.... Building creates the exe which is an entirely different process, while run uses AutoIt3.exe to run the script....

Your instructions were confusing as I couldn't figure out what you wanted me to post, or what was the point of your instructions which were:

So try to 

  1. Run
  2. Compile and run EXE

this following 2 examples:

Ok so run, then compile exe and run.....And then what?  Post my results of run and build?  Or just see if they work?  Seems to me there may have been an instruction missing.

When I see errors or warnings, I generally like to fix them so their not even a 'potential' problem.  In my particular case, I thought it was funny that after upgrading to 3.3.14.2 using only one function (_IECreate), IE.au3 which comes packed with autoit gave au3 stripper warning.  I thought it would be a good idea to let someone know, or maybe it was an installation problem of some sort/some user error on my part, I didn't know thats why I'm here.

e:\apps\autoit3\include\ie.au3(2570,1) Warning for line:$__g_oIEErrorHandler = ObjEvent("AutoIt.Error", $__g_sIEUserErrorHandler) 

-#############################################################################################
-#### Au3Stripper Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####
-#############################################################################################

On the first line they are calling it a Warning.  On the the 4th line they are calling it an error.  So which is it a warning or an error?

"-#### Au3Stripper Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####"

From that above and what Jos said, it could be either error or warning, just have to test to see if it breaks your script or not, in which case it does not so I guess everytime I build my main project I'll just have to ignore those warnings because my main program seems fine.  As Jos has stated, IE.au3 wasn't programmed with au3stripper in mind.  Good to know, thanks again for your help mLipok and Jos!!

Share this post


Link to post
Share on other sites

From that above and what Jos said, it could be either error or warning, just have to test to see if it breaks your script or not, in which case it does not so I guess everytime I build my main project I'll just have to ignore those warnings because my main program seems fine.  As Jos has stated, IE.au3 wasn't programmed with au3stripper in mind.  Good to know, thanks again for your help mLipok and Jos!!

I am Actually not in favor of the testing approach, but prefer the "I understand what I am doing and know that it will not cause an error" approach.
It is pretty simple: Figure out which Func's potentially are being called by that statement and ensure these Func's won't be stripped with:

#Au3Stripper_Ignore_Funcs=                 Do not Strip these functions

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

    • Tippex
      By Tippex
      I'm having a problem with _IEBodyReadText() which is a function from the IE.au3 UDF include.
      My problem is that randomly it will crash my script with:
      Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText) Return SetError($_IESTATUS_Success, 0, $oObject.document.body^ ERROR I don't know why the error isn't caught by __IEErrorHandlerRegister but looking at this function, I can see that there is a check done by IsObj($oObject) to ensure that the object "$oObject" exists but no check that it contains the property "innerText"
      ; #FUNCTION# ==================================================================================================================== ; Author ........: Dale Hohm ; =============================================================================================================================== Func _IEBodyReadText(ByRef $oObject) If Not IsObj($oObject) Then __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidDataType") Return SetError($_IESTATUS_InvalidDataType, 1, 0) EndIf If Not __IEIsObjType($oObject, "browserdom") Then __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidObjectType", "Expected document element") Return SetError($_IESTATUS_InvalidObjectType, 1, 0) EndIf ; Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText) EndFunc ;==>_IEBodyReadText I'm struggling to find out how to test if "$oObject.document.body.innerText" exists before allowing the following Return statement to reference it with the assumption that it does exist (crashing my script when it doesn't).
      Any ideas please?
    • Ubermensch
      By Ubermensch
      Hello guys,
      I am trying to create autoit codes in order to determine if IE button was clicked or pressed.
      I am not sure if it is possible for IE button.
      Here is my initial code.
      #include <IE.au3> #include <MsgBoxConstantsau #include <WinAPI.au3> AutoIt $searchTab = "Untitled 1 - Internet Explorer" WinActivate("Untitled 1 - Internet Explorer") Local $oIE = _IEAttach("", "instance", 1) For $i = 0 To 100 Send("^" & $i) Sleep(250) If Not(StringInStr(WinGetTitle("[ACTIVATE]", $searchTab) = 0) Then While 1 If $oGetItem = 1 Then MsgBox($MB_SYSTEMMODAL, "Attention!", "It's working!") EndIf WEnd ExitLoop EndIf Next  
    • Ubermensch
      By Ubermensch
      Hello guys,
      I am new here in our forum. I do have a little knowledge about AutoIt. I hope you could assist me. 
      I am currently working on a project. I want to try to create an automated time tracking tool.
      This is how I want to function our time tracking tool.
      Start time when the IE "get" button  is clicked. End time when either "Next Step", "Save" or "Cancel" button is clicked. All the values in the available fields will be stored in an Excel I already have codes for the time tracking part, unfortunately, I cannot proceed since I am encountering an error for detecting the buttons in IE.
      Here is my initial code for detecting the IE button.
      #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html") Local $oLastName = _IEFormElementGetObjByName($oIE, "Text4") Local $oGetItem = _IEFormElementGetObjByName($oIE, "getitem") _IELoadWait($oIE) _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) Here is the console output.
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.au3" /UserParams +>23:22:20 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\april\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\april\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.au3 +>23:22:20 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.) --> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType () --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEFormElementGetValue, $_IESTATUS_InvalidDataType +>23:22:23 AutoIt3.exe ended.rc:0 +>23:22:23 AutoIt3Wrapper Finished. >Exit code: 0 Time: 3.105 Here are the errors.
      --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.)
      --> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
      --> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
      --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType ()
      --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType
      --> IE.au3 T3.0-2 Error from function _IEFormElementGetValue, $_IESTATUS_InvalidDataType
      And here is my HTML code.
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled 1</title> <style type="text/css"> .style1 { text-align: left; } .style3 { font-family: Arial; font-size: 9pt; color: #CC00FF; margin: 0; padding: 0; } .style4 { font-family: Arial; } .style5 { font-size: 9pt; } .style6 { color: #CC00FF; } .style7 { background-color: #FF9999; } .style8 { font-family: Arial; font-size: 7pt; color: #CC00FF; } .style9 { font-size: 7pt; } .style10 { border: 2px solid #CC00FF; } .style11 { text-align: center; } .style12 { border: 1px solid #CC00FF; } .style13{ clear: both; width: 525px; height: 45px; background: url(file:///C:/Users/april/Documents/JRB/AutoIt/AutoBOT/AWD10/lockedby.png) no-repeat; margin: 0; padding: 0; list-style: none; } .style14{ float: right; margin: 0px 0px 0 0; width: 290px; height: 25px; } .style15{ float: left; margin: 0px 0px 0 0; width: 290px; height: 25px; } .style16 { font-family: Arial; font-size: 2.5pt; color: #CC00FF; margin: 0; padding: 0; } .style17 { font-family: Arial; font-size: 7pt; color: #CC00FF; margin: 0; padding: 0; } .style18 { border-color: transparent; border: none; background-color:transparent; font-family: Arial; font-size: 8pt; } </style> </head> <body> <input type="button" name="getitem" value="get" onclick=" document.getElementById('filename').value = 'Life - ' + Random() + ' INVESTTAUTH - Process - Updateable - Assigned To: Jejeje - Create Date/Time: 2017-05-26-11.12.45.109044 - POL: 046054173 - TYPE: POLICY - SLA: 06/05/2017 ADMIN SYS: VP -PLC: 14' document.getElementById('businessarea').value = 'BusinessArea' + Random() document.getElementById('worktype').value = 'Worktype' + Random() "/><br/> <table style="width: 25%" align="center" class="style10"> <tr> <td style="width: 525px"> <img src="C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\openitems.png" width="525px" height="28" /><br /> <div class="style13" style="height: 28px; width: 514px;"> <div class="style14" style="height: 11px; width: 110px;"> <label id="username"><span class="style16">&nbsp;</span><span class="style3"><br /> </span><span class="style17"> <script type="text/javascript"> var WinNetwork = new ActiveXObject("WScript.Network"); document.write(WinNetwork.UserName); </script> </span> </label> </div> <div class="style14" style="height: 11px; width: 52px;"> <label id="Label4"><span class="style16">&nbsp;</span><span class="style3"><br /> </span><span class="style17">Locked by </span> </label> </div> <div class="style15" style="height: 11px; width: 351px;"> <form method="post" id="openfile" class="style15" style="width: 341px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="file" id="filename" class="style18" type="text" style="width: 200px; height: 10px" /></div> </form> </div> <label id="Label3"><span class="style3"><br/> &nbsp; </span><span class="style8"><strong>&nbsp;LTC Claims Indexing Form</strong></span><span class="style3"><br /> <br/> </span></label> <form method="post" id="formawddata" style="width: 495px"> <fieldset name="Group1" style="width: 495px" class="style12"> <legend class="style8"><strong>AWD Data</strong></legend> <table style="width: 100%"> <tr> <td style="width: 86px" class="style3">&nbsp;&nbsp;&nbsp;&nbsp; <span class="style9">Business Area:</span></td> <td style="width: 144px" class="style8"><input name="Text4" id="businessarea" class="style18" type="text" /></td> <td style="width: 45px" class="style8">Worktype:</td> <td class="style8"><input name="Text5" id="worktype" class="style18" type="text" /></td> </tr> </table> </fieldset><br /> </form> <form method="post" id="doc" style="width: 495px"> <fieldset name="Group1" style="width: 495px; height : 55px;" class="style12"> <legend class="style8"><strong>Document Data</strong></legend> &nbsp;&nbsp;&nbsp; <span class="style8">Document Type</span><br /> &nbsp;&nbsp;&nbsp; <span class="style4"><span class="style9"> <select name="Select1" id="documenttype" style="width: 363px"> <option></option> <option value="Doc1">Doc1</option> <option value="Doc2">Doc2</option> <option value="Doc3">Doc3</option> <option value="Doc4">Doc4</option> <option value="Doc5">Doc5</option> <option value="Doc6">Doc6</option> <option value="Doc7">Doc7</option> <option value="Doc8">Doc8</option> <option value="Doc9">Doc9</option> <option value="Doc10">Doc10</option> <option value="Doc11">Doc11</option> <option value="Doc12">Doc12</option> <option value="Doc13">Doc13</option> <option value="Doc14">Doc14</option> <option value="Doc15">Doc15</option> <option value="Doc16">Doc16</option> <option value="Doc17">Doc17</option> <option value="Doc18">Doc18</option> <option value="Doc19">Doc19</option> <option value="Doc20">Doc20</option> </select></span></span></fieldset><br /> </form> <form method="post" id="myForm"style="width: 495px; height: 103px;"> <fieldset name="Group1" style="width: 495px; height: 95px;" class="style12"> <legend class="style8"><strong>Policy Data</strong></legend> &nbsp;&nbsp;&nbsp; <span class="style8">Claim Number&nbsp;</span><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="style8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Policy Number/LTC ID</span><br /> &nbsp;&nbsp;&nbsp; <input name="Text1" id="claimnumber" type="text" style="width: 153px" class="style7" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="Text2" id="policynumber"type="text" style="width: 152px" class="style7" /><br /> &nbsp;&nbsp;&nbsp; <span class="style8">Company Code</span><br /> &nbsp;&nbsp;&nbsp; <span class="style7"> <span class="style4"><span class="style9"> <select name="Select2" id="companycode" style="width: 157px"> <option></option> <option value="CC00001">CC00001</option> <option value="CC00002">CC00002</option> <option value="CC00003">CC00003</option> <option value="CC00004">CC00004</option> <option value="CC00005">CC00005</option> <option value="CC00006">CC00006</option> <option value="CC00007">CC00007</option> <option value="CC00008">CC00008</option> <option value="CC00009">CC00009</option> <option value="CC000010">CC000011</option> <option value="CC000011">CC000011</option> <option value="CC000012">CC000012</option> <option value="CC000013">CC000013</option> <option value="CC000014">CC000014</option> <option value="CC000015">CC000015</option> <option value="CC000016">CC000016</option> <option value="CC000017">CC000017</option> <option value="CC000018">CC000018</option> <option value="CC000019">CC000019</option> <option value="CC000020">Doc20</option> </select></span></span></span></fieldset></form><table style="width: 95%; height: 114px;"> <tr> <td style="height: 23px; width: 212px;" class="style1"> <form method="post" style="width: 173px" > <fieldset name="Group1" style="width: 175px; height: 64px;" class="style12"> <legend class="style8"><strong>Routing</strong></legend> &nbsp;&nbsp;&nbsp; <span class="style4"><span class="style6"> <span class="style5"><span class="style9"> <input name="Radio1" type="radio" checked="checked" value="1" /></span></span><span class="style9">Indexed<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="style5"><span class="style9"> <input name="Radio1" type="radio" value="2" /> Reroute</span></span></span></span></fieldset></form></td> <td style="height: 23px"> <span class="style8">AWD Comments</span> <form method="post" id="awdcomments" style="width: 278px; height: 47px"> <textarea name="TextArea1" style="width: 273px; height: 59px" cols="20" class="style7"></textarea></form><br /> </td> </tr> </table> <br /> <div class="style11"> <input name="button1" type="button" onclick="myFunction()" value="Next Step"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <input name="button2" type="button" onclick="myFunction()" value="Save" style="width: 91px"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="button3" type="button" onclick="myFunction()" value="Cancel" style="width: 94px"/> <script> function myFunction() { document.getElementById("doc").reset(); document.getElementById("myForm").reset(); document.getElementById("awdcomments").reset(); document.getElementById("formawddata").reset(); document.getElementById("openfile").reset(); document.getElementById("businessarea").reset(); document.getElementById("worktype").reset(); document.getElementById("documenttype").reset(); document.getElementById("policynumber").reset(); document.getElementById("companycode").reset(); document.getElementById("claimnumber").reset(); document.getElementById("Label4").reset(); } </script> <script type="text/javascript"> function Random() { return Math.floor(Math.random() * 10000000); } </script> <br /> <br /> </div> </td> </tr> </table> <p> &nbsp;</p> &nbsp; </body> </html> I hope you could assist me. Thank you in advance!
    • Ubermensch
      By Ubermensch
      Hello,
      I am currently trying to automatically click the "Yes" button in the ActiveX prompt/popup message after opening the IE (html).
      At 1st, I encounter the "Allow Blocked Content". I already resolve it just by changing settings in the IE Options. But after resolving the "Allow Blocked Content", there's a popup message appear.
      I have attached the ActiveX Prompt.
      Here is the 1st code that I try to use.
      #include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) AdlibRegister("_ActiveXRun",250) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) Func _ActiveXRun() $retWin = WinGetHandle("[Class:Button]","") $winTitle = "[HANDLE:" & $retWin &"]" $ctrlHandle = ControlGetHandle($winTitle,"", "[CLASS:Button; INSTANCE:2]") $ctrlTitle = "HANDLE:" & $ctrlHandle &"]" WinWaitActive($ctrlTitle,"[CLASS:Button; INSTANCE:2]",10) $k = ControlGetPos($winTitle, "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] WinActivate ($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?") ControlFocus($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?","[CLASS:Button; INSTANCE:2]") ControlClick($winTitle, "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) ControlSend($winTitle, "", "[CLASS:Button; INSTANCE:2]", "{ENTER}", 0) EndFunc Here is the console output.
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" /UserParams +>12:44:11 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\april\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\april\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3 +>12:44:11 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" (31) : ==> Subscript used on non-accessible variable.: $x = $k[0] $x = $k^ ERROR ->12:44:24 AutoIt3.exe ended.rc:1 +>12:44:24 AutoIt3Wrapper Finished. >Exit code: 1 Time: 13.76 I also tried a simpler code.
      include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) $k = ControlGetPos("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] ControlClick("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) There's no error in the console output for the 2nd code I have tried.
      And here is the Window Info for the ActiveX prompt.
      >>>> Window <<<< Title: Internet Explorer Class: #32770 Position: 580, 338 Size: 376, 146 Style: 0x94C808C4 ExStyle: 0x00010101 Handle: 0x00000000001516FA >>>> Control <<<< Class: Button Instance: 2 ClassnameNN: Button2 Name: Advanced (Class): [CLASS:Button; INSTANCE:2] ID: 1 Text: &Yes Position: 184, 77 Size: 80, 22 ControlClick Coords: 37, 12 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x00000000001215DE >>>> Mouse <<<< Position: 228, 120 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &No An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction? &Yes >>>> Hidden Text <<<<  

    • ChipConnJohn
      By ChipConnJohn
      Hello all,
      Here's a cleaned up version of my code:
      #include <IE.au3>
      #include <MsgBoxConstants.au3>
      #include <Array.au3>
      #include <String.au3>
      ;#include <ErrorHandler.au3>
      ; Open Greatsite.com
      Global $oIE = _IECreate ("http://www.greatsite.com")
      ; I'm logged in and on the forum page.  Now to navigate categories with unknown names.
      ; Grab all links on page, then only dive into the ones with the text "forum_id="
      ; as in ?bview=forum&forum_id=108343
      Global $oLinksCategoryPage = _IELinkGetCollection($oIE)
      Local $iNumLinks = @extended
              ;Now at the thread level. Navigate into each thread and look at timestamp
              Global $oLinksOfThreads = _IELinkGetCollection($oIE)
              For $oLinkThread In $oLinksOfThreads
                  If StringInStr($oLinkThread.href,"thread_id") Then
                      _IENavigate($oIE, $oLinkThread.href)
                      ;Need to find instance of Posted and read text after the href.
                      Local $sBodyText = _IEBodyReadText($oIE)
                      ;Find first instance of the word "Posted" and check the two words to the right of it.
                      Local $aArrayOfBodyText = _StringExplode($sBodyText," ",0)
                      ;_ArrayDisplay($aArrayOfBodyText, "The body text in Array form")
                      ;Local $iIndexOfPosted = _ArraySearch($aArrayOfBodyText,"days")
                      For $iIndex = 0 to ubound($aArrayOfBodyText) - 1
                          If StringInStr(StringLower($aArrayOfBodyText[$iIndex]), "posted") Then
                              ;The word Posted has been found. Look for "Just A moment ago", "minutes", and "minute"
                              Select
                                  Case StringLower($aArrayOfBodyText[$iIndex +1]) = "just"
                                      ;"Just a moment ago.  Grab this one.
                                  Case Stringlower($aArrayOfBodyText[$iIndex +2]) = "minute"
                                      ;"1 minute". Grab this one
                                  Case Stringlower($aArrayOfBodyText[$iIndex +2]) = "minutes"
                                      ;"x minutes. Grab this one
                              EndSelect
                              ;ExitLoop ;Found the first one.  I'm done.
                          EndIf
                      ;Need to back out to Threads in Category
                      Next
                      _IEAction($oIE,"back")
                  EndIf
              Next
              ;Back out to Category List
              _IEAction($oIE,"back")
          EndIf
      Next
      _IEQuit($oIE)
       
      The script works fine until I hit the Next to go back to the For $oLinkThread In $oLinksOfThreads.  Any line that I put after that crashes with an error.  It's like the For loop is going one too many iterations and there is no object in the variable.
      The requested action with this object has failed.:
      If StringInStr($oLinkThread.href,"thread_id") Then
      If StringInStr($oLinkThread^ ERROR
      Thanks,
      -John