Jump to content

Recommended Posts

Posted (edited)

Update: Found the answer...As far as running a single little line of code such as: MsgBox(0, "remotely read!", "hello world!")
 

Yet still haven't figured out how to run something like:
Func test()
MsgBox(0, "remotely read!", "hello world!")
EndFunc

From a remote file

#include <MsgBoxConstants.au3>
#include <INet.au3>

$HTMLSource = _INetGetSource('http://example.com/test.txt')
Execute($HTMLSource)

---

 

Edited by brutal
found solution and created more questions
Posted
23 hours ago, brutal said:

$HTMLSource = _INetGetSource('http://example.com/test.txt')
Execute($HTMLSource)

First _INetGetSource doesn't get the source of a au3 script, it gets the source of a html page.

Second Execute will not execute multiple lines of code, it is intended for a single statement 

So something along those lines would work better

InetGet ('http://example.com/test.txt', "MsgBox.au3" , options = $INET_FORCERELOAD )
RunWait (@AutoItExe & " /AutoIt3ExecuteScript  " & '"TestMsgBox.au3"')

Where TestMsgBox.au3 contains the #include <MsgBox.au3> you just downloaded

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...