Jump to content

Recommended Posts

Posted

sort of like, i put autoit code in a txt file, can a compiled autoit exe execute the code? and also, how would i go about this in a secure manner, it creates possible code injection vulnerabilities

Posted

You will need the compiler or write your own compiler.

You can make your own script with autoitscript.

So yes, it's possible.

Many times you need to think like hobby-bob:')

Posted

not what i meant, i saw another post on here some time ago asking a similar question and it got answered. at the time i didnt care but now i wanna do something with it and cant find the post LOL

Posted

What you mean then?

You want to make a kind of macro's, instead of compile it to .exe?

So in example you make a text file called "code.txt".

In "code.txt" is written "msg: hello world".

And you want to make a msgbox with "hello world" from your compiled script.

Many times you need to think like hobby-bob:')

Posted (edited)

So you will have something like this:

#include <file.au3>
Dim $aRecords
If Not _FileReadToArray("C:\code.txt",$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf
For $x = 1 to $aRecords[0]
    If StringRegExp($aRecords[$x],'(?i)MsgBox') Then
    MsgBox(0,"test","regexp true")
    EndIf
Next
Edited by Gideon

Many times you need to think like hobby-bob:')

Posted

Do you mean this?

Run("anyCompiledAutoitExe.exe  /AutoIt3ExecuteScript C:\MyAutoitScriptInATextFile.txt" )

That's a lot better:)

I'm trying to help, but not know everything, Sorry

Many times you need to think like hobby-bob:')

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...