!7 p-subst { BufferedImage img = cast time(f singleImagePreferablyFromLastWebcam); if (img == null) { infoBox("Got no image"); ret; } ImageSurface is = showImage("Will upload in 3! Close window to stop this.", img); hideConsole(); sleepSeconds(3); if (!is.isShowing()) { infoBox("Upload cancelled."); ret; } setFrameTitle(is, "Uploading..."); S imageURL = uploadJPEGToImageServer(img, "User webcam image"); print("Image uploaded as " + imageURL); setFrameTitle(is, "Posting..."); if (postToStefansChat("[IMAGE] " + imageURL)) setFrameTitle(is, print("Posted image to chat!")); else setFrameTitle(is, print("Could not post image.")); }