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 


Easy Create Directory (Quiet).

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed Jan 25, 2017 1:53 pm    Post subject: Easy Create Directory (Quiet). Reply with quote

Some credit goes to panraven here for figuring out how to write a shellexecute to create a directory quietly.
All I did was write a simple usage script that is exposed in Cheat Engine as....


createDir(folderpath,newfoldername,openfolder,wait)

Usage is pretty straight forward.

folderpath: the folder you wish to make a directory in
newfoldername: new folder(s) name(s)
openfolder: a true or false statement to open folder after creation
wait: true will delay CE thread so folder can be written to immediatley with next line
return: provides full path


Code:

--example:
create Multiple folders by seperating new folder with "\\"
local FP = [[C:\]]
createDir(FP,'Frodo\\Baggings')


Code:

D = createDir("C:\\Frodo\\Baggins",'Bilbo')
print(D) ---> will return full path(new folder included) --C:\Frodo\Baggins\Bilbo


wait example:
Code:

local FP = [[C:\]]
A = createDir(FP,'Bilbo\\Baggings',true,*false*)  ------ Remove (*)'s to run


local f = io.open(A.."\\Hobbit.txt",'w')
f:write("Its a Book   "..A.."\n")
f:close()

file write will FAIL but will not give pause to main CE thread.






Maybe thr is a betterway to write this thts faster and doesnt require a faux(wait). I am open to suggestion but this works rather well.



Quiet Create Directory.lua
 Description:

Download
 Filename:  Quiet Create Directory.lua
 Filesize:  1009 Bytes
 Downloaded:  1230 Time(s)


_________________
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Jan 25, 2017 6:33 pm    Post subject: Reply with quote

Code:
local path = "D:\\zanzer"
os.execute("mkdir "..path)
shellExecute(path)
local f = io.open(path.."\\zanzer.txt", "w+")
f:write("zanzer!")
f:close()
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 Extensions 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