UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 25 Mar 2013 06:30 PM |
What would you recommend using to run a Lua file? I have this really simple code: os.execute("C:\\Program Files (x86)\\World of Warcraft\\World of Warcraft Launcher") And I have no idea how to actually run it. In fact I'm so sheltered to RBX.lua I don't even know if that code is right. Please though, bear with me. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
| |
|
|
| 26 Mar 2013 03:23 AM |
| Get luaforwindows. It just doesn't have the ability to run Lua, but over 20 useful pre-installed libraries that include openGL and classes. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 26 Mar 2013 05:02 AM |
Get ROBLOX's version of Lua (since they, you know, kinda killed it in 5.2.1), open the command line and run that command of yours, or just drag it on to the Lua interpreter?
I'm not quite sure what you're trying to do..............make bots with warcraft launcher? wut. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 26 Mar 2013 06:46 AM |
| I got Luaforwindows and it's great. |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2013 06:59 AM |
| If I recall correctly, Lua has a function "dofile" that runs code from files. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 26 Mar 2013 07:02 AM |
I know. But I wan't to launch my WorldOFWarcraft. I'm having the problem because apparently 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
help |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2013 09:49 AM |
| os.execute("start C:\\Program Files (x86)\\World of Warcraft\\World of Warcraft Launcher") |
|
|
| Report Abuse |
|
|
TeamDman
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 897 |
|
|
| 26 Mar 2013 02:15 PM |
| os.execute("start \"C:\Program Files (x86)\World of Warcraft\World of Warcraft Launcher\"") |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
| |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 26 Mar 2013 04:39 PM |
The \ character in Lua is the escape character, so when using filepaths you need to double it to 'escape' the 'escape character', in turn making the string seem like it has a \ in it.
AKA:
Text file: \
is equal to
Lua: \\ |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2013 04:53 PM |
| Digpoe you are correct, but the os.execute argument is ran in cmd, so shouldn't it use the one slash? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 26 Mar 2013 05:08 PM |
No.
os.execute() is a Lua command, which is ran in the Lua interpreter. NOT cmd.exe |
|
|
| Report Abuse |
|
|