Jump to content
TouchOdeath

3.3.14.2 AU3stripper IE.au3 Objevent unsolvable func ERR

Recommended Posts

TouchOdeath
#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
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
TouchOdeath

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

Share this post


Link to post
Share on other sites
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
TouchOdeath

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
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
TouchOdeath

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
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
UEZ

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
TouchOdeath

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
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
Jos

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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
TouchOdeath

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

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
TouchOdeath

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
mLipok

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 UDF * 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 * Good coding practices in AutoIt * 

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: 2018-03-17

Share this post


Link to post
Share on other sites
TouchOdeath

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
Jos

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                                How to post scriptsource        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

    • MakzNovice
      By MakzNovice
      Hello Experts,
      I am working on modifying table data of a browser currently in IE (soon in FF)
      My sequence of operations:
      1. Activate Browser
      2. Get Browser table
      3. Modify data  in table
      4. Suppress any warning/error message from webpage
      5. Activate the Webpage again 
      6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5})
       
      My problem is at Step 5, as it activates the wrong window ( last used application rather than my browser window)
      My code snippet for it as follows
      $bFoundWindow = False Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]") Local $hWND = 0 For $i = 1 To $aList[0][0] If False = $bFoundWindow And $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 1) Then WinActivate($aList[$i][1]) ; 1. Activate Browser window WinSetState ( $aList[$i][1], "", @SW_MAXIMIZE) $hWND = $aList[$i][1] $objEditIE = _IEAttach ($aList[$i][1], "hwnd") $oTitles = _IETagNameGetCollection($objEditIE, "TITLE") For $oTitle In $oTitles $sTitle = $oTitle.innerText If $sTitle = $searchString Then MsgBox(0,"APPLICATION Found", "Got Edit List Window", 1) $bFoundWindow = True ExitLoop EndIf Next EndIf Next If False = $bFoundWindow Then MsgBox(0,"Error","Please launch Edit window for updating values in Browser prior to script execution",10) Exit EndIf ; MY CODE HERE TO MODIFY TABLE ; 2. Get Browser table ; 3. Modify data  in table ; Check if message from webpage pop-up window exists if so click ok on it Local $nCounter = 0 Local $nMaxCounter = 5 while 1 If WinExists("Message from webpage","") Then ControlClick("Message from webpage","","Button1","primary",1) ;4. Suppress any warning/error message from webpage Else $nCounter = $nCounter + 1 Sleep(100) ;MsgBox(0,"Counter", $nCounter, 1) If $nCounter = $nMaxCounter Then ExitLoop EndIf WEnd ;5. Activate the Webpage again  WinActivate($hWND) ; have already tried WinActivate($aList[$i][1]) but no success ;6. Send {F11} key sequence twice to achieve some update without Updating form ( {F5}) Send("{F11}") WinActivate($hWND) ;WinActivate($aList[$i][1]) Sleep(100) Send("{F11}") Any support will be highly appreciated
    • MakzNovice
      By MakzNovice
      Hello Experts,
      I am working on custom application details of which I am unable to share.
      But here is statement of my problem, I have two IE windows one window with Title "Parent " and other with "TableEdit", but for some reason when I get WinList they are shown as 2 processes each. ( see attached image)
      Since my most important motive is to modify table data in 'TableEdit' I try to access the table in it
      My code snippet is 
      ***********************************************************************************************
      $searchString = "TableEdit"
      Local $aList = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]")
      _ArrayDisplay($aList)
      For $i = 1 To $aList[0][0]
          If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then
              ;MsgBox($MB_SYSTEMMODAL, "", "Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1])
              If 0 <> StringInStr($aList[$i][0],"TableEdit") Then
                  $objEditIE = _IEAttach ($aList[$i][1])
                  ExitLoop
              EndIf
          EndIf
      Next
      WinActivate($objEditIE)
      $oPageContentListFrame = _IEFrameGetObjByName($objEditIE, "iframe_1")
      $iNumFrames = @extended
      MsgBox(0,"Got pagecontent",@error) ; returns 3, indicating invalid data type
      MsgBox(0,"Number of Frame",$iNumFrames) ; returns 1, expected value is 1 
      ***********************************************************************************************
      and If I do code as below the return value is different
      $searchString = "TableEdit"
       $objEditIE = _IEAttach ($searchString, "title")
      WinActivate($objEditIE)
      $oPageContentListFrame = _IEFrameGetObjByName($objEditIE, "iframe_1")
      $iNumFrames = @extended
      MsgBox(0,"Got pagecontent",@error) ; returns 0
      MsgBox(0,"Number of Frame",$iNumFrames) ; returns 0. expected value is 1
      ***********************************************************************************************
      What is wrong with my code? 
      Why do I see two process each for IE for each window?
       
      WinListImage.bmp
    • Simpel
      By Simpel
      Hi,
      while debugging sometimes I need the au3 stripped script with /mo parameter, so that error lines in the error message match the script. Things I use often I put inside sendto folder (shell:sendto) so I can push my file to this with right click fast. A long time I had problems with some of my scripts stripping this way because the some paths to my script included spaces (you should not do that). But here’s my solution fixing that problem:
      Local $sPathToAU3Stripper = "" ; fill in the path here Local $sPath If $CmdLineRaw = "" Then ; you didn't do it with sendto $sPath = FileOpenDialog("Which file you want to AU3-strip?", "","AU3 (*.au3)", 3) If @error Then MsgBox(0, 'Error FileOpenDialog:', @error) Exit EndIf Else $sPath = $CMDLINE[1] EndIf Local $sPath_quoted = '"' & $sPath & '"' ShellExecuteWait($sPathToAU3Stripper, $sPath_quoted & ' /mo', "", "", @SW_HIDE) I hope someone will find it useful.
      Regards, Conrad
    • Tippex
      By Tippex
      I have a problem trying to use _IEAttach to recover control after a Windows Explorer reset (e.g. on Windows 7), since all the 
      InternetExplorer.Application objects appear to be destroyed by this event. An example of this is when a PC has some kind of fault causing a pop-up error message "Windows Explorer has stopped working". I can simulate this event by using Windows Task Manager to end the Explorer.exe process then to file, new task (run...) Explorer.exe
      After this event, _IEAttach gives an @error of: 
      7 ($_IEStatus_NoMatch) - No Match
      However, using WinList() followed by WinGetText() I can recover the URL for an IE session that has lost its 
      InternetExplorer.Application object which could be used to _IECreate a new session (the $iTryAttach fails) and WinKill() the original session but the result is a if a refresh had been done (any form entries are lost) . Unfortunately form entries do not appear as text or hidden text to Windows so I'm looking for the best way to read the contents of an Internet Explorer screen (even if just text without structure). 
      When there is no InternetExplorer.Application object (because of some Windows fault) but still with an Internet Explorer session running, I tried to read its contents by a "Select All" & "Copy to Clipboard" but its form entries are blanked and combo boxes choices are all displayed with no way of finding out which ones were selected.
      Local $ClipBoardSave = _ClipBoard_GetData() ;not ClipGet() which is text only ClipPut("") ;Clear User's Clipboard Local $sText = "" Local $hWnd = WinActivate("Window Title", "") If IsHWnd($hWnd) Then Local $bStatusCtrlSend = ControlSend("Window Title", "", "", "^a^c") If $bStatusCtrlSend Then Local $bStatusCtrlClick = ControlClick("Window Title", "", "") If $bStatusCtrlClick Then $sText = ClipGet() _ClipBoard_SetData($ClipBoardSave) ;not ClipPut($ClipBoardSave) which is text only  
      Is  there a solution to this please?
    • 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?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.