slloyd Posted June 20, 2005 Posted June 20, 2005 Is there a way to #include files or functions at runtime. Something like the following: <code> InetGet("http://myserver.com/au3.pl", "c:\mytest.au3", 1) #include "c:\mytest.au3" </code> Basgetti.comSoftware worth donating to ...
Developers Jos Posted June 20, 2005 Developers Posted June 20, 2005 slloyd said: Is there a way to #include files or functions at runtime. Something like the following:<code>InetGet("http://myserver.com/au3.pl", "c:\mytest.au3", 1)#include "c:\mytest.au3"</code><{POST_SNAPBACK}>#include is a compiler directive which causes the #include(d) files to be added to the Compiled Script at aut2exe time.... 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.
slloyd Posted June 20, 2005 Author Posted June 20, 2005 Understood. So is there any other way to accomplish this?For instance, in Perl, I can eval code at runtime.Thanks. JdeB said: #include is a compiler directive which causes the #include(d) files to be added to the Compiled Script at aut2exe time....<{POST_SNAPBACK}> Basgetti.comSoftware worth donating to ...
w0uter Posted June 20, 2005 Posted June 20, 2005 you could make it an exe. if needed it gets downloaded and it can parse variables through the parameters. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
slloyd Posted June 21, 2005 Author Posted June 21, 2005 I do not quite understand how making it an exe will help. Can you give me an example of how this would help? w0uter said: you could make it an exe.if needed it gets downloaded and it can parse variables through the parameters.<{POST_SNAPBACK}> Basgetti.comSoftware worth donating to ...
MSLx Fanboy Posted June 21, 2005 Posted June 21, 2005 (edited) I think he means InetGet() an exe on the server, then Run() the exe What you could do is if you need the script itself (not the compiled version), make two scripts. The first one will InetGet() the file you want, and then call the second one, which can have the #include<>, as the file is already residing locally. Edited June 21, 2005 by MSLx Fanboy Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
slloyd Posted June 21, 2005 Author Posted June 21, 2005 This is what I ended up doing (two scripts - the first one downloads the script and saves it as a local file, then calls the other (non-compiled script) that has the downloaded file as an include.This is a workaround but it sounds like AutoIT does NOT support run-time script evaluation like Perl and VBScript. This would be a very nice enhancement.Even the workaround only works if the second script is not compiled. I was hoping I could compile an exe that would download code from a database and execute the scripted code as AutoIT script.Steve MSLx Fanboy said: I think he meansInetGet() an exe on the server, thenRun() the exeWhat you could do is if you need the script itself (not the compiled version), make two scripts. The first one will InetGet() the file you want, and then call the second one, which can have the #include<>, as the file is already residing locally.<{POST_SNAPBACK}> Basgetti.comSoftware worth donating to ...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now