Python Forum
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyautogui hotkey
#1
ubuntu 16.04 LTS 64 bit
python 3.5.2
firefox 64.0 64 bit


Hi,

I am learning python3 with https://automatetheboringstuff.com/chapter18. I want to open a browser window of a certain size or set an opened browser window to a certain size.

My question is about Hotkey Combinations

The following program (open command screen via shortcut ctrl+alt+t) is working fine:

import pyautogui
pyautogui.hotkey('ctrl','alt','t')

but not this program (change position of window to top left via ctrl+alt+7) although there is only '7' instead of 't':

import pyautogui
pyautogui.hotkey('ctrl','alt','7')

Placing a focus
pyautogui.click(100,100);pyautogui.hotkey('ctrl','alt','7')
does not help.

Further:
Opening a window with

import webbrowser
webbrowser.open('https://www.google.com')

the size of the window seems to depend on the last window-closing.

What's incorrect? How are you placing a browser window?

I have installed pyautogui via pip3 according to
https://pyautogui.readthedocs.io/en/late...board.html

Thanks for any hint!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pyautogui, İmagesearch, Moving target Beyazx 0 591 Jun-27-2023, 08:47 PM
Last Post: Beyazx
  PyautoGUI- How to use If - Else with pyautogui.locateCenterOnScreen Tiel 3 8,386 Jun-27-2022, 02:00 PM
Last Post: DeaD_EyE
  pyautogui.locateOnScreen producing error dude8074 6 3,850 Apr-17-2022, 05:05 PM
Last Post: bowlofred
  how to take a screnshot by Pyautogui automatically and randomly rachidel07 0 3,555 Feb-03-2021, 01:16 PM
Last Post: rachidel07
Sad problem with Pyautogui rachidel07 1 2,473 Jan-27-2021, 05:43 PM
Last Post: nilamo
  how to make a hotkey for text adventure game myn2018 2 1,978 Jan-06-2021, 10:39 PM
Last Post: myn2018
  pyautogui with a display emulator? gumby4231 0 2,607 Jul-30-2020, 02:46 PM
Last Post: gumby4231
  pyautogui.screenshot region is not working alexlu 6 6,521 Jun-04-2020, 10:46 AM
Last Post: alexlu
  Hotkey to restart code? DannyB 1 2,759 May-20-2020, 02:52 AM
Last Post: michael1789
  PySide2 Hotkey works only once in Maya LalaGhost 0 1,788 May-19-2020, 05:05 PM
Last Post: LalaGhost

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020