Pyautogui does not move the actual mouse pointer









up vote
0
down vote

favorite












I've been having a problem with pyautogui. Anytime I use the functions, it works, but it uses an "invisible" mouse pointer. Basically the module doesn't use the mouse to click things, but they still click and drag. Here's a visual example:



Reading two mouse positions on the screen works as expected:
Position 1Position 2



However, when I try to move the mouse from the second link back to the first link, the mouse itself doesn't move, yet the computer thinks it does. As you can see here, the visual mouse is at link 2, while the "Invisible" mouse is at link 1. You can see this because link 1 is underlined, and also in the terminal pyautogui.position() returns the coordinates for link 1:
enter image description here
And using pyautogui.click() opens the first link:
enter image description here



I've tried searching for answers to this problem and I can't seem to find any. It appears most people have the opposite problem. They want to be able to automate their mouse while also use it normally (ie two mouse pointers).



Why is this a problem? It's certainly not what these other people want. Often times, what happens is after a few seconds the "invisible" mouse jumps back to where the visual mouse is. Also when running click functions, if you happen to move your mouse, the "invisible" mouse will return to the visual mouse's position. Additionally, because the visual mouse doesn't move, the computer falls asleep which destroys any hope of automation. Plus because of this bug, any relative mouse movement is impossible, because it only moves relatively from the visual mouse (which is stationary).



The pyautogui script I am trying to run is a bot for a game. Previously it was working perfectly, then I wiped Xubuntu off my computer and installed Ubuntu. So this is a bug on a fresh install of Ubuntu with only a few minor changes.



My changes to my Ubuntu Install:



  • I installed GNOME desktop environment to use instead of the default (Unity I think?). Both are installed currently, but I only have GNOME selected from the login screen

  • I installed gnome-tweaks tool and changed my touchpad to area mode, as well as changed the visuals of my windows and mouse pointer to make a dark theme.

  • For the python script, I'm running python3 and am using pip version 18.1. I installed virtualenvwrapper and have the following packages installed on it:

.



$ pip freeze
numpy==1.15.4
opencv-python==3.4.3.18
Pillow==5.3.0
PyAutoGUI==0.9.38
PyMsgBox==1.0.6
PyScreeze==0.1.18
PyTweening==1.0.3
six==1.11.0
xlib==0.21


