59FIFTY Posted January 15, 2007 Posted January 15, 2007 I have a host process which should run .au3 files. The problem is that the .au3 files are made by the user and can contain certain errors which could corrupt the host process. So I decided to create a dedicated execute process which runs the .au3 files, that also works fine, but if i want to pass data between the host process and the .au3 file I'm running into problems.I can pass data to the execute process, but not to the .au3 file. I tried to dynamicly include the .au3 file from the execute process by using Execute but that doesn't work. I know that I can pass data from the host to the execute and then to the .au3 file, but I don't want that, since the user should not include any functions or data to read from the STDIN in his own .au3 file.Here's a little overview what the script should do:1. host process generates $dataX = 1 2. host process runs execute process by using Run() and pass $dataX by using StdinWrite() 3. execute process parse $dataX by using ConsoleRead() 4. execute process generates Global variable $dataX 5. execute process dynamicly includes au3 file 6. au3 file has access to all functions and global variables of execute process 7. au3 file outputs $dataX by using ConsoleWrite()Step 1 to 4 works fine, but I dont know how to make an enviroment for the .au3 file to provide access to all functions and variables of the execute process.
jvanegmond Posted January 15, 2007 Posted January 15, 2007 You can only dynamically include a file when user has AutoIt installed, and still then your script needs to be closed and run again. Dynamically including inside a Exe file is impossible, I've tried it. github.com/jvanegmond
59FIFTY Posted January 15, 2007 Author Posted January 15, 2007 (edited) I thought that... but how can I create a "virtual" environment for the au3 file to run in? The only idea that works is this: create a temporary au3 file containing all the data to be set for the au3 file and include the au3 file at the end, then execute the temp au3 file from the host process by using run. The drawback is that I have to write a tempfile for every execution, which can cause a lot of performance problems, but is the only method that works I guess? Edited January 15, 2007 by 59FIFTY
jvanegmond Posted January 15, 2007 Posted January 15, 2007 Basically, yes. For a script that would dynamically include things, I had included the compiler with the scripts. I used the compiler to create new executables and that way 'dynamically include' scripts. That might be an option for you. github.com/jvanegmond
59FIFTY Posted January 15, 2007 Author Posted January 15, 2007 It works no with that temproary method. Yout method is good as well, but one drawback is still there, in both methods, what can you do about errors? Can you precheck the script with the compiler if there is any error? Or how can i supress errors from the script so they don't show up in a message box?
ptrex Posted January 15, 2007 Posted January 15, 2007 @59FIFTYI am not sure what you are trying to accomplish. But maybe my last experiment can give you some solution to do some dynamic stuff.Creating COM objects without a need of DLL'sI hope it can help at least to get you going.Regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
59FIFTY Posted January 17, 2007 Author Posted January 17, 2007 @ptrex Your dynamic COM Objects are great, but doesn't solve my problen, in fact my problem has vanished into thin air I got it to work. I have a now a host process which runs an executable process which also includes a temporary created au3 file. This way you can mess up the au3 file without corrupting the host process.
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