View previous topic :: View next topic |
Author |
Message |
akumakuja28 Master Cheater
Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Jan 25, 2017 7:18 am Post subject: |
|
|
Good work. Can I make a similar request?
I have this script:
Code: | function autosavenow(t)
saveTable(getCheatEngineDir().."autosave.ct")
end
autosavetimer=createTimer(nil)
timer_setInterval(autosavetimer, 1*60*1000)
timer_onTimer(autosavetimer, autosavenow)
timer_setEnabled(autosavetimer, true) |
But I'd like to be able to do the following with it:
1. Save as tablename.bak
2. Save to folder where table resides
As it is now, it saves the current table to the CE directory every 60 seconds, and every backup is called autosave.ct, regardless of the table that you're working on. Since I'm dumb with LUA, I'm not sure how to go about setting this up, or if it's even possible.
If you're not interested, I'll understand - I'll create a thread in that case.
Thanks!
|
|
Back to top |
|
 |
akumakuja28 Master Cheater
Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
Posted: Wed Jan 25, 2017 7:44 am Post subject: |
|
|
Yeah i can do tht. Getting the table name might be tricky but i think mgr already wrote a "grab" for tht.
WE can make it create a folder of the Table name too and dump all edit in there.
I can also make it scan the current table and ONLY save if differences are found.
Eitherway hit me back.
I gotta ask. Are you asking because of CE not checking if scripts have been edited on closed. If so we can tackle tht a different way.
_________________
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Jan 25, 2017 2:57 pm Post subject: |
|
|
Awesome! Thanks so much for your consideration.
Regarding the creation of a new folder, I don't think that's necessary for my needs. I simply would like to have CE write a backup of my entire table every minute or so (writing over the previous backup for the specific table that I'm working on), because sometimes CE freezes up or crashes before I remember to save my work.
So, as an example, let's say that I keep all of my cheat tables at:
"C:\Users\METHOS\Documents\My Cheat Tables"
Or, maybe somewhere else, it doesn't matter, wherever the current table that I am working on is located, that's where the backup should be created.
And...
If I am working on table awesomegame.ct, then the backup should be awesomegame.bak (or whatever readable extension, it doesn't matter). Then, if I switch out the table and start working on boringgame.ct, then a backup should start being made for that, called boringgame.bak etc..
Whether or not the backup times are every 60 seconds, or only when changes occur, that doesn't matter so much to me - either would work great, I think.
Thanks, again!
|
|
Back to top |
|
 |
jgoemat Master Cheater
Reputation: 22
Joined: 25 Sep 2011 Posts: 259
|
Posted: Wed Jun 06, 2018 3:35 pm Post subject: |
|
|
Thanks to a post I found by mgr.inz.Player, you can get the current path to your table like this:
Code: | return getMainForm().SaveDialog1.Filename |
Actually you can get the directory that a save will show as (with trailing \) with this:
Code: | return getMainForm().SaveDialog1.InitialDir |
|
|
Back to top |
|
 |
|