Jump to content

[Solved] InetRead Add Function


zxtnt09
 Share

Recommended Posts

Did you insert the #pragma statement as Jos told you in post #9?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Did you do both things I mentioned in my post since I am missing the first part?

Jos

Did you insert the #pragma statement as Jos told you in post #9?

Jos sayed this : 

RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp & '"')

i use that in my script : 

#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Test", 500, 500)
GuiSetState()

Local $dData = BinaryToString(InetRead("http://example.com/my.html", 1))
$tmp = @tempdir & "\test.au3"
FileWrite($tmp, $dData)
RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp & '"')
FileDelete($tmp)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
 WEnd

now , it is work if : 

i use that without compiled, ( use my.au3 file )

=> result is : MsgBox (1,"test","test") => this MsgBox is from : http://example.com/my.html

if i compile this ( my.exe ) and run that, no result is show :(

 

Link to comment
Share on other sites

Insert the following line at the top of your script (that is what Jos mentioned in the text of post #9):

#pragma compile(AutoItExecuteAllowed, true)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Developers

Iam in general not known for length walls of words, so find it special you missed the end of the first sentence defining the first requirement! ;)

You also need to compile the script or else you obviously can't re-shell it for running your downloaded script.

Jos

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Iam in general not known for length walls of words, so find it special you missed the end of the first sentence defining the first requirement! ;)

You also need to compile the script or else you obviously can't re-shell it for running your downloaded script.

Jos

 

Insert the following line at the top of your script (that is what Jos mentioned in the text of post #9):

#pragma compile(AutoItExecuteAllowed, true)

 

Hooray!,

i love you "water" , "jos" , "mikell"

it was worked :wub:

===========================================

For other poeple : 

in this file "my.html" , we have : 

MsgBox (1,"Test","Test")

in our .au3 file's we have : 

#pragma compile(AutoItExecuteAllowed, true)
#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Test", 500, 500)
GuiSetState()

Local $dData = BinaryToString(InetRead("http://example.com/my.html", 1))
$tmp = @tempdir & "\test.au3"
FileWrite($tmp, $dData)
RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp & '"')
FileDelete($tmp)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
 WEnd

after compile that and use that on another computer,

it was get Data from "http://example.com/my.html", and show that msgbox in our script.

Thanks all:wub:

Link to comment
Share on other sites

Glad all problems could be solved :)
What should you learn from this thread? Always carefully read what Jos tells you to do! That would have saved you and us a lot of time ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Glad all problems could be solved :)
What should you learn from this thread? Always carefully read what Jos tells you to do! That would have saved you and us a lot of time ;)

yes,

1 ) i learn that : "water" & "Jos" are best in forum,

2 ) i don't carefully that because it wasn't in <Code> tag :D

3 ) i'm noob :sweating:

 

Edited by zxtnt09
is => are
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...