pysimplegui

    >>> import pyautogui
    >>> screenWidth, screenHeight = pyautogui.size() # Returns two integers, the width and height of the screen. (The primary monitor, in multi-monitor setups.)
    >>> currentMouseX, currentMouseY = pyautogui.position() # Returns two integers, the x and y of the mouse cursor's current position.
    >>> pyautogui.moveTo(100, 150) # Move the mouse to the x, y coordinates 100, 150.
    >>> pyautogui.click() # Click the mouse at its current location.
    >>> pyautogui.click(200, 220) # Click the mouse at the x, y coordinates 200, 220.
    >>> pyautogui.move(None, 10)  # Move mouse 10 pixels down, that is, move the mouse relative to its current position.
    >>> pyautogui.doubleClick() # Double click the mouse at the
    >>> pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.easeInOutQuad) # Use tweening/easing function to move mouse over 2 seconds.
    >>> pyautogui.write('Hello world!', interval=0.25)  # Type with quarter-second pause in between each key.
    >>> pyautogui.press('esc') # Simulate pressing the Escape key.
    >>> pyautogui.keyDown('shift')
    >>> pyautogui.write(['left', 'left', 'left', 'left', 'left', 'left'])
    >>> pyautogui.keyUp('shift')
    >>> pyautogui.hotkey('ctrl', 'c')

3.78
9
Montag451 130 points

                                    import PySimpleGUI as sg

# Define the window's contents
layout = [[sg.Text("What's your name?")],
          [sg.Input(key='-INPUT-')],
          [sg.Text(size=(40,1), key='-OUTPUT-')],
          [sg.Button('Ok'), sg.Button('Quit')]]

# Create the window
window = sg.Window('Window Title', layout)

# Display and interact with the Window using an Event Loop
while True:
    event, values = window.read()
    # See if user wants to quit or window was closed
    if event == sg.WINDOW_CLOSED or event == 'Quit':
        break
    # Output a message to the window
    window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI")

# Finish up by removing from the screen
window.close()

3.78 (9 Votes)
0
4.04
7
Ahawkins82 105 points

                                    import PySimpleGUI as sg

sg.theme('DarkAmber')   # Add a touch of color
# All the stuff inside your window.
layout = [  [sg.Text('Some text on Row 1')],
            [sg.Text('Enter something on Row 2'), sg.InputText()],
            [sg.Button('Ok'), sg.Button('Cancel')] ]

# Create the Window
window = sg.Window('Window Title', layout)
# Event Loop to process "events" and get the "values" of the inputs
while True:
    event, values = window.read()
    if event == sg.WIN_CLOSED or event == 'Cancel': # if user closes window or clicks cancel
        break
    print('You entered ', values[0])

window.close()

4.04 (25 Votes)
0
4
4
Jezcentral 115 points

                                    # Will only change if you selected the input
window['-In-'].Widget.configure(highlightcolor='color')

# Adds a border to the Input
window['-In-'].Widget.configure(highlightbackground='color')

# The border thickness can be edited with:
highlightthickness=

