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 


Possible Bug in CEOpenDialog CE 6.4

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
violaboy13
Newbie cheater
Reputation: 0

Joined: 23 Jul 2014
Posts: 11

PostPosted: Thu Jul 24, 2014 1:21 am    Post subject: Possible Bug in CEOpenDialog CE 6.4 Reply with quote

OK I've read a bunch of the posts regarding the failure of using the shellExecute command to launch a file selected using OpenDialog. Here's what's happening to me.

First, this is my simple code.

function CEButton20Click(sender)
filetolaunch=openDialog_execute(MaddenScripts_CEOpenDialog1)
print(filetolaunch) --for debugging
shellExecute(filetolaunch)
end

This code will work if I select the file I want to launch from the Dialog box, but ONLY if I click the cancel button or exit the dialog box. If I do that the program will launch.

If I click the Open button after selecting my file the code fails.
I added the print command to see what filetolaunch was returning from the OpenDialog. As it turns out, when the Open button is clicked nothing is returned to filetolaunch. Is this a bug and is there anything I can do about it to get my launch button to work correctly?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Jul 24, 2014 2:52 am    Post subject: Reply with quote

Use MaddenScripts_CEOpenDialog1.Execute()
If it returns true read out MaddenScripts_CEOpenDialog1.Filename

_________________
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
violaboy13
Newbie cheater
Reputation: 0

Joined: 23 Jul 2014
Posts: 11

PostPosted: Thu Jul 24, 2014 10:58 am    Post subject: Reply with quote

It worked!

Here was the final code:

function CEButton20Click(sender)
filename=MaddenScripts_CEOpenDialog1.Execute()
shellExecute(MaddenScripts_CEOpenDialog1.Filename)

Thanks so much
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 Lua Scripting 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