<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>座標 on qwerty.work</title>
        <link>https://qwerty.work/tags/%E5%BA%A7%E6%A8%99/</link>
        <description>Recent content in 座標 on qwerty.work</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>ja-JP</language>
        <lastBuildDate>Wed, 11 Jan 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://qwerty.work/tags/%E5%BA%A7%E6%A8%99/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>【Python】マウスカーソルの座標とキーコードを取得するスクリプト</title>
            <link>https://qwerty.work/post/2023/01/python%E3%83%9E%E3%82%A6%E3%82%B9%E3%82%AB%E3%83%BC%E3%82%BD%E3%83%AB%E3%81%AE%E5%BA%A7%E6%A8%99%E3%81%A8%E3%82%AD%E3%83%BC%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%8F%96%E5%BE%97/</link>
            <pubDate>Wed, 11 Jan 2023 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2023/01/python%E3%83%9E%E3%82%A6%E3%82%B9%E3%82%AB%E3%83%BC%E3%82%BD%E3%83%AB%E3%81%AE%E5%BA%A7%E6%A8%99%E3%81%A8%E3%82%AD%E3%83%BC%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%8F%96%E5%BE%97/</guid>
            <description>&lt;h2 id=&#34;マウスカーソルの座標が知りたい&#34;&gt;マウスカーソルの座標が知りたい&#xA;&lt;/h2&gt;&lt;p&gt;Windowsの操作をPythonで自動化するために座標が欲しい。といったときに、マウスカーソルの位置を取得するフリーソフトはありますが、あまりそういうのは入れたくないのですが、Pythonは入っているときに使えるものを見つけました。&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://irohaplat.com/python-mouse-coordinates-and-keycode-sample/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://irohaplat.com/python-mouse-coordinates-and-keycode-sample/&#34; alt=&#34;https://irohaplat.com/python-mouse-coordinates-and-keycode-sample/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://irohaplat.com/python-mouse-coordinates-and-keycode-sample/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://irohaplat.com/python-mouse-coordinates-and-keycode-sample/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;上記のサイトにあるスクリプトをコピペして実行するだけで簡単にできました。めちゃ便利です。&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;マウスカーソルの座標を表示している画面&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;616px&#34; data-flex-grow=&#34;256&#34; height=&#34;172&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://qwerty.work/post/2023/01/python%E3%83%9E%E3%82%A6%E3%82%B9%E3%82%AB%E3%83%BC%E3%82%BD%E3%83%AB%E3%81%AE%E5%BA%A7%E6%A8%99%E3%81%A8%E3%82%AD%E3%83%BC%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%8F%96%E5%BE%97/images/No-00.png&#34; width=&#34;442&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;使用しているライブラリについて&#34;&gt;使用しているライブラリについて&#xA;&lt;/h2&gt;&lt;p&gt;ここで使用されているPythonのライブラリのうち、&lt;strong&gt;tkinter&lt;/strong&gt;と&lt;strong&gt;ctypes&lt;/strong&gt;は標準ライブラリなので、インストール不要ですが、&lt;strong&gt;pyautogui&lt;/strong&gt;はインストールが必要です。&lt;/p&gt;&#xA;&lt;h3 id=&#34;インストールコマンド&#34;&gt;インストールコマンド&#xA;&lt;/h3&gt;&lt;p&gt;コマンドプロンプトから以下のコマンドでインストールできます。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pip install pyautogui&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;ライブラリを確認するコマンド&#34;&gt;ライブラリを確認するコマンド&#xA;&lt;/h3&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pip list&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
        </item></channel>
</rss>