4 (4 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
pysimplegui layouts pyplot PySimpleGUI pygui pypi pysimplegui widgets pysimplegui notebook OSError: pyautogui python python pyautogui module doc python 3 idle pyautogui pysimplegui example PySimpleGUI version import pyautogui pip PySimpleGUI Button install pysimplegui pyautogui documentation. pysimplegui FileBrowser pysimplegui download file pysimplegui library pysimplegui ttk pysimplegui python3 pysimplegui pip pysimplegui python pysimplegui window how to install pyautogui in python pyautogui package pypl PySimpleGUI pyautogui @ pysimplegui install pysimplegui File Browser import PySimpleGui what python version does pyautogui use pyautogui how to use pyautogui how to pyautogui pypi pyautogui is a library pyautogui using python how to import pyautogui pyautogui pipy pyautogui module docs pyautogui what is python pyautogui how to type pyautogui python 3.9 write pthon code in pyautogui pyautogui lo\ PyAutoGUI from PyPI. is pyautogui a default python package python pyautogui install window python pyautogui press import pyautogui python 3 pyautogui function in python pyautogui code pyautogui pip pyautogui version python pyautogui program pyautogui python download install pyautogui python 3.7 windows pyautogui api pyautogui python 3.7.5 python pyautogui install pyautogui function pyautogui python command download pyautogui python command python install pyautogui python2 pyautogui pyautogui doc 'pyautogui' displaymouseposition python play pyautogui python pyautogui module how to type in python pyautogui pypi pyautogui pipy PyAutoGUI pyautogui. python pyautogui keyboard pyautogui pytohn pyautogui python pyautogui library use pyautogui in python download pyautogui pyautogui pip install pyautogui in python pip pyautogui pyaugtgui python pyautogui download pip install pyautogui import pyautogui pyautogui python documentation python module pyautogui python import pyautogui from pyautogui import pyautogui pysimplegui list Pyautogui if mouse move = true pysimplegui all widgets pyautogui non bot detect py simple gui button array pyautogui docs get main.py pyautogui pyautogui write ' import pyautogui as pyautogui ppypl how to use pysimplegui correctly pysimplegui pad pyautogui close open program pyautogui.FAILSAFE page pg down pyautogui fullscreen canvas pysimplegui pysimplegui table pysimplegui elements pysimplegui homepage pysimplegui buttons pyautogui X pyatuo gui wirte command pysimplegui screen drag effect pysimplegui popup pysimplegui explanation of features pyautogui pause python pysimplegui pyautogui write @ how to install pyautogui in pycharm log keystrockes with python pyautogui how to evolve a website in pysimplegui pysimplegui close window python pyautogui click read with pyautogui pysimplegui tutorial how to import pyautogui how to install pyautogui get data out of sq.input using key simplepygui multiline simplepygui pyautogui slipt x y PySimpleGUI.popup_yes_no example pysimplegui PopupYesNo sg.Image mchoose monitor pyautogui pysimplegui examples pysimplegui check bos piysimplegui while using vs code window pop up pysimplegui create custom popup window pysimplegui create custom popup pysimplegui create custom popup wi pysimplegui create custom popup win pysimplegui create custom popup wind pysimplegui create custom popup windo pysimplegui create custom popup window pysimplegui create custom popup new window pyautogui click on window pyautogui gui tutorial food ordering app using pysimplegui window.read() python combo pysimplegui python pysimplegui example pyautogui package size listbox pysimplegui run pysimplegui vscode linux run pysimplegui bash terminal local server pyautogui drawing pysimplegui documentation pysimplegui image pysimplegui folderbrowser invisible add framework to input pysimplegui pyautogui sying not found pyauto win click ok windows default pyautogui escape right click pyautogui python pyautogui dimensions pyautogui keyboard clicks pyautogui send keys with coordinates how make pyautogui faster pyautogui.write(filepath, interval=0.25) pyautogui pyautogui pyautogui click program start program pyautogui pyautogui confirm after 5 sec pyautogui mouse move repeat python pyautogui replace text python pyautogui macro pyautogui press mouse pyautogui on click pyautogui macro pyautogui not getting y value how to right click pyautogui safe file using pyautogui enter path pyautogui auto gui python pyautogui how to make text prompt pyautogui coordinates pyautogui clicks pyautogui cliks pyautogui cheat sheet why does'#' print out as '~' when using pyautogui? how to scroll in pyautogui let pyautogui go faster pyautogui.click() parameters pyautogui.click() what does pyautogui.hotkey return python pyautogui typewrite pyautogui mouse location pyautogui.locate functian pyautogui.locate pysimplegui py auto gui type pytautogui keyboard pyautogui right bottom corner pyautogui save get mouse position python pyautogui pyautogui sleep pyautogui get a value from the internet how to go into inspect element with pyautogui pyautogui press return python pyautogui move mouse how to make pyautogui look for a application pyautogui x position pyautogui change directory in cmd how to deselect any text field using pyautogui in python pyautogui event pyautogui on click keyboard Can pyauto gui detect messages in a ui how to use pyautogui to click on text pyautogui click current position pytautogui enter pyautogui module in python pyautogui type word pyautogui mouse position how to use key combinationso n pyautogui pyautogui end pyautogui.hotkey() ctrl in pyautogui how to click backspace in pyautogui pyautogui start a script pyautogui go to middle of screen and right click open options using pyautogui pyautogui click wheel get resolution of screen pyautogui pyautogui write scentence pyautogui region how to use pyautogui in pyrhon pyautogui move mouse what is the name of home button in pyautogui can we control only guis created in python using pyautogui module name in pyautogui for home button in python how to use button like shift and ctrl using pyautogui in python pyautogui failsafe pyautogui on screen pyautogui confirm pyautogui click pyautogui print mouse location pyautogui run pyautogui leftclick pyautogui to control mouse what is pyautogui.center pyautogui windows 10 login usin ctrl+click to find python documentation how to delete all in python pyautogui pyautogui mouse functionality pyautogui write words python pyautogui mouse click how to get pyautogui documentaiton pyautogui all functions pyautogui key index documentation pyautogui pyautogui mouse movement pyautogui key reader pyautogui change execution time pyautogui get key clickes pyautogui attributes how to type [ with pyautogui how to type comma with pyautogui pyautogui.dragTo handling mouse using pyautogui how to press 2 button python auto gui html dragging get mouse position pyautogui prompt pyautogui algorithm pyautogui mouse how often does pyautogui miss keystrokes double click pyautogui working with buttons and pyautogui backspace in puauto gui how to typein pyautogui pyautogui all help pyautogui best tool for easily getting coordinates for pyautogui how to controll keyboard using pyautogui pyautogui kb button search next pyautogui python bot pyautogui pyautogui help pyautogui examples find screen content pyautogui sample project visual studio pyautogui double click pyautogui fit f3 button how to make pyautogui click a button on screen how to make pyautogui mouse find the button and press it on screen how to make pyautogui hit a button on screen how to make pyauto gui hit a button on screen pyautogui pause not working pyautogui select elements of a browser page pyautogui detect mouse how to use pyautogui good how to perform pyautogui with multiple windows asyncio pythonautogui confirm move mouse to corner of image pyautogui monitor pyautogui pyautogui run for 2 hours pyautogui run for hours pyautogui duration pyautogui python tutorial pythpyautogui windows l pythpyautoguion windows l pyautogui typewrite py auto gui pyautogui only for a window pyautogui mouse click press pyautogui do python autpgui pyautogui right click on center of screen pyautogui.prompt size pyautogui what is pyautogui in python pyautogui commands pyadutogui move to pyautogui left click down python track keyboard pyautogui enter pyautogui pyautogui update pyautogui run mt project import pyautogui write messages import pyautogui write massges Pyauto module learn pyautogui pyautogui delete pyautogui change active monitor how to get pyautogui pyautogui features pyautogui python install pyautogui requements what can you do with pyautogui pyautogui keyboard type more thain1 lettre with pyautogui python auto gui pyautogui moveto pyautogui drag python click and drag pyautogui pyautogui left click typing and clicking in pyautogui what do do with pyautogui how to log the keyboard and mouse pyautogui how to do keyboard shortcuts on windows 10 pyautogui screenshot how to use pyautogui in python python pyautogui ex python pyautogui examples pyautogui write pyautogui detect screen click pyautogui get mouse coordinates pyautogui run python program pyautogui examples keys list pyautogui move to pyautogui pyautogui super fast tutorial pyautogui move mouse screenresolution pyautogui example pyautogui enter install pyautogui pyautogui get monitor pyautogui right and left click pyautogui recorder pyautogui hotkey pyautogui sending sentences display mouse position on computer pyautogui how to make pyautogui type command pyautogui.wwrite python pyautogui tutorial pyautogui library pyautogui install pyautogui.write pyautogui scroll pyautogui functions pyautogui toturial pyautogui click at x, pyautogui is an automation what is pyautogui pyautogui mosue import pyautogui sytrax pyautogui sytax click pyautogui how to use pyautogui pyautogui for video theme using pyautogui to change theme in python pyautogui windows pyautogui type pyautogui documentation pyautogui.doubleClick(command, duration=0.25) pyautogui module pyautogui click function pyautogui.readthedocs.iol pyautogui tutorial pyautogui keyboard control pyautogui refresh pyautogui right click importr pyautogui, time pyautogui python type pyautogui python click places with python pyautogui pyautogui autopython gui python autogui pyautogui in python python pyautogui
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source