Everything else is default Ubuntu 18.04.1 LTS. Does anyone have any ideas on how I can fix this? I would appreciate any ideas.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I've been having a problem with pyautogui. Anytime I use the functions, it works, but it uses an "invisible" mouse pointer. Basically the module doesn't use the mouse to click things, but they still click and drag. Here's a visual example:



    Reading two mouse positions on the screen works as expected:
    Position 1Position 2



    However, when I try to move the mouse from the second link back to the first link, the mouse itself doesn't move, yet the computer thinks it does. As you can see here, the visual mouse is at link 2, while the "Invisible" mouse is at link 1. You can see this because link 1 is underlined, and also in the terminal pyautogui.position() returns the coordinates for link 1:
    enter image description here
    And using pyautogui.click() opens the first link:
    enter image description here



    I've tried searching for answers to this problem and I can't seem to find any. It appears most people have the opposite problem. They want to be able to automate their mouse while also use it normally (ie two mouse pointers).



    Why is this a problem? It's certainly not what these other people want. Often times, what happens is after a few seconds the "invisible" mouse jumps back to where the visual mouse is. Also when running click functions, if you happen to move your mouse, the "invisible" mouse will return to the visual mouse's position. Additionally, because the visual mouse doesn't move, the computer falls asleep which destroys any hope of automation. Plus because of this bug, any relative mouse movement is impossible, because it only moves relatively from the visual mouse (which is stationary).



    The pyautogui script I am trying to run is a bot for a game. Previously it was working perfectly, then I wiped Xubuntu off my computer and installed Ubuntu. So this is a bug on a fresh install of Ubuntu with only a few minor changes.



    My changes to my Ubuntu Install:



    • I installed GNOME desktop environment to use instead of the default (Unity I think?). Both are installed currently, but I only have GNOME selected from the login screen

    • I installed gnome-tweaks tool and changed my touchpad to area mode, as well as changed the visuals of my windows and mouse pointer to make a dark theme.

    • For the python script, I'm running python3 and am using pip version 18.1. I installed virtualenvwrapper and have the following packages installed on it:

    .



    $ pip freeze
    numpy==1.15.4
    opencv-python==3.4.3.18
    Pillow==5.3.0
    PyAutoGUI==0.9.38
    PyMsgBox==1.0.6
    PyScreeze==0.1.18
    PyTweening==1.0.3
    six==1.11.0
    xlib==0.21


    Everything else is default Ubuntu 18.04.1 LTS. Does anyone have any ideas on how I can fix this? I would appreciate any ideas.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I've been having a problem with pyautogui. Anytime I use the functions, it works, but it uses an "invisible" mouse pointer. Basically the module doesn't use the mouse to click things, but they still click and drag. Here's a visual example:



      Reading two mouse positions on the screen works as expected:
      Position 1Position 2



      However, when I try to move the mouse from the second link back to the first link, the mouse itself doesn't move, yet the computer thinks it does. As you can see here, the visual mouse is at link 2, while the "Invisible" mouse is at link 1. You can see this because link 1 is underlined, and also in the terminal pyautogui.position() returns the coordinates for link 1:
      enter image description here
      And using pyautogui.click() opens the first link:
      enter image description here



      I've tried searching for answers to this problem and I can't seem to find any. It appears most people have the opposite problem. They want to be able to automate their mouse while also use it normally (ie two mouse pointers).



      Why is this a problem? It's certainly not what these other people want. Often times, what happens is after a few seconds the "invisible" mouse jumps back to where the visual mouse is. Also when running click functions, if you happen to move your mouse, the "invisible" mouse will return to the visual mouse's position. Additionally, because the visual mouse doesn't move, the computer falls asleep which destroys any hope of automation. Plus because of this bug, any relative mouse movement is impossible, because it only moves relatively from the visual mouse (which is stationary).



      The pyautogui script I am trying to run is a bot for a game. Previously it was working perfectly, then I wiped Xubuntu off my computer and installed Ubuntu. So this is a bug on a fresh install of Ubuntu with only a few minor changes.



      My changes to my Ubuntu Install:



      • I installed GNOME desktop environment to use instead of the default (Unity I think?). Both are installed currently, but I only have GNOME selected from the login screen

      • I installed gnome-tweaks tool and changed my touchpad to area mode, as well as changed the visuals of my windows and mouse pointer to make a dark theme.

      • For the python script, I'm running python3 and am using pip version 18.1. I installed virtualenvwrapper and have the following packages installed on it:

      .



      $ pip freeze
      numpy==1.15.4
      opencv-python==3.4.3.18
      Pillow==5.3.0
      PyAutoGUI==0.9.38
      PyMsgBox==1.0.6
      PyScreeze==0.1.18
      PyTweening==1.0.3
      six==1.11.0
      xlib==0.21


      Everything else is default Ubuntu 18.04.1 LTS. Does anyone have any ideas on how I can fix this? I would appreciate any ideas.










      share|improve this question













      I've been having a problem with pyautogui. Anytime I use the functions, it works, but it uses an "invisible" mouse pointer. Basically the module doesn't use the mouse to click things, but they still click and drag. Here's a visual example:



      Reading two mouse positions on the screen works as expected:
      Position 1Position 2



      However, when I try to move the mouse from the second link back to the first link, the mouse itself doesn't move, yet the computer thinks it does. As you can see here, the visual mouse is at link 2, while the "Invisible" mouse is at link 1. You can see this because link 1 is underlined, and also in the terminal pyautogui.position() returns the coordinates for link 1:
      enter image description here
      And using pyautogui.click() opens the first link:
      enter image description here



      I've tried searching for answers to this problem and I can't seem to find any. It appears most people have the opposite problem. They want to be able to automate their mouse while also use it normally (ie two mouse pointers).



      Why is this a problem? It's certainly not what these other people want. Often times, what happens is after a few seconds the "invisible" mouse jumps back to where the visual mouse is. Also when running click functions, if you happen to move your mouse, the "invisible" mouse will return to the visual mouse's position. Additionally, because the visual mouse doesn't move, the computer falls asleep which destroys any hope of automation. Plus because of this bug, any relative mouse movement is impossible, because it only moves relatively from the visual mouse (which is stationary).



      The pyautogui script I am trying to run is a bot for a game. Previously it was working perfectly, then I wiped Xubuntu off my computer and installed Ubuntu. So this is a bug on a fresh install of Ubuntu with only a few minor changes.



      My changes to my Ubuntu Install:



      • I installed GNOME desktop environment to use instead of the default (Unity I think?). Both are installed currently, but I only have GNOME selected from the login screen

      • I installed gnome-tweaks tool and changed my touchpad to area mode, as well as changed the visuals of my windows and mouse pointer to make a dark theme.

      • For the python script, I'm running python3 and am using pip version 18.1. I installed virtualenvwrapper and have the following packages installed on it:

      .



      $ pip freeze
      numpy==1.15.4
      opencv-python==3.4.3.18
      Pillow==5.3.0
      PyAutoGUI==0.9.38
      PyMsgBox==1.0.6
      PyScreeze==0.1.18
      PyTweening==1.0.3
      six==1.11.0
      xlib==0.21


      Everything else is default Ubuntu 18.04.1 LTS. Does anyone have any ideas on how I can fix this? I would appreciate any ideas.







      python-3.x user-interface ubuntu mouse pyautogui






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 19:13









      FRZ

      187




      187



























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231971%2fpyautogui-does-not-move-the-actual-mouse-pointer%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231971%2fpyautogui-does-not-move-the-actual-mouse-pointer%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo