Jump to content

Advanced DllCall and DllStruct AutoIt Code Generator BETA v0.6


Recommended Posts

Result = Problem while creating the oIE object, check internet connection

But i have a proper connection. And IE is in my pc.

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

5 hours ago, JohnOne said:

I admire your patience, I've threatened to do this in the past, but dont have of it.

I'll certainly provide some feedback of testion when I get the time.

Thanks for share.

Thank you, I look forward to see what you think :D

2 hours ago, kcvinu said:

Result = Problem while creating the oIE object, check internet connection

But i have a proper connection. And IE is in my pc.

Oh, i cannot update the script right now, because im not home but for fast fix, you can go into parser.au3 @ line 31 you will find this

; timeout
    _IELoadWait($oIE, 1, 10000)

 

Edited by tarretarretarre
TypOSSss
Link to comment
Share on other sites

30+ downloads and no comments?

I have updated the script
 

Update 0.2

  • Fixed some minor issues
  • Added highlight for a more pleasent view (Check OT)
  • Fixed minor bugs
  • Made it run faster when working with the same URL (It dosent load the page entierly)
  • No struct search is now done when no POINTER is used in the call
  • Added more options for the user

 

/Tarre

Link to comment
Share on other sites

4 minutes ago, JohnOne said:

I have a question.

I notice the pakaged autoitobject dll files were modified less than a week ago, who modified them?

Hmm less than a week ago, that might be GIT removing CRLF when i commit, I dont use the official AO release either, the one in here is from here:

 

Link to comment
Share on other sites

9 minutes ago, JohnOne said:

"Problem while creating the oIE object, check internet connection"

Win 10 x64, this machine.

thats weird, its  only a Timeout for _ieNavigate

 

Try change line 29 @ parser.au3 to $oIE = _IECreate($sUrl, 0, $___DeveloperMode, 1)

And remove _IELoadWait($oIE, 1, 40000) @ parser.au3

I'm not close to a Win10 machine, so i cannot test this now im afraid.

 

/Tarre

Link to comment
Share on other sites

"Unable to read <pre>*</pre> from $sHTML"

--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (code)
! COM Error ! Number: 0x0, ScriptLine: 102, Reason: Variable must be of type 'Object'.
! COM Error ! Number: 0x0, ScriptLine: 125, Reason: Variable must be of type 'Object'.

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

Monkey's are, like, natures humans.

Link to comment
Share on other sites

5 minutes ago, JohnOne said:

Okay i have the same IE version,

If you run this in a new script

#include <string.au3>
#include <array.au3>
#include <ie.au3>

Local $oIE = _IECreate("https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx")
Local $sHTML = _IEBodyReadHTML($oIE)
Local $Try = _StringBetween($sHTML, "<pre>", "</pre>")

_ArrayDisplay($try)

_IEQuit($oIE)

Could you print the array?

And thank you for the input, it really helps!

Link to comment
Share on other sites

Actually I get the array intermittently.

about 50/50

EDIT:

So I've tried the code again, when it gets past the last error, next is no c++ syntax found on page.

Edited by JohnOne

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

Monkey's are, like, natures humans.

Link to comment
Share on other sites

3 minutes ago, JohnOne said:

Actually I get the array intermittently.

about 50/50

Alright, it seems like autoit tries to read the data while the page is not fully loaded.


Could you try this script and see if you get a consistant array

 

#include <string.au3>
#include <array.au3>
#include <ie.au3>

Local $oIE = _IECreate("https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx")
Local $sHTML = _IEBodyReadHTML($oIE)
Local $try

Local $timerinit = TimerInit()

Do
    ;Exit loop after 10 sec of failure
    if TimerDiff($timerinit) > 10000 Then ExitLoop
    $try = _StringBetween($sHTML, "<pre>", "</pre>")
    Sleep(100)
Until IsArray($try)

_ArrayDisplay($try)


_IEQuit($oIE)

 

Link to comment
Share on other sites

why not use InetGet ?

#include <string.au3>
#include <array.au3>

#include <InetConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>

;~ Local $oIE = _IECreate("https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx")
;~ Local $sHTML = _IEBodyReadHTML($oIE)
Local $sHTML = Example( "https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx" )
ConsoleWrite($sHTML&@CRLF)
Local $try
Local $timerinit = TimerInit()
Do
    ;Exit loop after 10 sec of failure
    if TimerDiff($timerinit) > 10000 Then ExitLoop
    $try = _StringBetween($sHTML, "<pre>", "</pre>")
    Sleep(100)
Until IsArray($try)
_ArrayDisplay($try)

Func Example($sIn)
    ; Save the downloaded file to the temporary folder.
    Local $sFilePath = _WinAPI_GetTempFileName(@TempDir)
    ; Download the file in the background with the selected option of 'force a reload from the remote site.'
    Local $hDownload = InetGet($sIn, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
    ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True.
    Do
        Sleep(250)
    Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
    ; Retrieve the number of total bytes received and the filesize.
    Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD)
    Local $iFileSize = FileGetSize($sFilePath)
    ; Close the handle returned by InetGet.
    InetClose($hDownload)
    Local $sTxt = FileRead($sFilePath)
;~     ; Display details about the total number of bytes read and the filesize.
;~     MsgBox($MB_SYSTEMMODAL, "", "The total download size: " & $iBytesSize & @CRLF & _
;~             "The total filesize: " & $iFileSize)
    ; Delete the file.
    FileDelete($sFilePath)
    Return $sTxt
EndFunc   ;==>Example

 

Edited by argumentum
show some code

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

1 minute ago, argumentum said:

why not use InetGet ?

Yeah I could, but _Ie Library should work on Win10, but if its not consistant at all, i will re-write all the _Ie elements with InetGet, but so far ive only tested on IE 9 and IE 11 on Win 7 64 bit

Link to comment
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
 Share

×
×
  • Create New...