// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Check a pasted two-column mini table // Not compiled or tested in-world // Setup: Touch, paste a short table, and submit. The entire reply must fit 200 characters. // Stop / restore: Remove, disable, or reset to stop timers and discard session state. Temporary input listeners expire after 45 seconds. // Notes: Only the current owner can control this example. Timing is approximate and can be delayed by simulator load. Splits only at the first equals sign and retains further equals signs in values. No data is applied to objects or stored beyond this response. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. integer active; integer handle; integer channel; integer expires; closeInput() { if(handle)llListenRemove(handle); handle=0; } schedule() { if(active || handle)llSetTimerEvent(1.0); else llSetTimerEvent(0.0); } beginInput() { closeInput(); channel=-10000-(integer)llFrand(1000000000); handle=llListen(channel,"",llGetOwner(),""); expires=llGetUnixTime()+45; schedule(); } ask(string prompt) { beginInput(); llTextBox(llGetOwner(),prompt,channel); } default { touch_start(integer touches) { if(llDetectedKey(0)!=llGetOwner())return; ask("Paste up to eight key=value rows, one per line."); schedule(); } listen(integer c,string name,key speaker,string input) { if(c!=channel || speaker!=llGetOwner() || !handle)return; closeInput(); if(llStringLength(input)>200) { llOwnerSay("Reply is too long."); schedule(); return; } list rows=llParseStringKeepNulls(input,["\n"],[]); list keys; list values; integer valid=llGetListLength(rows)<=8; integer i; for(i=0;i "+llList2String(values,i)); schedule(); } timer() { if(handle && llGetUnixTime()>=expires) { closeInput(); llOwnerSay("Input expired."); } schedule(); } changed(integer flags) { if(flags & CHANGED_OWNER)llResetScript(); } }