How To Easily Automate Everything With Python

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone thank you for joining again my name is Taylor and today I'm going to show you one of the best packages you could install in Python if you haven't already let's open up a web browser and install python by going to python.org and let's go to downloads and then click download python once you've finished installing python you can verify that it installed correctly by opening up a Powershell window and typing python if you see something similar to this that means that python is successfully installed in your system let's exit out of this by pushing contrl Z and enter and let's use a text editor called Kate you can download Kate by opening up a web browser typing k-edges 4bit installer and then finally click on thee file after you verified that those applications are installed let's go ahead and open up a file explorer window click on view and make sure that file name extension is selected we'll go ahead and close this rightclick on the empty space of your desktop click new and then text document delete everything including the txt extension and let's name this auto. py it'll say are you sure you want to rename this file with this extension say yes now let's rightclick on that py file and select edit with Kate on my last video I didn't show you how to change the look of the Kate text editor I like the dark theme on this let's go to settings and then select window color scheme and then select Breeze dark I personally prefer the way this looks over the white background so now that we're in the auto. py file let's go ahead and create our main function by typing if uncore uncore name uncore uncore double equals uncore uncore maincore uncore and add a colon at the end and now that we have specified our main function we're going to import this package called Pi Auto GOI we do that by typing import Pi Auto as p a what this is saying is import the pi Auto GOI library or package as p as means use this variable name instead of typing out all of the py auto we need to install py auto and the way we do that is we have to open up a Powershell window and type pip space in install space Pi Auto let's hit enter what this will do is it'll grab the package from Python's package manager which is pip and it'll install py auto for us and all of its dependencies okay now that this is installed successfully we could test this out by typing python enter and then let's type inut import space Pi Auto goey hit enter if you see that no errors pop up that means that it's successfully installed so let's go ahead and close this out now that we've installed the P Auto package let's go ahead and start using it let's type print meaning display this on the screen p a do position what this will do we'll get the position of our mouse let's save this program and the great thing about the Kate text editor is we could open up a terminal within the text editor we do that by going to tools and then selecting show terminal panel as you can see here it shows the terminal as a Powershell window now let's get the position of the windows icon we can do that by running this program and moving our Mouse to the windows icon we run this pram program by typing in the terminal python space and then the name of our file which is auto. py now let's move our Mouse to the windows icon and hit enter as you can see it gave us X and Y coordinates of the windows icon let's go ahead and save these coordinates here by highlighting them and then right click copy now what if we wanted to move to the windows icon and click on the Windows icon we can do that by typing peg. move capital T to open and close parentheses and give it the XY coordinates now it'll move to this icon and then we have to click on it so let's type Peg dot click open and close parentheses and save now let's rerun the the program by typing Python auto. py and hit enter as you can see it moved to the XY coordinates where the windows icon is it clicked on the Windows icon and it opened up the start menu here this is very powerful when automating desktop tasks so what if we wanted to type something after we have clicked on the Windows icon we can actually do that by using the type right function so if we say peg. typew right open and close parentheses and open and close quotations and in here we could type whatever we want so I will say notepad and save now if we rerun this program it's going to move to the XY coordinates of the windows icon it's going to click and then it'll automatically type Notepad let's go ahead and run this program by typing python auto. py as you can see it automatically opened up the windows start menu and typed notepad and here's the Notepad application py Auto is a very useful package when you're trying to automate anything on your desktop I highly recommend you use it for repetitive tasks thank you all for watching and I hope to see you next time
Info
Channel: Taylor's Software
Views: 319
Rating: undefined out of 5
Keywords:
Id: C6ertWb0rZ0
Channel Id: undefined
Length: 7min 25sec (445 seconds)
Published: Fri Feb 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.