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 


[Solved]How to launch a game with OpenDialog?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Alice0725
Expert Cheater
Reputation: 11

Joined: 24 Jul 2012
Posts: 145

PostPosted: Thu Aug 02, 2012 7:16 pm    Post subject: [Solved]How to launch a game with OpenDialog? Reply with quote

Target: When I click on an image , an OpenFileDialog shows, then I can locate "game.exe" and run it.

ex.TCEOpenDialog Names "CEOpenDialogLauncher".
Like this ?
Code:

function onImageClick(sender)
  openDialog_execute("CEOpenDialogLauncher")
end

It does not work. Please Help me:
1. How to show the Open File Dialog?
2. How to exeute "game.exe" from that dialog?


Last edited by Alice0725 on Thu Aug 02, 2012 10:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu Aug 02, 2012 9:31 pm    Post subject: Reply with quote

You open the openfile dialog by executing this code:
Code:

pathtofile=openDialog_execute(Formname_CEOpenDialogLauncher)

where formname is the name of the form the dialog object is part of

When that has been executed, and the user did not click cancel but actually selected a file to launch, "pathtofile" will contain the full path to that file.

You can then use shellExecute or one of the lua/os native calls to launch it.
example:
Code:

shellExecute(pathtofile)

_________________
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
Alice0725
Expert Cheater
Reputation: 11

Joined: 24 Jul 2012
Posts: 145

PostPosted: Thu Aug 02, 2012 10:09 pm    Post subject: Reply with quote

Dark Byte wrote:
You open the openfile dialog by executing this code:
Code:

pathtofile=openDialog_execute(Formname_CEOpenDialogLauncher)

where formname is the name of the form the dialog object is part of

When that has been executed, and the user did not click cancel but actually selected a file to launch, "pathtofile" will contain the full path to that file.

You can then use shellExecute or one of the lua/os native calls to launch it.
example:
Code:

shellExecute(pathtofile)

Very Happy Thanks!
Back to top
View user's profile Send private message
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