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 


Store, update, publish on remote server.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1247

PostPosted: Wed Jul 26, 2023 12:32 pm    Post subject: Store, update, publish on remote server. Reply with quote

As an example, I prepared an "INFO" form.
(You can download it from the link, edit and use it.)

A form, list, table, or function...
You can call and use many things you want without bloating your existing table (Trainer) with a few lines of code.

You can also edit, update it on the remote server.

Let me remind you of some settings.
1) As I explained in detail in another topic, we will use Google documents in this topic as well.
2) Paste your code in the Google document and select "Anyone with the link can view" in the share permission section.
3) In the code below, change your link to:

copy Link;
"https://docs.google.com/document/d/1QkMgg19mw6nqBLKFm89hoqU33wEBMdcynHiokL7BJCI/edit" = export?format=txt

Edit link:
"https://docs.google.com/document/d/1QkMgg19mw6nqBLKFm89hoqU33wEBMdcynHiokL7BJCI/export?format=txt"

4) You can edit and use your link in the code below.
Code:
function loadform1()
local loaded = ""
local url = "https://docs.google.com/document/d/1QkMgg19mw6nqBLKFm89hoqU33wEBMdcynHiokL7BJCI/export?format=txt"
--VNew
 http = getInternet()
 local result = http.getURL(url)
 http.Destroy()
 sl=createStringList()
 sl.Text=result
  for i=1, sl.Count - 1 do
   loaded=loaded..sl[i].."\n"
  end
  if loaded~="" then
   load(loaded)()
  end
  sl.Destroy()
end


Here is the usage code that you can practice;
Code:
f1=createForm()
b1=createButton(f1)
b1.top=100
b1.Left=f1.Width / 2 - b1.Width / 2
b1.Caption="INFO"

function loadform1()
local loaded = ""
local url = "https://docs.google.com/document/d/1QkMgg19mw6nqBLKFm89hoqU33wEBMdcynHiokL7BJCI/export?format=txt"
--VNew
 http = getInternet()
 local result = http.getURL(url)
 http.Destroy()
 sl=createStringList()
 sl.Text=result
  for i=1, sl.Count - 1 do
   loaded=loaded..sl[i].."\n"
  end
  if loaded~="" then
   load(loaded)()
  end
  sl.Destroy()
end

b1.OnClick=loadform1


--###############################--

In addition, let me mention the "INFO" table.
You can edit the form however you want, just deal with these three tables if the GUI gives you enough visuals.

1)
Code:
listTbl1 = {"Change Hotkey Keys [WIP]",
  ...}

Put a list of all your plugins, scripts, or codes that you're going to explain in this table.
2)
Code:
titleTbl1 = {[==["This extension adds..}

Consider the order in the list table and put the comments in this table.

3)
Code:
LnkTbl1 = {[==[https://forum.cheatengine.org..}

Again, consider the list table and in the same order, put the forum link where the code is shared, if any.

4) Edit the "Autor" button, of course. I just added it as an example. Wink

If everything is done right copy all the code, open a Google Docs and paste it there, give the necessary permissions and use it. (If you have any problems, write a comment and I will try to help.)

I think there is no need to explain the working order of the INFO table. You can use the above code and test the simple example.
Also, those who have problems with this form, please let me know. (Error or Suggestion)

We have come to the end of a topic again.
Enjoy the codes until we talk about something else crazy.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites