PyAutoGUI - Locate anything on your screen | Simple Pyautogui project

  Рет қаралды 165,257

Coding 101 with Steve

Coding 101 with Steve

Күн бұрын

Пікірлер: 259
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Hello All 🙋🏻‍♂️ If you have any kind of customized tool or app request. You can reach out to me on Instagram or email. I can create tools or apps for you. instagram.com/stevegen1907 OR coding101withsteve.freelance@gmail.com Thank You
@lukkaskkjk
@lukkaskkjk 5 ай бұрын
Thanks for the tutorial Steve, can you do a tutorial teaching us how to create a bot that detects if the image is appearing on the screen or not?
@olisamping5339
@olisamping5339 Жыл бұрын
IDK why but Indians is the best techno teacher. Your explanation is so clear. Thank you
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Thank you for your feedback ❤❤
@macavitymacavity126
@macavitymacavity126 Жыл бұрын
Steve, I really went far in a personal project after watching your stuff. You are a really good teacher, you not only give great content and information, you show the mindset of how to take on each task and problem. Thx a lot.
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
Thank you so much. I'm glad to know it helped you to go far in your project ❤ All the best
@Tinyjb0
@Tinyjb0 9 ай бұрын
Thanks for the quick and easy to understand tutorial!
@coding101withsteve8
@coding101withsteve8 9 ай бұрын
You're most welcome
@eanlakins1754
@eanlakins1754 2 жыл бұрын
The pyautogui locateonscreen feature gives me the failed to read, file is missing, has improper permissions, or is an unsupported or invalid format. Any suggestions to fix this??
@buildsrike791
@buildsrike791 2 жыл бұрын
Same as me
@24-Card
@24-Card Жыл бұрын
Is the png saved locally (to the location of the executable)?
@zerschmetterling6840
@zerschmetterling6840 Ай бұрын
Which OS ?
@Enthralpy
@Enthralpy Жыл бұрын
Loved the video! Feels like I can do a LOT more now than I could before. Also, you can combine moveTo() and click() with click(x = (enter X coordinates), y = (enter Y coordinates)). And I ran into an issue where my brower took too long to load the page before it could find the Search bar, so I made a function that makes your program wait before trying to find an image incase your browser loads too slowly: import pyautogui as pag def find(img): while True: try: x, y = pag.locateCenterOnScreen(img, confidence=0.9) print("Found") return (x, y) except TypeError: sleep(1) print("Waiting") pass You would use it like this: xy = find("image.png") click(xy)
@CadaverTheGhoul
@CadaverTheGhoul Жыл бұрын
if im using pyautogui and i have 10 different instances running and when they handle errors they need to use pyautogui to handle them but whichever tab is the active one on my screen ie whichever instance launced last ends up getting messed with when it is another one buried behind it that is having an error, how do i switch to the tab of python/selenium code that is having the error?
@ff_0xx266
@ff_0xx266 11 ай бұрын
Thank you, this helped me so much! I love the demonstration, you explained it perfectly!
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Glad it was helpful! Thank you for the feedback 😇
@arthursullivan7393
@arthursullivan7393 6 ай бұрын
Image not found problem: multi monitors PyAutoGui only supports the primary monitor, test your code on the primary and it will work fine.
@bagumandal
@bagumandal Жыл бұрын
I love your vlogs! They are so entertaining and informative.
@picofa
@picofa 2 жыл бұрын
Thanks, this was a great start for me, I automated some task using try and except, and a while that cicles every second and search if one of the images show on the screen, if the locateonscreen function doesn't find it, it shows an error and doesn't continue inside the try function. If the images is found there is no error and a code of a macro can be executed. I would add to this video that the cheat sheet of the pyautogui library is very useful, can be found on Google. The functions pyautogui.position() (print mouse position) and pyautogui.moveTo(x=1857, y=1944, duration = 0.2) (where x and y are positions on screen) can be used to click on something else that is not the center of the image, and is very useful for automation purposes. A code example of what I did: import pyautogui import cv2, numpy import time pyautogui.position() # find mouse position for developing while(True): time.sleep(1) # wait 1 second before another cicle try: x, y= pyautogui.locateCenterOnScreen(r"image_path.png", confidence = 0.9) pyautogui.moveTo(x=1873, y=1634, duration = 0.2) pyautogui.leftClick() time.sleep(1) pyautogui.moveTo(x=1857, y=1944, duration = 0.2) pyautogui.leftClick() time.sleep(1) except: None Also, you need to install "pip install opencv-python", it is required too. To exit the cicle I stop it from the terminal, there is also a funcion on pyautogui to exit a program, it is pyautogui.FailSafeException. I hope this comment can help someone.
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
That's great!!!
@gabrielt3578
@gabrielt3578 2 жыл бұрын
Clear code, nice video! Thank you bro
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
You're welcome!
@d8822d
@d8822d 2 жыл бұрын
Great channel, Upload more!
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Thank you. That's the plan.
@d8822d
@d8822d 2 жыл бұрын
@@coding101withsteve8 Yes, if you do it 3 times a week, your channel will have 100k subs in few month mark my words.just keep making content about python only
@Rainquiller
@Rainquiller 2 жыл бұрын
question. where did you save the image file? should it be in the python directory or anywhere in pc?
@donaldtrunp4597
@donaldtrunp4597 2 жыл бұрын
You can save it anywhere in the PC and copy its location. But for me I would prefer creating a python directory for your photos so that it would be pretty much easier to find and organized.
@dominusdone5023
@dominusdone5023 4 ай бұрын
I had persmission problems so I put it in the same folder as my code
@arbangsg
@arbangsg Жыл бұрын
Thx so much you are the best teacher for me
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
Thank you 😇 Glad you learnt something
@oxydripgen
@oxydripgen 2 жыл бұрын
great tutorial. I still have a question, when i run the same code as you did in 2:07 it says "OSError: Failed to read image.png because this file is missing, has improper permissions, or is an unsupported or invalid format"... i have saved the file in the same directory as my program as an png file. I also tried with other files. do you maybe know the issue?
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Hello. Thank you for your comment. It could be possible that the image file was of another format before and you just changed the extension. Eg. If it was image.jpg... You changed it nto image.png. then this error can come. Secondly you can try renaming the file. Thanks you. Hope that helps 😇
@oxydripgen
@oxydripgen 2 жыл бұрын
@@coding101withsteve8 thank you for the answer aswell, i already fixed my issue, i am new to python and did not have my folder open, so my program couldn't recognize the images in the folder
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
@@oxydripgen Glad you solved it on your own. ☺
@tuvelout
@tuvelout Жыл бұрын
@@oxydripgen having the folder with the file ".png" open or close shouldn't make any difference, only if it was there you obtained the croped image, program was searching for.
@pluderr3947
@pluderr3947 Жыл бұрын
@@tuvelout Hey man, it doesn't work for me. I have it saved as a PNG file but it still doesn't work. Do you know what the issue would be?
@palap9506
@palap9506 Жыл бұрын
thanks brother, this is very good, it worked for me. i gained so much knowledge. because you i will try progrmaming
@Machiuka
@Machiuka 10 ай бұрын
Awesome tutorial. I've learned a lot from it.
@coding101withsteve8
@coding101withsteve8 10 ай бұрын
Thank you so much, Glad you learnt 😇
@Michael-hs2wh
@Michael-hs2wh 11 ай бұрын
That tool is so increadibly helpful
@xilllllix
@xilllllix 6 ай бұрын
needed this tutorial today, thanks!
@KauaLopes-xz4uf
@KauaLopes-xz4uf Жыл бұрын
thanks friend you are a friend, I needed to know how to use the image function thanks, I just found the way you use write but I'm a newbie in automo so I need to learn more.
@meraklmuskulpesent8313
@meraklmuskulpesent8313 2 жыл бұрын
Hi, for some reason, locateOnScreen function always returns None, despite both the code and the image are located in the same folder. Thank you.
@nors1056
@nors1056 2 жыл бұрын
did you fix it?
@Harishkumar-tt1nd
@Harishkumar-tt1nd 5 ай бұрын
Hello steve, any solution for searching a text on window and click on it without using images for searching
@malcomivan
@malcomivan Жыл бұрын
brother can help me how can i do this: i have 3 pic (jpg) number 1,2,3 in my screen i must choose the correct, how i say to python click in number 2 knowing is number 2, the number 2 is in the middle for example. thanks, i have screeenshot saved of numbers, but after?
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Check my other video on Pyautogui. There you'll learn the basic commands. It would be better to use coordinates for clicking particular image among 3 images.
@martineschle9149
@martineschle9149 Жыл бұрын
Danke!
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Thank you so much ❤
@pibruks
@pibruks 2 жыл бұрын
love this tutorial man Thank you. Hello from Ecuador
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Hello. Thank you so much
@yippykayyay
@yippykayyay Жыл бұрын
hmm, @2:04 I can't run the program unless I kill the arrow key in the upper right. Typing python pyautogui_imp.py does nothing. new to coding, would love to understand why that is happening
@stupid_idiot_69420
@stupid_idiot_69420 Жыл бұрын
also its good to provide errors when you're asking for help so i would recommend you do that next time :)
@stupid_idiot_69420
@stupid_idiot_69420 Жыл бұрын
my comments didnt go through lol
@test-s8c3n
@test-s8c3n 11 күн бұрын
Hi. I tried Auto IT tool for windows automation. It is so simple and easy to use.
@amz_news
@amz_news Жыл бұрын
if you use this method to subscribe to multiple channels can youtube detect this and cancel the subscriptions?
@freetorunfree
@freetorunfree 9 ай бұрын
thank you for your explanation very helpful! Just one question that you did not call any browser in the code does pyautogui understands that it has to pull up a browser.
@coding101withsteve8
@coding101withsteve8 9 ай бұрын
No it doesn't. It just looks for the image on the screen, and performs the click or key press operations. It's more like a human eye. What is seen on the screen. If there is an app open behind an already opened app. Pyautogui won't see it.
@ashrafulalam6881
@ashrafulalam6881 Жыл бұрын
where i can get the code to run, test and learn
@bananenpflanzer6516
@bananenpflanzer6516 Жыл бұрын
Hey this was a really good video i subscribed, thank you so much
@yajnalgibno6536
@yajnalgibno6536 Жыл бұрын
To the folks who encountering this error message "PyAutoGUI was unable to import pyscreeze. (This is likely because you're running a version of Python that Pillow (which pyscreeze depends on) doesn't support currently.) Please install this module to enable the function you tried to call." Try running this in terminal: pip install --upgrade pillow
@DEMONGAMESYT
@DEMONGAMESYT 6 ай бұрын
W bro ty
@Simpletips55
@Simpletips55 Жыл бұрын
🎉great video you saved my time😊
@rushikeshpachpute99
@rushikeshpachpute99 2 жыл бұрын
year. I want to get into making soft on desktop because it offers more features but I have just been preferring the softow of mobile apps
@keremmert1986
@keremmert1986 5 ай бұрын
Hello Steve, i am appreciate you made very usefull videos, thank you. I have a different problem with automating. I want to able using muose while automate clicking typing etc. on my other screen. Will it be possible with vscode or power automate? I will be so happy if you help me in this problem. Good day sir.
@GrantNaylor-b8l
@GrantNaylor-b8l 7 ай бұрын
A good working example 👍
@jonathanacuna
@jonathanacuna 2 жыл бұрын
So incredibly helpful!!!!
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Thank you Jonathan. Glad it helped You 😇
@a-b-c
@a-b-c 2 жыл бұрын
Thanks bro, That was great tutorial, it made me realise the value of AutoHotKey scripts I write for the very purpose, they are very short and intuitive, I mean I can subscribe any channel with those scripts without inputting their logo. There's nothing we could really do, python needs to evolve.
@HKRajnish
@HKRajnish Жыл бұрын
If I have two same images on screen how to locate the second one? Urgent please
@AshuKumar-lo5vt
@AshuKumar-lo5vt Жыл бұрын
Please tell me, how can I read live data from running applications?
@michellenijman9878
@michellenijman9878 2 жыл бұрын
You are the boss bro!!! Thank you a lot!
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Not a boss, but You're welcome!
@MassimoCLI
@MassimoCLI 3 ай бұрын
Hi Steve, this video is even better than previous one regarding pyautogui. Double thumbs up. I'm Italian and I'd like to prepare a video summarizing the beauty of Python, may I link and suggest your videos. Thanks 👍
@coding101withsteve8
@coding101withsteve8 3 ай бұрын
Thank you ❤ Sure you can
@MassimoCLI
@MassimoCLI 3 ай бұрын
@@coding101withsteve8 Great, many thanks 👍
@AbhisheKumar45
@AbhisheKumar45 3 ай бұрын
How to click 3 buttons at the same time like create a new folder using Ctrl+Shift+N plz explain
@coding101withsteve8
@coding101withsteve8 3 ай бұрын
Try this -> pyautogui.hotkey('ctrl', 'shift', 'n')
@AlexanderWeurding
@AlexanderWeurding Жыл бұрын
Thanks from NL!
@AlexanderWeurding
@AlexanderWeurding Жыл бұрын
Can you add the donate button. Thanks.
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
It's added, thank you so much 😇❤
@nicolassuarez2933
@nicolassuarez2933 6 ай бұрын
Outstanding! Do we have a newer alternative? Thanks
@jacktapping
@jacktapping Жыл бұрын
Great video this is going to help a lot on a machine vision project I'm working on
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
Great to hear! All the best 👍💯
@JaySMeena
@JaySMeena Жыл бұрын
How can convert this project into .exe format... Like other software?
@chineseelectricbatman
@chineseelectricbatman Жыл бұрын
Is theri a display resolution limitation that pyautogui will work with? My data looks like garbage and is nowhere near the image. I've also had to drop the confidence down quite low for it to even detect anything (which might be why I'm getting garbage).
@WanuLopes
@WanuLopes 4 ай бұрын
Sry to be late, but your problem was problably because u were trying to locate something on your second minitor, that is to the left of ypur first, making it have negative coordinates, and... Long story short, it cant handle negative coordinates
@Beeater-i2c
@Beeater-i2c 5 ай бұрын
I have a simple bot for a website that I use, but it stopped working(site update). It’s a typescript and follows a selenium-based script that uses a very simple algorithm. Do you think you can help me identify the problem? Thank you very much for your time and effort!!!!
@coding101withsteve8
@coding101withsteve8 5 ай бұрын
You can share the selenium code and error you're facing along with the website url on my mail. I'll try and check. 😇
@Beeater-i2c
@Beeater-i2c 5 ай бұрын
@@coding101withsteve8 ok great, what is your email?
@Beeater-i2c
@Beeater-i2c 5 ай бұрын
@@coding101withsteve8 ok where do i send it?
@daaduindustries
@daaduindustries 2 жыл бұрын
I have a project to automate my PC. Can you take it up ? Please let know
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Let me know!
@daaduindustries
@daaduindustries 2 жыл бұрын
@@coding101withsteve8 how can i get in touch ? Some mail id ?
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
@@daaduindustries you can check my video on utube views bot in that it's mentioned. At 5:30 Can't send in the comments.
@ayushagrawal9916
@ayushagrawal9916 11 ай бұрын
pysceeze is not working in latest python versions
@afnanahmad4266
@afnanahmad4266 2 жыл бұрын
Bro what if i want to click under an image that has random location on the screen everytime page refreshes. i want it to click on all the pixels in certain area under the image
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
You can find the location of the image and then to click below the image you can use the moveRel and click functions. In my other video you'll find how to use moveRel function.
@afnanahmad4266
@afnanahmad4266 2 жыл бұрын
@@coding101withsteve8 Yeah I understood now!💗 thanks!
@Maliksmm786
@Maliksmm786 Жыл бұрын
bro please make a complete python course. Because you teching method is very simple and attractive.
@InstaSnips
@InstaSnips 9 ай бұрын
hello im confused on what to do because the terminal is telling me this. Failed to read youtube_search.png because file is missing, has improper permissions, or is an unsupported or invalid format. what do you suggest doing?
@coding101withsteve8
@coding101withsteve8 9 ай бұрын
Hello, Check if the file is in the same folder as your python file.
@InstaSnips
@InstaSnips 9 ай бұрын
thank you i fixed it and its working now!@@coding101withsteve8
@okelaquocan2485
@okelaquocan2485 Жыл бұрын
Can the pyautogui locateonscreen auto click VPN unlimited App?Can you help me?😢
@miguelvallejos5868
@miguelvallejos5868 2 жыл бұрын
Em....when we finished to compose how to get it out ?
@persons2480
@persons2480 2 жыл бұрын
Hello, I was wondering how I could locate a certain color pixels then have my mouse follow those pixels, all in pyautogui.
@arcticfox3840
@arcticfox3840 6 ай бұрын
What happens if I two same things in my screen?
@gameplaysc7644
@gameplaysc7644 10 ай бұрын
How search pixel in inactive windows ? And if not error level , send anyone key??
@AllenHorn0507
@AllenHorn0507 2 ай бұрын
OK, I absolutely loved your videos and I have a question… Has this been updated? I am visually impaired, and I’m trying to automate some processes at work. 😊
@AllenHorn0507
@AllenHorn0507 2 ай бұрын
Also, can I install those libraries on a thumb drive so I don’t have to install them on my computer at work?
@sumairahashmi7825
@sumairahashmi7825 2 жыл бұрын
Thanks bud! great video and instructions.
@drizzersilverberg
@drizzersilverberg Жыл бұрын
anyone know how to deploy pyautogui script in remote server and execute it via ssh? because I got display error.
@extrememike
@extrememike Жыл бұрын
Pretty cool!
@RC-qi6hs
@RC-qi6hs Жыл бұрын
can websites detect that we are using some kind of automation using pyautogui ? ( except captchas)
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
No, website can't detect the automation done by pyautogui since, pyautogui automates your mouse and keyboard. It's like you typing or clicking by yourself. So technically it can't be detected that way. But if the websites detect the speed, it can assume it as some bot activity. So you can just control the speed in pyautogui.
@RC-qi6hs
@RC-qi6hs Жыл бұрын
@@coding101withsteve8 thanks for clarifying. Awesome video btw.
@adamstewarton
@adamstewarton Жыл бұрын
Hi , there is an easier way to get the XY cords from your screen. You can write a small script in python: import pyautogui as pag pag.displayMousePosition() if you run it, it will display the cords of your mouse at any time
@NatureIsAmazing208
@NatureIsAmazing208 Жыл бұрын
maybe im stupid but it just gives me like 150 errors
@aaquibtayyabi
@aaquibtayyabi Жыл бұрын
@@NatureIsAmazing208 150 ? lol dk about that but check if you have installed the pillow package through pip and try debugging again
@higiniofuentes2551
@higiniofuentes2551 Жыл бұрын
Thank you for this very useful video!
@lessonsthehardway
@lessonsthehardway 5 ай бұрын
great video except I tried screenshotting the edit button like you and it kept saying image not found, i did it like 5 times, and one of them worked randomly, there was no difference. And now again, its not reading any of them anymore, how do u fix?
@coding101withsteve8
@coding101withsteve8 3 ай бұрын
Try using the confidence attribute. Check my other pyautogui video too 😇
@sudgamer4639
@sudgamer4639 2 жыл бұрын
Ima download it thanks for sharing!!
@zHeavy
@zHeavy 2 жыл бұрын
@coding 101 with Steve - How can I locate some images in a window that's overlaid by other window my screen, example of that situacion, i want to locate the youtube icon, but i need the excel in max size on screen
@zHeavy
@zHeavy 2 жыл бұрын
like, the other screen is in the background. (english is not my first language, i hope you understood)
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Thank you for your question. Actually it's not possible to locate because it locates whatever is seen. To put it simple, it locates whatever you can see 😁. However you can do somthing to minimize the excel and then locate.
@zHeavy
@zHeavy 2 жыл бұрын
@@coding101withsteve8 ok, so do it with pyautogui is not possible, but there is another library that can do this? Unfortunaly, minimize is not an option, because i need to find/read other application and click in the application thats on my screen. Thanks for the attencion
@LukeeRPA-AI
@LukeeRPA-AI 2 жыл бұрын
@@zHeavy you can move the mouse to click the task bar or using hotkey function of pyautogui press keys to change window, like 'alt' and 'tab'
@bubblebath2892
@bubblebath2892 8 ай бұрын
Brilliant Video bro
@nenjuvalitamilreview7512
@nenjuvalitamilreview7512 Жыл бұрын
very interesting concept ! thanks mate
@torque6389
@torque6389 5 ай бұрын
Amazing!
@animevietsub_ne
@animevietsub_ne Жыл бұрын
I want to ask 1 question Can I copy, print and delete in PyAutoGUI function? (delete the part I just entered) Hope you can reply me!
@rigvedakoranne7865
@rigvedakoranne7865 2 жыл бұрын
Do we have to have the .png file in our PC, what if I want to convert the .py to .exe and run that file in someone else's PC? Is there a way to use PyautoGUI without having images saved in PC?
@a-b-c
@a-b-c 2 жыл бұрын
Yes, you can convert.py files to .exe
@rishikesh5783
@rishikesh5783 Жыл бұрын
Hi What to do when screen size changes then the co-ordinate will also change how to handle this?
@prepareyourself7448
@prepareyourself7448 6 ай бұрын
Same question i have my script is working on 1st screen and not on 2nd screen
@edinetgrunhed6000
@edinetgrunhed6000 2 жыл бұрын
thanks for this , can you make video but this time to monitor a when use click "EDIT" button or any custom button (using snippet) and print to screen
@alexeymatveev9031
@alexeymatveev9031 Жыл бұрын
pure gold!
@Mashtainment
@Mashtainment 4 ай бұрын
amazing!
@danielkovacs3664
@danielkovacs3664 2 жыл бұрын
hi thanks the video why I get this error: in = pyautogui.locateOnScreen("fullscreen.png") ^^ SyntaxError: invalid syntax (Expected expressionPylance)
@stupid_idiot_69420
@stupid_idiot_69420 Жыл бұрын
"in" is already in python so try renaming it to something else.
@tuvelout
@tuvelout Жыл бұрын
2:09 alr, got error related with this line "res = pyautogui.locateOnScreen("image.png")" afterwards some more error related with this directory "C:\Users\PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pyautogui\__init__.py" I'll be solving it now, but so far I believe the problem is related with package/modules I have to import. edit. fixed detects the pic on the screen but it is not perfect at it, some pics work some others don't still to figure out
@cheetahsflame1279
@cheetahsflame1279 Жыл бұрын
doesnt work when i try it it just says "no such file or directory: 'edit.png'
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
Hello, this error usually comes when the image file is not in the same folder as your python file or if you change the original extension of the image file.
@saadkhan883
@saadkhan883 Жыл бұрын
What is error pyautogui.ImageNotFound
@akashthorat7044
@akashthorat7044 9 ай бұрын
Try this 👇 import cv2 import numpy as np from PIL import ImageGrab # Load the template image template = cv2.imread('settings.png', 0) # Take a screenshot of the screen screenshot = np.array(ImageGrab.grab()) # Convert the screenshot to grayscale gray_screenshot = cv2.cvtColor(screenshot, cv2.COLOR_BGR2GRAY) # Use template matching to find the location of the template image result = cv2.matchTemplate(gray_screenshot, template, cv2.TM_CCOEFF_NORMED) min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result) # Get the center coordinates of the template image w, h = template.shape[::-1] center_x = max_loc[0] + w // 2 center_y = max_loc[1] + h // 2 print("Image found at:", (center_x, center_y))
@Kirito_explainer
@Kirito_explainer Жыл бұрын
Sir I am getting errors import pyautogui res = pyautogui.locateOnScreen("file.png") print (res) Error: Can't open File 'file name ':[Error 2] No such file or directory What will I do
@af94248
@af94248 Жыл бұрын
try the full path (r'C:\blabla\folder1\file.png')
@ojoaopedror
@ojoaopedror 2 жыл бұрын
Hey dude! Thanks a lot for your great tutorial. I only have one problem, when pyautogui opens the app I need to automate, the code stops giving commands. Can you help me?
@aditokta8842
@aditokta8842 2 жыл бұрын
when i move the window, it becomes defocused
@aivannecabrera3523
@aivannecabrera3523 2 жыл бұрын
I've always wanted to make soft but every ti I download software to do so, I just look at the 5,000 buttons/settings, cry for a few
@gouranga1876
@gouranga1876 Жыл бұрын
It's very helpful
@GeekyNerd14
@GeekyNerd14 2 жыл бұрын
cant we simply use the pyautogui.position to locate the URL ?
@KeyboardJammer.
@KeyboardJammer. 2 жыл бұрын
In mine its showing sleep is not defined I am frustrated
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
You need to import the inbuilt time library.. from time import sleep
@mandeepyadav7253
@mandeepyadav7253 2 жыл бұрын
NICE VIDEO SIR
@gabilondo2k268
@gabilondo2k268 2 жыл бұрын
Where i need to store the png file?
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Hello! You can store it anywhere and then mention the full path in the code or you can store it where your code is and just mention the name of the png file. 😇
@AmDsus2Fmaj7Am
@AmDsus2Fmaj7Am Жыл бұрын
This is brilliant
@coding101withsteve8
@coding101withsteve8 Жыл бұрын
Thank you 😇
@AyaAya-fh2wx
@AyaAya-fh2wx Жыл бұрын
Thank you so much!!!!!
@Beeater-i2c
@Beeater-i2c 5 ай бұрын
Helllo,, where can i send my bot script? to which email? Thank you!
@coding101withsteve8
@coding101withsteve8 3 ай бұрын
coding101withsteve.freelance@gmail.com
@Ditebogomojapelo
@Ditebogomojapelo 10 ай бұрын
😀😀woooooow no ways!!!
@Ditebogomojapelo
@Ditebogomojapelo 10 ай бұрын
Hello sir, what file formatter extension can I use for my code to have the same colors are yours? I have Prettier installed but I just learnt that prettier does not support Python. My goal is for the colors on my code in VScode to look like yours.
@vivianpaul2078
@vivianpaul2078 2 жыл бұрын
subscribed ur channel using this method :)
@coding101withsteve8
@coding101withsteve8 2 жыл бұрын
Great! you learnt and thank You for the subscription ❤
@METE_GUN1010
@METE_GUN1010 8 ай бұрын
bro it says it cant find the file of the image
@METE_GUN1010
@METE_GUN1010 8 ай бұрын
FileNotFoundError: [Errno 2] No such file or directory: 'testing.png'
@b44mbie
@b44mbie 6 ай бұрын
@@METE_GUN1010 you have to click run and debug (hope this help)
@dari0073
@dari0073 Жыл бұрын
Hey i am really new to Python and and i a very paranoid person so i dont really like installing anything. So my question is: How do i know if its safe to install any Libary? I want to install one called ..pyautogui.. and dont know how to check if its safe. Thx for any answer and Great Video
@coding101withsteve8
@coding101withsteve8 11 ай бұрын
Hey, I found a very nice article here. You can check it out 😇 www.codethink.co.uk/articles/2023/pypi-safety/#:~:text=You%20can%20use%20a%20tool%20such%20as%20pip%20audit%20to,Python%20dependencies%20have%20known%20vulnerabilities.
@HungryK
@HungryK 2 жыл бұрын
Thank you!
How to make advanced image recognition bots using python
15:01
Kian Brose
Рет қаралды 1,4 МЛН
Pyautogui image detection
14:41
CodersLegacy
Рет қаралды 35 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
How I make bots using python (educational)
17:12
Kian Brose
Рет қаралды 568 М.
How to automate apps using python (PyWinAuto Tutorial)
26:27
RandomGuy
Рет қаралды 98 М.
Game Automation with YOLOv8: Python Bot Tutorial
21:40
ClarityCoders
Рет қаралды 52 М.
Automate your job with Python
6:07
John Watson Rooney
Рет қаралды 435 М.
Using Image Recognition to DESTROY Fruit Ninja
10:08
CodeNoodles
Рет қаралды 615 М.
All Top 40 Python Libraries EXPLAINED in 20 minutes
22:04
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
PyautoGUI: Three Great Uses
12:13
BaldGuyDIY
Рет қаралды 40 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН