Jump to content

Question

Posted

So i this code:

local old = gg.getRanges();
  gg.setRanges(gg.REGION_CODE_APP)
  gg.searchNumber ('360', gg.TYPE_FLOAT)
  gg.searchAddress('1C4',FFF)
  v = gg.prompt({i = "[setFov]Select a Number Between 175 and 360"}, {i = "0"})
if v == nil then
  gg.clearResults()
  gg.toast("FoV Unchanged")
else
  gg.getResults (5)
  gg.editAll(v["i"], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,
  0, -1)
  print("Changed FoV to:" .. v["i"])
  gg.clearResults()
  end

 

But i wanna to turn it off 

Can anyone help me 

Recommended Posts

  • 0
  • Administrators
Posted

Write found address (or addresses) to file. On start - restore content from file. And if user want - write to this addresses 360.

Or make wait loop with menu on icon click. And store old addresses in variable. If user want - restore old value (360)/

  • 0
Posted
50 minutes ago, DESYROLLERSE said:

I could not process this example 


print("External storage: "..gg.EXT_STORAGE)
local file = io.open(gg.EXT_STORAGE.."/test_log.txt", "w")
file:write("This is log file")
file:close()

you who are online could you help? @Revoxtical

 

What is wrong? This code has nothing wrong

  • 0
Posted
1 hour ago, DESYROLLERSE said:

greetings to china.

Go die China

On 10/12/2018 at 4:44 AM, I-Do-Trolling said:

local old = gg.getRanges();
  gg.setRanges(gg.REGION_CODE_APP)
  gg.searchNumber ('360', gg.TYPE_FLOAT)
  gg.searchAddress('1C4',FFF)
  v = gg.prompt({i = "[setFov]Select a Number Between 175 and 360"}, {i = "0"})
if v == nil then
  gg.clearResults()
  gg.toast("FoV Unchanged")
else
  gg.getResults (5)
  gg.editAll(v["i"], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,
  0, -1)
  print("Changed FoV to:" .. v["i"])
  gg.clearResults()
  end

Your code has been fixed.

1 hour ago, DESYROLLERSE said:

local t = gg.prompt({'select file', 'output file','B', 'C', 'D'},nil,{'file','path', 'checkbox', 'checkbox'}) if t == nil then gg.alert('Canceled') else if t[1] then gg.getFile(sdcard) end if t[2] then end if t[3] then gg.alert('do C') end if t[4] then gg.alert('do D') end end

 

Err... maybe like this?

local t = gg.prompt({'select file', 'output file','B', 'C', 'D'},{gg.getFile(),"/sdcard/"},{'file','path', 'checkbox', 'checkbox', 'checkbox'})
if not t then
    gg.alert('Canceled')
else
    if t[1] then
    gg.getFile()
   end
    if t[2] then
        
    end
    if t[3] then
        gg.alert('do C')
    end
    if t[4] then
        gg.alert('do D')
    end
end

 

_______________________________________________
added 2 minutes later

/sdcard/ or /storage/eme?????/0/ is the same

but most of the phone chose the second one.

  • 0
Posted
16 minutes ago, DESYROLLERSE said:

I already know it ...

brother understand something ... I execute this script:


local t = gg.prompt({'select file', 'output file','B', 'C', 'D'},nil,{'file','path', 'checkbox', 'checkbox'})
if t == nil then
    gg.alert('Canceled')
else
    if t[1] then
    gg.getFile(sdcard)

   end
    if t[2] then
        
    end
    if t[3] then
        gg.alert('do C')
    end
    if t[4] then
        gg.alert('do D')
    end
end

and everything is great ... but when I press the first option.

I have to find the route to /sdcard./

When I press the second option I have to find the route to / sdcard /

what I want is to establish the direct route to / sdcard / to save the person time.

local g = {}
g.sel = nil
g.config = gg.EXT_FILES_DIR:gsub('files', 'tes.cfg')
g.data = loadfile(g.config)
if g.data ~= nil then
g.sel = g.data()
g.data = nil
end

while true do
g.sel = gg.prompt({
'Select file to encode :',--1
'Select writable path for output :',--2
},g.sel,
{'file',--1
'path',--2
})

if g.sel == nil then break end
gg.saveVariable(g.sel, g.config)

break
end

You can use part of enyby compiler to load config, you can select g.config .cfg file  location and name as you want. In my code above, I put .cfg file in the gg.EXT_FILES_DIR and named tes.cfg. You can improve as you need.

  • 0
Posted
4 minutes ago, DESYROLLERSE said:

hahaha I really like Chinese girls ...

I see many Chinese fight movies and they look like dolls ...

This girl is Korean and sings very well. doll

and this sings great ...

hahaha 


local t = gg.prompt({'select file', 'output file','B', 'C', 'D'},{gg.getFile(),"/sdcard/"},{'file','path', 'checkbox', 'checkbox', 'checkbox'})
if not t then
    gg.alert('Canceled')
