I'm struggling with another problem. The main idea is to have program that will automate some tasks and among others let user to create his own simple scripts. We've got main gui in which there will be Edit gui control type in which user will be able to write simple scripts using few, predefined functions (with up to lets say 5 parameters) and basic expressions (if, elseif, else, while), just like in this example:
Code: Select all
delay_random(500)
use(pos_x, pos_y)
go("up", 5)
if (param1 < 5){
goto(label1)
}
else{
pause()
playsound(beep.mp3)
}
1. Should I make some kind of text interpreter for it?
2. Or maybe easier will be to attach ahk2exe compiler to the program files (however I'm afraid it might cause some false positives on most of the anti-viruses softwares). This way seems to be the easiest for me, but assuming each user can create for example 30 different little-scripts there will be 30 another exe files that after compiling that will weight over 50MB which is not a problem in fact but looks not nicely for me.
3. Also saw that there were some libraries on ahk forum for the lua interpreter - maybe thats the way to go?
How would you solve it? What's the method with most advantages in this case?