!7 static int secondsToDisplay = 10; p-substance-thread { S lastText = null; repeat with sleep 1 { S s = getTextFromClipboard(); if (neq(s, lastText)) { lastText = s; final long id = parseSnippetURLOpt(s); if (id != 0) { fS _id = fsI(id); //infoBox("Snippet: " + _id, 2); awt { final JLabel lbl = jlabel("Testing snippet"); final JFrame f = showPackedFrameInTopRightCorner("Run " + _id + "?", withMargin(vstackWithSpacing(lbl, jbutton("Run", r { nohupJavax(_id); })))); thread "Fetch Stuff" { print("Testing snippet " + id); if (getSnippetType(id) != 34) disposeWindow(f); else { print("Runnable"); setText(lbl, "Fetching title..."); packFrameInTopRightCorner(f); setText(lbl, or2(getSnippetTitle(id), "Unnamed snippet")); makeLabelBold(lbl); packFrameInTopRightCorner(f); disposeWindowIfMouseNotInIt(iround(secondsToDisplay*1000), f); } } } } } } }