else
    if t[1] then
    gg.getFile()
   end
    if t[2] then
        
    end
    if t[3] then
        gg.alert('do C')
    end
    if t[4] then
        gg.alert('do D')
    end
end

This was the sh-it he asked for.

thanks dude .....

you are a crack ..

my friend how long did you take to help ???

a few seconds

and the problem was solved.

Thank you ....

_______________________________________________
added 2 minutes later

thanks to you too ...

blessings ✌✌✌

Every usefull open source code is can be used by others, changing and improving code is an option based on your needs. 

  • 0
Posted
46 minutes ago, DESYROLLERSE said:

@noblack 

What do you think about the girls?

pretty or ugly ?? hahaha

in my school I conquered a girl ....

but when I met his sister, I liked more ...

and the mom ...

ooooo this delicious hahaha

 

Greetings .... I'll go to sleep because I have to get up very early.

thanks for the tips, the examples and the help of all ✌✌✌

 

First of all

If you want to get Chinese's girl

You have/MUST need the following things:

1. Money

2. Car

3. A house

4. A lot of money

And they're scumbag when you're poor.

That's what i think to Chinese's girl

And that's also why i hate China, maybe apart.

  • 0
Posted
1 hour ago, DESYROLLERSE said:

@noblack  ⏳ you do not need all that .....
 you just need to have "very high self-esteem". ✌✌?

 

ok let's leave all that sh-it. haha ? and put the concentration on this question ?

 

@bukandewa I was trying to add this new function


if g.sel[18] == true then
data8 = 'gg.setRanges(bit32.bxor(gg.(""..g.sel[19]..""))'
addMRanges = on
else
data8 = ''
end
local result8 = tochar(data8) 
dataxx8 = 'load(string.char('..result8..'))()\n'

he created that the problem is that he is including " " 

Any suggestions, examples or help ? ??

 

Thank you ....

