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 


[HELP] Script - Value to file .txt?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Nickylink
How do I cheat?
Reputation: 0

Joined: 23 Jun 2020
Posts: 2

PostPosted: Tue Jun 23, 2020 8:52 pm    Post subject: [HELP] Script - Value to file .txt? Reply with quote

Hey, does anyone help me with this script?
I want this value to automatically update to a .txt file.

Code:

{$lua}
if syntaxcheck then return end
[ENABLE]
a = true
while a
of
   output = io.open ("C: / Users / ericf / Documents / My Cheat Tables / Export Text / Boost.txt", "w")
   output: write (readInteger ("1C77D366418"))
   output: write ("\ n")
   output: close ()
end
[DISABBLE]


This worked once (updated the value only once), but now it just doesn't inject.

- What is wrong?
- Can I do this with a pointer?
- How did I loop this action?

sry bad english and script Confused



Screenshot_1.png
 Description:
 Filesize:  1.56 MB
 Viewed:  2759 Time(s)

Screenshot_1.png


Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 0

Joined: 03 May 2020
Posts: 49

PostPosted: Tue Jun 23, 2020 11:42 pm    Post subject: Re: [HELP] Script - Value to file .txt? Reply with quote

Don't write an endless loop in the main thread
Code:

{$lua}
if syntaxcheck then return end
[ENABLE]
function writefile(path, content)
      local file = io.open(path,"w+b")
      if file then
        file:write(content)
        file:close()
        return true
      else
        return false
      end
end
Timer=createTimer(MainForm)
Timer.Interval=100
Timer.OnTimer= function(timer)
writefile('C:/Users/ericf/Documents/My Cheat Tables /Export Text/Boost.txt',readInteger ("1C77D366418")..'\n')
end
[DISABLE]
Timer.Enabled=false
Timer.destroy()
Back to top
View user's profile Send private message
Nickylink
How do I cheat?
Reputation: 0

Joined: 23 Jun 2020
Posts: 2

PostPosted: Wed Jun 24, 2020 1:52 pm    Post subject: Reply with quote

Wow that works! thank you, i appreciate it!
Back to top
View user's profile Send private message
Quarter187
Newbie cheater
Reputation: 0

Joined: 13 Aug 2022
Posts: 13

PostPosted: Wed Aug 17, 2022 12:11 pm    Post subject: Re: [HELP] Script - Value to file .txt? Reply with quote

blankTM wrote:
Don't write an endless loop in the main thread
Code:

{$lua}
if syntaxcheck then return end
[ENABLE]
function writefile(path, content)
      local file = io.open(path,"w+b")
      if file then
        file:write(content)
        file:close()
        return true
      else
        return false
      end
end
Timer=createTimer(MainForm)
Timer.Interval=100
Timer.OnTimer= function(timer)
writefile('C:/Users/ericf/Documents/My Cheat Tables /Export Text/Boost.txt',readInteger ("1C77D366418")..'\n')
end
[DISABLE]
Timer.Enabled=false
Timer.destroy()


How would you reverse this action and write the value in the text file to a new address?
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