Jump to content
  • 0

How to search and edit saved values ​​in a .cfg file with the lua script


LoveGameguadian

Question

Someone please help me !!! I want to search or edit a value saved to the .cfl file from before, what should I do ???

For example :

searchNumber How To??? 

Quote

function SearchRandom()
local configFile = gg.EXT_CACHE_DIR .. "/" .. gg.getFile():match("[^/]+$") .. ".cfg"
local data = loadfile(configFile)
if data ~= nil then
  data = data()
end
local input = gg.prompt({'Please input something .'},data, {"number"})
gg.saveVariable(input, configFile)

gg.clearResults()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber("How To??? ", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local r = gg.getResults(45)
gg.removeResults(r)
gg.getResults(1)
gg.editAll("How To??? ", gg.TYPE_FLOAT)
end

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.