Jump to content
  • 0

Help with table results


userdj1

Question

I have a search wich usually gives me from 4 to 6 results ramdomly, so I just want those results shown in a selectable popup list to test values one by one by changing automatically from float 0,5 to 0 and freezing or unfreezing while I touch next value

Here my code wich only search, edit and freeze all the results

gg.clearResults()
    gg.setRanges(gg.REGION_C_ALLOC)
    gg.searchNumber('"1.9038954e-45;1.9012985e-40;1.793662e-43;1.4012985e-45;2.8025969e-45;1.1210388e-44;0.5:118"', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.refineNumber('"0.5"', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	    
    
    local t = gg.getResults(10, nil, nil, nil, nil, nil, nil, nil, nil)
    for i, v in ipairs(t) do
	if v.flags == gg.TYPE_FLOAT then
		v.value = '"0"'
		v.freeze = true
	end
	end
	gg.addListItems(t)
	t = nil
    gg.toast("Done!")
  end

 

Hope you undestand and sorry for my english

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • Moderators

Honestly, ideally would be to find what makes the correct value unique and avoid trial and error editing in a script.

Trial and error is good to find the correct value. Once find, try to determine how to know which is the right one for scripting.

Link to comment
Share on other sites

function example()
gg.clearResults()
gg.setRanges(4)
gg.searchNumber('1;1;1;1.7682028e19::13',gg.TYPE_FLOAT)
::deflg::
gg.searchNumber('1',gg.TYPE_FLOAT)
gg.getResults(1)
gg.editAll('6',gg.TYPE_FLOAT)
   ::choiod::
 menu=gg.choice({'Success'
 ,'Fail','Cancel',},nil,'Result?')
 if menu == nil then gg.alert('Choose') goto choiod end
 if menu == 1
  then ok()
  end
 if menu == 2
  then 
      goto deflg
  end end

Edit for your code.

Link to comment
Share on other sites

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.