How to launch a program or open a folder?

Announcements, questions
Post Reply
Frostea
Posts: 1
Joined: 01 May 2019, 08:58

How to launch a program or open a folder?

Post by Frostea » 01 May 2019, 09:09

Hello, I just got this yesterday and have been having fun tinkering.

I can't figure out how to open programs. I know from the sample that lmc_spawn("calc") will open the calculator. But how do I open something like Firefox or Chrome? I've tried things like lmc_spawn("browser") and lmc_spawn("firefox") but neither worked.

On a similar note, can luamacros be used to open specific folders? For example, press a key to open the AppData\Local folder.

Thanks for any help.

admin
Site Admin
Posts: 595
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: How to launch a program or open a folder?

Post by admin » 02 May 2019, 08:07

You need to know the program (exe file) name and sometimes even path and pass it as argument to lmc_spawn (note that calculator is in fact program calc.exe).
Opening folder usually means you are in fact running windows explorer program with path to the folder as argument. Again you need to find out what is the exe file.
Petr Medek
LUAmacros author

Post Reply