View previous topic :: View next topic |
Author |
Message |
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Tue Jun 21, 2011 3:09 am Post subject: [[PLEASE HELP ME]] folder OPTIONAL. |
|
|
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 |
|
|
atom0s Moderator Reputation: 199
Joined: 25 Jan 2006 Posts: 8519 Location: 127.0.0.1
|
Posted: Tue Jun 21, 2011 4:50 pm Post subject: |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25301 Location: The netherlands
|
Posted: Tue Jun 21, 2011 4:53 pm Post subject: |
|
|
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 |
|
|
atom0s Moderator Reputation: 199
Joined: 25 Jan 2006 Posts: 8519 Location: 127.0.0.1
|
Posted: Tue Jun 21, 2011 4:56 pm Post subject: |
|
|
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 |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Wed Jun 22, 2011 4:05 am Post subject: |
|
|
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.
|
|
Back to top |
|
|
Shahryar Advanced Cheater Reputation: 0
Joined: 11 Jun 2011 Posts: 85
|
Posted: Fri Jun 24, 2011 6:34 am Post subject: |
|
|
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 |
|
|
|