Page 1 of 1

micromacro

Posted: Sun Jan 04, 2009 11:02 pm
by keongy
hi ppl, i'm trying to run a .bat or .exe file in micromarco. is that even possible? if it is possible where do i actually place it in micromarco file. any help?

Re: micromacro

Posted: Sun Jan 04, 2009 11:05 pm
by Administrator
You want to run another program from a script? Just use the os.execute() function.

Code: Select all

os.execute("explorer.exe");

Re: micromacro

Posted: Sun Jan 04, 2009 11:10 pm
by keongy
because in the first place i'm using visual C and MS command line to run my program, such that it will keep repeating what I want it to do. however after sometime it just hang. i'm thinking of using micromacro to run my program, and perhpas it might not hang. but i cant seem to run it on micromacro.

Re: micromacro

Posted: Mon Jan 05, 2009 12:11 am
by Administrator
I'm not entirely sure what you're trying to do here. What is the program you're trying to launch through MicroMacro supposed to do? How do you want to launch it?

If the program you've made hangs up after some time, it is most likely due to some logic error in your code, so launching it differently won't help. Maybe I am misunderstanding the problem, though.

Re: micromacro

Posted: Mon Jan 05, 2009 9:35 am
by 3cmSailorfuku
keongy wrote:because in the first place i'm using visual C and MS command line to run my program, such that it will keep repeating what I want it to do. however after sometime it just hang. i'm thinking of using micromacro to run my program, and perhpas it might not hang. but i cant seem to run it on micromacro.
From what I just read it sounds like you wanna run your own Program from C in MicroMacro oO
Anyway... If you want to run a script in micromacro via a batch:
micromacro.exe scripts/nameofyourscript.lua

If you want to make a GUI for micromacro in C, you could use GTK or wxWidgets.

Re: micromacro

Posted: Wed Jan 07, 2009 3:25 pm
by crackpod
[offtopic]Someone's here a Deadman Wonderland fan[/offtopic]

Re: micromacro

Posted: Wed Jan 07, 2009 3:35 pm
by 3cmSailorfuku
crackpod wrote:[offtopic]Someone's here a Deadman Wonderland fan[/offtopic]
Indeed ;)

Re: micromacro

Posted: Wed Jan 07, 2009 10:21 pm
by keongy
3cmSailorfuku wrote: Anyway... If you want to run a script in micromacro via a batch:
micromacro.exe scripts/nameofyourscript.lua
does that means i need to write my own .lua script from my C script

Re: micromacro

Posted: Thu Jan 08, 2009 1:45 am
by zer0
You'd have to port all your C code into the Lua language, that's assuming that it can be done Lua, as it has some restrictions and features.

".exe", and ".bat" files can be run from Command Prompt. Just because MicroMacro looks like Command Prompt, do not confuse the two, it's just a program that uses a Command Line Interface (CLI). It needs files written in Lua, or Lua compiled into Lua Binary to run.