Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


shellExecute with .exe arguments

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions -> Guests
View previous topic :: View next topic  
Author Message
jeff.artik
Guest





PostPosted: Sat Jun 10, 2017 12:29 pm    Post subject: shellExecute with .exe arguments Reply with quote

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: 136

Joined: 25 Jan 2006
Posts: 7195
Location: 127.0.0.1

PostPosted: Sat Jun 10, 2017 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Guest






PostPosted: Sun Jun 11, 2017 4:22 am    Post subject: Reply with quote

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 ! Smile

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: 136

Joined: 25 Jan 2006
Posts: 7195
Location: 127.0.0.1

PostPosted: Sun Jun 11, 2017 1:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions -> Guests All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites