well i still not quite sure what you really want.
but you can check this example below to see if it really help.
local gg = gg
n = {0}
function START()
gg.clearResults()
local input = gg.prompt(
{"Enter value :","EXIT"},
{n[1]},
{"number","checkbox"})
if not input then gg.toast("You've canceled") return
elseif
input[2] == true then os.exit()
else
n[1] = input[1]
gg.searchNumber(input[1],gg.TYPE_DWORD)
count = gg.getResultsCount()
gg.alert("Results found = "..count)
end
end
while true do
while gg.isVisible(true) do
gg.setVisible(false)
START()
end
end
above prompt will remember what the last/recent value entered so that you dont have to enter it again as long as the script is alive.