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 


How to open a folder and select a file?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 203

PostPosted: Thu Jun 04, 2020 10:18 pm    Post subject: How to open a folder and select a file? Reply with quote

Code:
ShellExecute("C:\\lua")
I have opened the folder. How can I select a file in it
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Thu Jun 04, 2020 11:14 pm    Post subject: Reply with quote

Use the OpenDialog instead
_________________
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


Last edited by Dark Byte on Fri Jun 05, 2020 1:25 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 203

PostPosted: Fri Jun 05, 2020 12:53 am    Post subject: Reply with quote

Dark Byte wrote:
Use the OpenFileDialog instead
I just want to select the file


select .png
 Description:
 Filesize:  13.43 KB
 Viewed:  2445 Time(s)

select .png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Fri Jun 05, 2020 1:25 am    Post subject: Reply with quote

Code:

d=createOpenDialog(nil)
d.InitialDir=[[c:\windows\addins]]
if d.execute() then
  showMessage('You selected '..d.FileName)
else
  showMessage('No file selected')
end
d.destroy()

_________________
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
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 203

PostPosted: Fri Jun 05, 2020 1:38 am    Post subject: Reply with quote

Code:
ShellExecute(NULL, "open", "explorer.exe", "/select,C:\\a.txt", NULL, SW_SHOWNORMAL)
That's what I want,But this code doesn't work in the cheating engine
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Jun 05, 2020 5:22 am    Post subject: Reply with quote

If doesn't want use file dialog, then:

Code:
os.execute("explorer D:\\a.txt")

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 203

PostPosted: Fri Jun 05, 2020 6:00 am    Post subject: Reply with quote

Corroder wrote:
If doesn't want use file dialog, then:

Code:
os.execute("explorer D:\\a.txt")
NO NO,What I want is very simple. When you open a folder, you do not need to click. I want to automatically select a file by code (just select it, no need to open it)
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Jun 05, 2020 9:29 am    Post subject: Reply with quote

.lua wrote:
Code:
ShellExecute(NULL, "open", "explorer.exe", "/select,C:\\a.txt", NULL, SW_SHOWNORMAL)
That's what I want,But this code doesn't work in the cheating engine


You mean something like this in CE ?

Code:
os.execute("explorer /n, /select, C:\\a.txt")

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 203

PostPosted: Sun Jun 07, 2020 6:36 am    Post subject: Reply with quote

Corroder wrote:
You mean something like this in CE ?
You're great,that's what I want
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