From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Screenshots, frame shots straight from Emacs Date: Fri, 23 Jul 2021 17:16:42 +0800 Message-ID: References: <87sg1dgbbk.fsf@omarpolo.com> <87pmwhg843.fsf@omarpolo.com> <8735t96mxj.fsf@omarpolo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20657"; mail-complaints-to="usenet@ciao.gmane.io" To: Hongyi Zhao , Omar Polo , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 23 11:17:19 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6rJ1-0005AZ-9t for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 11:17:19 +0200 Original-Received: from localhost ([::1]:36248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6rIz-0000ke-Pb for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 05:17:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6rIf-0000kU-Gz for help-gnu-emacs@gnu.org; Fri, 23 Jul 2021 05:16:57 -0400 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:43654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6rId-0007aA-RK for help-gnu-emacs@gnu.org; Fri, 23 Jul 2021 05:16:57 -0400 Original-Received: by mail-lf1-x133.google.com with SMTP id f18so954380lfu.10 for ; Fri, 23 Jul 2021 02:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HDOGLntnbwOBs6jsUP/lftB4WlEUYi9rVuh1NOTbJuw=; b=SNGcJduRZzPtrn2mJtlRyG8Ge8iyaVLlQMSwgkWYrafi9S2T1axXgPZTJQgbYk43NM cSRR01KgbUSMbQHkV1Jti2NZfoDfXOba/DZ+SkW8BJ60aliAy7DDnhcB9qtY1oESgUE8 KbvU8bh45SA45O/S3a5TBIStJkJ/R9sA6Ph2eAHHCujDWY4GSYUonKp+SmDZW7fOkSp+ JbO2qQw9r0APOQGNV+kPaR/PgpJWGhd4934Fq2IttTH82fIeC2Nnjos0t0h6Tppi4jhX TRVpZza9J3HXDMecMulFjOU22FmNqqZETjJYWjHkuaxCO7bRj2CKk2UiAE6pUpCxXkXU hXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HDOGLntnbwOBs6jsUP/lftB4WlEUYi9rVuh1NOTbJuw=; b=cCzXZNsiOmSf13ianxPslpMTtvsDC7vDmAA94Ne4ETyW9NA10ngQAvD80478Iz8GZ3 FYephzO5yzjlKk4kxArOU0sQN1pXpCugyyXfb5hJBJbCmgyeDtQfaA1gNhFeaEL+sy5I a82nWjXP1wrMimVW48//XJq4Bl1QUMw2ezEVEWcrswD/x7HW41uNEeV7k9xj+NrGo32p 76Bm3E+2dNbLxMC7KupDFVqzA+vevK8b0k13bvmYMpFRLCGt0zBH4hi8j6nBo//zLpcK 450y4+5M05gtkbIm4sf1lHpYUIzJCx17T6aXObtlrWvMB55hR9OSvju1QKbsHi+mb5sZ 1yLA== X-Gm-Message-State: AOAM530xJVM9EZt1UQ3GUor1B2ZcbdHoZ3ZtTJnaPsqiF415kkn+0oX1 p5UlJ8AqMPHcFDfU8B5zbFOP+bJTSgUHere4myQ= X-Google-Smtp-Source: ABdhPJwBNHsdxV7C9J9TyVJ6C8aiLg6FrDTnupbeDchHiemAPs4VUSmbnE0H75TaYv2dMRopXImHc2XBVc0znDvFxUI= X-Received: by 2002:a19:ac45:: with SMTP id r5mr2379067lfc.484.1627031814038; Fri, 23 Jul 2021 02:16:54 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x133.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132072 Archived-At: On Fri, Jul 23, 2021 at 1:55 PM Jean Louis wrote: > > * Hongyi Zhao [2021-07-23 03:53]: > > 1. Have the delay feature, so that I can do some operations before the > > screenshot is captured, say, click on mouse button, open a dropdown > > menu, and so on. > > This improved function will allow that you invoke for example: > > C-5 M-x frameshot to delay for 5 seconds. But this Emacs function I > think will not allow to get the screenshot of the dropdown, maybe it > requires using threads, now I don't know how to do it within Emacs. Based on the comment here [1], I find the following simple method to capture a drop-down menu: Install the imagemagick package, then issue the following command on a terminal: $ sleep 10; import -window root /tmp/screenshot.png In the next 10 seconds change your active window, open the dropdown menu and wait. You will likely need to crop your screenshot afterwards. [1] https://askubuntu.com/questions/584778/how-to-capture-a-drop-down-menu Best, Hongyi