Because you put double (") inside concatenate function. It is should be put single quote first followed by double quotes. Then to closing, you should put double quotes first followed by single quote.

It is depends on your first use in the code. I give you example below how to using single and double quote in some different case.

str = 'world'
data = 'hello('..str..')'

str2 = 'world'
data2 = 'hello("'..str..'")'

str3 = "world"
data3 = "hello('"..str.."')"

str4 = "world"
data4 = "hello("..str..")"

print(data)--output : hello(world)
print(data2)--output : hello("world")
print(data3)--output : hello('world')
print(data4)--output : hello(world)

 

  • 0
Posted
5 minutes ago, DESYROLLERSE said:

if g.sel[18] == true then
data8 = 'gg.setRanges(bit32.bxor("'..g.sel[17]..'"))'
addMemoryRanges = on
else
data8 = ''
end
local result8 = tochar(data8) 
dataxx8 = 'load(string.char('..result8..'))()\n'

in this way the script executes ...

but you should put the entire exemption in the panel:

gg.REGION_C_ALLOC or any desired range.

but the generated script presents the error that I mentioned. the quotation marks "



Script error: org.luaj.vm2.LuaError: gg.setRanges(bit32.bxor("gg.REGION_C_ALLOC")):1
`gg.setRanges(bit32.bxor("gg.REGION_C_ALLOC"))`
bad argument #1 (string): number expected, got string
level = 1, pc = 6
stack traceback:
	gg.setRanges(bit32.bxor("gg.REGION_C_ALLOC")):1 in main chunk
	/sdcard/Meg.luaX: in main chunk
	

I would like to know how to eliminate the " "

_______________________________________________
added 2 minutes later

ok thank you very much ... I'll try

Well, single quote and double quotes will be complicated if you inconsistent in writing code. 

Syntax highlight will help you to see and find which code should be fixed.

  • 0
Posted

Err... you messed up.

Let me tidy up things.

String in string

use \

Example

a = "print(\"hello\")"

gg.Range is a function, you can't run this with gg.setRange because they didn't get what is "gg.Rnage_*_*"

  • 0
Posted
Just now, DESYROLLERSE said:

there is some way for the ranges selected by people to be entered in this way


gg.setRanges(bit32.bxor(gg.REGION_ANONYMOUS, gg.REGION_BAD, gg.REGION_C_ALLOC))  

and not like that


gg.setRanges(bit32.bxor(gg.REGION_ANONYMOUS))
gg.setRanges(bit32.bxor(gg.REGION_BAD))
gg.setRanges(bit32.bxor(gg.REGION_C_ALLOC))  

that's the problem ....

or is it something very difficult to achieve?


if g.sel[18] == true then
data8 = 'gg.setRanges(bit32.bxor('..g.sel[17]..'))'
addMemoryRanges = on
else
data8 = ''
end
local result8 = tochar(data8) 
dataxx8 = 'load(string.char('..result8..'))()\n'

This way you can do it ... but the person will have to write ...

and what I'm trying to achieve is that it's automatic.

 

I'm going to label with great respect the people that I think may know the solution.

and maybe help or provide an idea or an example.

@bukandewa @noblack

@Revoxtical @Enyby

If for some reason the contribution you can provide is to send me to Google.

With all due respect, I ask you to omit this label.

Any other person who knows Lua and wants to contribute an idea or example will be welcome.

thanks to everyone.

_20190308_063602.JPG

Rewrite code later.

Ill just online from now to 3h later

_______________________________________________
added 0 minutes later

I mean, keep online"ing"

  • 0
Posted

try this

 

Table_4_Ranges= {

gg.REGION_C_ALLOC,
...,
-- Write it yourself
}
randomnum=1
for i=(The number of the first rane in your prompt), (the end of the range in prompt) do
if g.sel[i] == true then
data8 = 'gg.setRanges(bit32.bxor('..Table_4_Ranges[randomnum]..'))
addMemoryRanges = on
else
data8 = ''
end
local result8 = tochar(data8) 
dataxx8 = 'load(string.char('..result8..'))()\n'
randomnum=randomnum+1
end

 

_______________________________________________
added 2 minutes later
1 minute ago, noblack said:

'gg.setRanges(bit32.bxor('..Table_4_Ranges[randomnum]..'))

I missed a ' at the end

_______________________________________________
added 3 minutes later
2 minutes ago, noblack said:

addMemoryRanges = on

 And your on should be a boolen like true,false or number 1,0 or string 'on',"off"

_______________________________________________
added 3 minutes later

@DESYROLLERSE

  • 0
Posted

WAIT, Let me see...

_______________________________________________
added 3 minutes later

I think you should use my advice

Like this code:

23 minutes ago, DESTR0LLERSE said:

if g.sel[19] == true then data9 = 'gg.setRanges(bit32.bxor(gg.REGION_ANONYMOUS))' addMemoryRanges = on else data9 = '' end local result9 = tochar(data9) dataxx9 = 'load(string.char('..result9..'))()\n' if g.sel[20] == true then data10 = 'gg.setRanges(bit32.bxor(gg.REGION_ASHMEM))' addMemoryRanges = on else data10 = '' end local result10 = tochar(data10) dataxx10 = 'load(string.char('..result10..'))()\n' if g.sel[21] == true then data11 = 'gg.setRanges(bit32.bxor(gg.REGION_BAD))' addMemoryRanges = on else data11 = '' end local result11 = tochar(data11) dataxx11 = 'load(string.char('..result11..'))()\n' if g.sel[22] == true then data12 = 'gg.setRanges(bit32.bxor(gg.REGION_C_ALLOC))' addMemoryRanges = on else data12 = '' end local result12 = tochar(data12) dataxx12 = 'load(string.char('..result12..'))()\n' if g.sel[23] == true then data13 = 'gg.setRanges(bit32.bxor(gg.REGION_C_BSS))' addMemoryRanges = on else data13 = '' end local result13 = tochar(data13) dataxx13 = 'load(string.char('..result13..'))()\n' if g.sel[24] == true then data14 = 'gg.setRanges(bit32.bxor(gg.REGION_C_DATA))' addMemoryRanges = on else data14 = '' end local result14 = tochar(data14) dataxx14 = 'load(string.char('..result14..'))()\n' if g.sel[25] == true then data15 = 'gg.setRanges(bit32.bxor(gg.REGION_C_HEAP))' addMemoryRanges = on else data15 = '' end local result15 = tochar(data15) dataxx15 = 'load(string.char('..result15..'))()\n' if g.sel[26] == true then data16 = 'gg.setRanges(bit32.bxor(gg.REGION_CODE_APP))' addMemoryRanges = on else data16 = '' end local result16 = tochar(data16) dataxx16 = 'load(string.char('..result16..'))()\n' if g.sel[27] == true then data17 = 'gg.setRanges(bit32.bxor(gg.REGION_CODE_SYS))' addMemoryRanges = on else data17 = '' end local result17 = tochar(data17) dataxx17 = 'load(string.char('..result17..'))()\n' if g.sel[28] == true then data18 = 'gg.setRanges(bit32.bxor(gg.REGION_JAVA))' addMemoryRanges = on else data18 = '' end local result18 = tochar(data18) dataxx18 = 'load(string.char('..result18..'))()\n' if g.sel[29] == true then data19 = 'gg.setRanges(bit32.bxor(gg.REGION_JAVA_HEAP))' addMemoryRanges = on else data19 = '' end local result19 = tochar(data19) dataxx19 = 'load(string.char('..result19..'))()\n' if g.sel[30] == true then data20 = 'gg.setRanges(bit32.bxor(gg.REGION_PPSSPP))' addMemoryRanges = on else data20 = '' end local result20 = tochar(data20) dataxx20 = 'load(string.char('..result20..'))()\n' if g.sel[31] == true then data21 = 'gg.setRanges(bit32.bxor(gg.REGION_STACK))' addMemoryRanges = on else data21 = '' end local result21 = tochar(data21) dataxx21 = 'load(string.char('..result21..'))()\n'

If you use my sort method you can watch easily and edit more comfortable

_______________________________________________
added 4 minutes later

OK now i have to leave computer away so

I may can't edit code/respond instant.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.