Jump to content
  • 0

Script wrong


mhmd320666

Question

Hello i  maked script yesterday but somthing is wrong let me explain what the problem

First of all that is my script

gg.clearResults()
  gg.setRanges(gg.REGION_C_ALLOC)
  gg.searchNumber("0,0;0,0;0,0;0,0;0,0;-0,0;0,5;-360,0;360,0;740,0;0,5;-740,0;0,0;0,0;0,0;0,0;0,0;1,0;1,0;0,0;0,0;0,0;0,0;0,0;1,0;1,0;1,0;1,0;0,0;0,0;0,0;1,0:133", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
    gg.searchNumber("0.5", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
    t = gg.getResults(10)
    gg.editAll("0", gg.TYPE_FLOAT)
    t[1].value = "0"
    t[2].value = "0.5"
    t[3].value = "0"
    t[4].value = "0.5"
    t[1].freeze = true
    t[2].freeze = true
    t[3].freeze = true
    t[4].freeze = true
    print("addListItems: ", gg.addListItems(t))
    gg.toast(" + ")

Now the script muss to search at fist value the to 0.5 and freeze 2 from 4 result

But gg when he search for first value it says 0 founded while searching to100%

When searching finish is then it shows 72 results 

For this problem when i run script he search to first value then he dont find result but actually there is 72 results normally 

Then he search to 0.5 and i get 300 result 

Because he dont found somthing on fiest value

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • Administrators

1. Scripts work always in English locale. So 0.5 must use dot, not a comma.

2. You must check count of found results. Not blind load all and work with it. It can be zero results. So you try index not exists results and all go to hell.

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.