micromacro

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
keongy
Posts: 4
Joined: Sat Jan 03, 2009 1:41 pm

micromacro

#1 Post by keongy » Sun Jan 04, 2009 11:02 pm

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?

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: micromacro

#2 Post by Administrator » Sun Jan 04, 2009 11:05 pm

You want to run another program from a script? Just use the os.execute() function.

Code: Select all

os.execute("explorer.exe");

keongy
Posts: 4
Joined: Sat Jan 03, 2009 1:41 pm

Re: micromacro

#3 Post by keongy » Sun Jan 04, 2009 11:10 pm

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.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: micromacro

#4 Post by Administrator » Mon Jan 05, 2009 12:11 am

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.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: micromacro

#5 Post by 3cmSailorfuku » Mon Jan 05, 2009 9:35 am

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.

crackpod
Posts: 11
Joined: Mon Dec 29, 2008 8:30 am

Re: micromacro

#6 Post by crackpod » Wed Jan 07, 2009 3:25 pm

[offtopic]Someone's here a Deadman Wonderland fan[/offtopic]

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: micromacro

#7 Post by 3cmSailorfuku » Wed Jan 07, 2009 3:35 pm

crackpod wrote:[offtopic]Someone's here a Deadman Wonderland fan[/offtopic]
Indeed ;)

keongy
Posts: 4
Joined: Sat Jan 03, 2009 1:41 pm

Re: micromacro

#8 Post by keongy » Wed Jan 07, 2009 10:21 pm

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

zer0
Posts: 213
Joined: Sat Feb 16, 2008 11:55 pm

Re: micromacro

#9 Post by zer0 » Thu Jan 08, 2009 1:45 am

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.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests