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 


Batch

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

Joined: 30 Jan 2018
Posts: 25

PostPosted: Sun Feb 25, 2018 4:58 am    Post subject: Batch Reply with quote

I made a batch file that changes the time on your computer
Code:
@echo off
time 00:00:00
date 01/01/2018
exit

And used lua to execute it
Code:
...
elseif tonumber(memrec.value)==1 then
   shellExecute([[~path to the file~.bat]])
...

I want to make the commands already in lua so that I don't have to create a batch file on my computer.
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Feb 25, 2018 7:15 am    Post subject: Reply with quote

Sound like want to passing time trial function in an app... Razz Razz
but whatever.... try this :

Code:
function setdate()
os.execute('time 00:00:00')
os.execute('date 01/01/2018')
os.execute(exit)
end

setdate()

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

Joined: 30 Jan 2018
Posts: 25

PostPosted: Sun Feb 25, 2018 7:31 am    Post subject: Reply with quote

Nah it's for FEZ. Smile
Btw is it possible to put it together as one instead of three seperate commands?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Sun Feb 25, 2018 8:27 am    Post subject: Reply with quote

yes... os.execute (command) is similar to what you execute in system command prompt line by line. Same which batch file, but some uni code characters with can use in a batch file can not acceptable in Lua.

I am not test if put many lines as one line.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL


Last edited by Corroder on Sun Feb 25, 2018 8:31 am; edited 1 time in total
Back to top
View user's profile Send private message
Johnden
Cheater
Reputation: 0

Joined: 30 Jan 2018
Posts: 25

PostPosted: Sun Feb 25, 2018 8:30 am    Post subject: Reply with quote

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 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