View previous topic :: View next topic |
Author |
Message |
jeff.artik Guest
|
Posted: Sat Jun 10, 2017 12:29 pm Post subject: shellExecute with .exe arguments |
|
|
Hi! I'm facing an issue i can't solve. I want to launch using LUA my CEMU.exe with some arguments.
I have in the LUA script:
Quote: | shellExecute('C:\Emus\Cemu latest\Cemu.exe') |
But I need to launch it with these args (that I use in my windows shortcut):
Quote: | "C:\Emus\Cemu latest\Cemu.exe" -g "C:\Emus\Cemu latest\GAMES\Zelda BotW\code\U-King.rpx" -f |
Anyone knows how to add this in my LUA script ?
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Sat Jun 10, 2017 7:31 pm Post subject: |
|
|
Cheat Engine 6.7 (not sure when it was added specifically) allows you to pass parameters to shellExecute along with the folder to execute within. It takes upto 3 parameters, only the command being the required one.
Code: | shellExecute(command, parameters, folderpath) |
So something like this should work:
Code: | shellExecute('C:\Emus\Cemu latest\Cemu.exe', '-g "C:\Emus\Cemu latest\GAMES\Zelda BotW\code\U-King.rpx"'); |
_________________
- Retired. |
|
Back to top |
|
|
Guest
|
Posted: Sun Jun 11, 2017 4:22 am Post subject: |
|
|
atom0s wrote: | Cheat Engine 6.7 (not sure when it was added specifically) allows you to pass parameters to shellExecute along with the folder to execute within. It takes upto 3 parameters, only the command being the required one.
Code: | shellExecute(command, parameters, folderpath) |
So something like this should work:
Code: | shellExecute('C:\Emus\Cemu latest\Cemu.exe', '-g "C:\Emus\Cemu latest\GAMES\Zelda BotW\code\U-King.rpx"'); |
|
Thanks a lot atom0s, it works! the single \ didn,'t work, but this one yes, Yeah !
shellExecute('C:\\Emus\\Cemu latest\\Cemu.exe', '-f -g "C:\\Emus\\Cemu latest\\GAMES\\Zelda BotW\\code\\U-King.rpx"')
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Sun Jun 11, 2017 1:13 pm Post subject: |
|
|
Oops that was my fault, forgot to switch them to double-slashes. If you use a single slash it is considered an 'escape' and tries to use the next character after the slash as a certain escape code.
For example:
\n = new line
\r = line return
\t = tab
and so on.
_________________
- Retired. |
|
Back to top |
|
|
|