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 


[[PLEASE HELP ME]] folder OPTIONAL.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Tue Jun 21, 2011 3:09 am    Post subject: [[PLEASE HELP ME]] folder OPTIONAL. Reply with quote

Code:
shellExecute(command, parameters OPTIONAL, folder OPTIONAL, showcommand OPTIONAL)

How do I fill 'folder OPTIONAL' by using this code:
Code:
function LaunchClick()
local filetolaunch=openDialog_execute(Trainer_OD)
if filetolaunch~='' then
local f = shellExecute(???,???,???);
end
end
Back to top
View user's profile Send private message Send e-mail Visit poster's website
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8519
Location: 127.0.0.1

PostPosted: Tue Jun 21, 2011 4:50 pm    Post subject: Reply with quote

It's an optional argument.

You can call it without passing the two last params like this:
Code:
shellExecute("C:\\somefolder\\somefile.exe");


You can also call it with the params like:
Code:
shellExecute("C:\\somefolder\\somefile.exe", "some_param");

Code:
shellExecute("C:\\somefolder\\somefile.exe", "some_param", "C:\\", SW_MINIMIZE);


If you need to only pass the first and last param, in Lua you can use an underscore to exclude a param like:
Code:
shellExecute("C:\\somefolder\\somefile.exe", _, _, SW_MINIMIZE);

_________________
- Retired.


Last edited by atom0s on Tue Jun 21, 2011 4:57 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25301
Location: The netherlands

PostPosted: Tue Jun 21, 2011 4:53 pm    Post subject: Reply with quote

you're ignoring the 'parameter' parameter, so you're passing SW_MINIMIZE to folder

as for the OP, not sure, but try cutting off the exename from the filetolaunch and give that as folder parameter (not really sure how to go about that in lua)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8519
Location: 127.0.0.1

PostPosted: Tue Jun 21, 2011 4:56 pm    Post subject: Reply with quote

Dark Byte wrote:
you're ignoring the 'parameter' parameter, so you're passing SW_MINIMIZE to folder

as for the OP, not sure, but try cutting off the exename from the filetolaunch and give that as folder parameter (not really sure how to go about that in lua)


Ah so I did lol read over it too quickly. Updated above post.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Wed Jun 22, 2011 4:05 am    Post subject: Reply with quote

In my previous post I had a problem with shellExecute code and when running game Just Cause 2, this code will cause the game is closed.
Finally, After much struggle, I finally found the problem. The problem Because of empty sections 'folder OPTIONAL' in the code 'shellExecute' occur.
Now how the following code needs to be filled by the 'folder OPTIONAL' .
Code:
function LaunchClick()
local filetolaunch=openDialog_execute(Trainer_OD)
if filetolaunch~='' then
local f = shellExecute(filetolaunch,???,???);
end
end

Please help. Crying or Very sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Shahryar
Advanced Cheater
Reputation: 0

Joined: 11 Jun 2011
Posts: 85

PostPosted: Fri Jun 24, 2011 6:34 am    Post subject: Reply with quote

Dark Byte wrote:
you're ignoring the 'parameter' parameter, so you're passing SW_MINIMIZE to folder

as for the OP, not sure, but try cutting off the exename from the filetolaunch and give that as folder parameter (not really sure how to go about that in lua)

Dark Byte How can i cutting off the exename from the filetolaunch and give that as folder parameter?
Please give me a code.


Last edited by Shahryar on Fri Jul 01, 2011 2:51 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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