Al Sweigart, "Automating Your Browser and Desktop Apps", PyBay2016

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hello yes okay I'm Elle Swaggart uh hi how's everyone doing that's great yeah um so I've been programming in Python for a number of years now I really like programming I really like the attention to detail that programming requires for people from you in fact I like it so much that I wrote a book about programming it's called automate the boring stuff with Python it's released under a Creative Commons license so you can go online and read the full book at automate the boring stuff com and one of the benefits of doing this was that I can look at the web analytics and see where all the traffic's going and a lot of people seem to really like the web scraping and GUI automation chapters so that's what I decided to make this talk about I'm going to be talking about selenium and also another module called Pi auto GUI so Wow web scraping this is a huge topic pretty much a lot of the stuff that we do on the computer is really stuff that we do on the web like if you've ever been in one of those terrifying situations where you don't have Wi-Fi and you just kind of like instinctively open your web browser and then realize oh that's right and so you close your web browser and then you open your web browser again to check Twitter and oh right I don't have internet the Internet is a big part of of what we do on our computers and so it's really great if we can write software that can interact with websites and pull content off that but unfortunately that requires knowing a lot about networking protocols and HTTP and how to handle errors and so I have but I've listed all those details on this next slide oh well okay anyway forget about that you actually don't have to know about any of those details because there is a tool called selenium and you can have it on Python just by running tip install selenium or selenium sell an item however you want to pronounce it and this is a module that will actually launch a web browser that you can control programmatically from your Python script so you can tell it where to go and so this way this web browser can handle all the web browser stuff that automatically happens like it can run JavaScript and you can easily log into things you don't have to know about get and post and cookies and setting all of that other low-level networking stuff selenium will do a lot of this for you automatically and so this is kind of what selenium looks like when I first heard about this tool it was something that the QA department was using they were like creating this automated test suite for the web app and it sounded really complicated so I sort of just put off learning about it but actually it I don't know 10 15 minutes you can learn all the basics and then start using it and that's about 90% of what you need so I fit it all onto this one slide there's a few tiny little warts about it one of them is you have to run like from selenium import webdriver you can't just have import selenium and there's a few other warts that I'll be going over as well but yeah this you just import it you can run webdriver dot Firefox or webdriver Chrome you can setup different browsers to run and this will actually launch a web browser that appears on your desktop and your script can then control it you just have this browser object that it returns you can direct it to a website you can find some sort of HTML element that's on that web page by passing it a CSS selector and this is really complicated but there's a cheat that I'll go into in a little bit but yeah once you have that element just you know a paragraph tag or a text field or a checkbox or a button you can then read what text it has so you can read what the text on the web page is if it's a checkbox or a button you can click on it and then you can just quit from the browser and that'll just shut everything down for you so this is a lot of telling and not showing so I'm going to do something that is highly ill-advised and that is I'm going to do a live demo of this code so I am breaking out of PowerPoint right now oh not quite yet going to go this next slide so this is that's CSS selector stuff I'm going to show you exactly how you can use a selenium so I'm just going to run idle oh man everything can go wrong like Wi-Fi could cut out anything it'll just be an awkward mess but let's see if I've appeased the gods and this will work so from selenium import webdriver going to get your browser object I have chrome and you can see boom just this web browser just automatically pops up and you can do something like oh just go to because I want to plug my book again automate the boring stuff dot-com no syntax errors that's great and so now you can programmatically control this web browser to do whatever you want now there is that next step where you want to you want to grab an element on this web page and you need to figure out the really complex CSS selector and maybe you know CSS and all about selectors maybe you don't all web all modern web browsers have a nice little feature where you can just right click on some element like say I want this link to the Creative Commons license I can just select inspect and this will bring up the developer tools for for this webpage and all browsers have some sort of developer tools usually just hit f12 to bring it up it's really handy if you're ever doing like some sort of like non Python language like JavaScript and you have to debug stuff but yeah we can just go through here and okay there's that link I'm just going to right click on it in chrome it's like copy selector in other browsers it might be copy CSS path or copy CSS selector or something like that that's that really complicated a bit of text right here and so this is the CSS selector for that one link and I'm going to what was that browser dot find element by CSS selector that's a huge mouthful it's another like okay if I was in charge of selenium I would have given that a shorter name but hey it works and then we get this web element object Oh messed up this live demo let me just save that to a variable that'll be much more useful so this is the web element object that represents that link and then you can just say well what's the text in that link oh it's Creative Commons license so you can see that right here and then if you just wanted to click on that you can just call click and then I'll just follow that link so now you're controlling the browser from your Python script so you can imagine all sorts of cases where you have a web app and you want to write all these automated tests make sure that some text appears after you click on this thing and it's really simple this I mean what I'm 10 minutes into my presentation and that's about 80% of all the things that you need to know about selenium to get started okay let me go back to the safety of the PowerPoint presentation away from the live demo oh yeah and of course I go to the wrong slide so that that method was find element by CSS selector which is quite a mouthful there's also a few other ones like find element by I think ID or by tag name or by link text 80% of the time you're going to be using by CSS selector there's also find elements plural which will return an entire list of these element objects so if you just wanted to specify something much more broad maybe go through like all the links you can use that so next you can see I call that click method just to click on it if you have a text field element that you've grabbed and you want to fill out the text field you can just call this sendkeys method and pass it a string and I'll just automatically type it in if the element that you've grabbed is part of a form you can submit the form by calling submit if you have if you just want to press random keys that you can't really type into a string like the Escape key or the down arrow key there's a whole bunch of constants insulin that selenium provides this is just a random table you don't have to memorize all this right now but you can find all this information unfortunately it's in this module called selenium webdriver common keys which is kind of a convoluted thing so if you've ever read the zen of python one of the things is flat is better than nested and this is kind of an example of something you don't want to do it'd be much nicer for your users if you just have from selenium import Keys you know you don't have to deal with that huge arbitrary category hierarchy thing but yeah so that's all about clicking on things inside the web page but you can also control the web browser itself in selenium so you can probably figure out what all of these methods do if you want to click on the back button or click on the forward or refresh buttons it's really just really straightforward and then reading all of the data off of the webpage itself it's just dot text whatever element you're looking at you can just get dot text that returns a string if you want to look at the HTML in this element say you have a link element and you want to see where that link goes and so you want to look at what the href value is you can just call get attribute and pass it href another weird wort you might think that if you wanted to get a list of all the attributes for that for that link or for that element you just call get attributes unfortunately for whatever reason this doesn't exist and there's sort of a weird workaround where you can get the outer HTML attribute and that will return all of the content and everything has a string and you can try to parse that maybe but I mean so this works be great if get attributes was added one day to this but it is possible to get a list of all of the all of the attributes for some element that you have so that is a selenium you can just audit what I'm I have no idea only break out 11 minutes into this presentation and I've already covered basically all you need to know to start writing automated tests for your web app it's that simple but let's say you're apparently there are web there apps that aren't web apps these days who knew and using selenium won't work for that you need to control stuff that's outside the browser so the is a much more broader tool that does GUI automation and this is a very fancy word that or term that just means writing programs that can control the mouse and keyboard on your computer so if you have some desktop application and you want to automatically check you know is I want to click on this menu and then click on the submenu item and make sure all these things appear you can just directly do that in automated fashion by controlling the mouse and keyboard directly and so the tool that I'm using for this is one that I wrote actually called Pi auto GUI it I basically wrote this because there was a lot of existing GUI automation modules for Python but none of them were for Python 2 and 3 and some of them were just for Windows or just for Mac so I wanted something that worked on every single on every single major operating system out there and also I went something with a really simple API so I kind of just did a lot of copying and pasting and a bunch of testing and came up with Pi auto GUI and you can there's a documentation that is mostly up-to-date at read the docs org and so I tried to make this a really easy like straightforward tool to use so here's all the functions for for controlling the mouse I mean if you want to click the mouse wherever it is you just call PI auto GUI click if you wanted to click somewhere on the screen you can just pass X Y coordinates there and it has things for a double-click and right click the the click function itself has all sorts of keyword arguments to do fancy sorts of clicking but these are all just the basics and you know 99% of the time that'll be enough that you need if you want to move to the mouse to some XY coordinates on the screen you have move to that'll move it instantly over to the screen or you can have it just gradually move to the final destination by just specifying some duration that it'll take like 3 seconds to move there or if you just wanted to move it you know 10 pixels over to the left there's move rel to move it relative to where it already is and then there's drag too and drag rel for holding the mouse button down while dragging this and then if you wanted to get where the mouse pointer is currently there's position if you want to get the resolution of the screen there's size and then there's this tiny function that's kind of like a sort of mini program inside this module called display mouse position which I will now go back into the dreaded live demo and see if this actually works okay so import PI auto GUI display Mouse position is really handy if you're planning out what you want to click on because by running this it will give you a position it'll give you this real-time updated position of where the mouse is so you can see 0 0 at the very top of corner of the screen is up there and you can move it around it'll also give you the red green blue color value of whatever pixel is directly underneath the mouse so you know if you have like a check box here and a check box here and a check box here you can just sort of move the mouse over there and just write down all these coordinates and plug those into yours into your script or test later and I can hit control C to stop it yes controlling the keyboard is a lot simpler because there's just fewer things to do the main function here is just type right so PI auto GUI type right pass it a string it will just send those keystrokes to whatever application has focus or if you want to have a just press some other key that you can't easily type into a string like page up you want to press the page up button you can call the press function there's a whole list of these strings for various keyboard keys in Kyoto GUI keyboard underscore keys and then finally if you want to do like some shortcut or hotkey like ctrl o to open you can just call the hotkey function I'm going to go back into live demo mode hopefully this will work ok so here's Idol like most applications you can hit ctrl o to open up a file please work please work please work please work please work please work please work hotkey control oh and then this simulates doing control oh I'll I'll keep my hands up so that you can see that I'm not pressing control oh it just opens it automatically by itself hmm yes I can press control oh this is fascinating I can just keep doing this all the time very impressive yeah so let's go into some more substantive live demo I'm just going to exit out of here and now I will do it not only will I do a live demo I will do a live demo that depends on Microsoft Paint yes remember this tool uh yeah just drawing things all over okay so this is just a basic graphics tool you can just draw simple pictures on it there is no API for Microsoft Paint you know I guess Microsoft didn't imagine that this is you know a great powerful tool that everybody would want to have a programmatic interface to so they didn't include that but now with Pi auto GUI we can have this let me find this file which hopefully still exists yes it does ok so here's a small little script I made that has a PI auto GUI you can see all it does is it'll give me a five-second pause just so I can position everything and just click on the a ms paint program and then it'll just start using drag rail to drag the mouse relative to its current position just move it right and move it down and move it left and then move it up so it'll just draw this sort of spiral pattern because the distance will be decreasing after a while so let me just okay I'm going to press f5 to run this I'll hold my hands up so that you can see I am NOT drawing this myself so f5 ok have five seconds put that there hopefully this will work ah whoo so I mean you might have so you might think well okay I mean there's pillow and there's all these other image modules so you could create images from your own application but you know notice mspaint has this nice nice nifty little brush tool and so it's more than just drawing lines you can make use of the tools that mspaint provides to create images automatically and also you can do it much more precisely - like if I try to draw this shape myself you can see it is not nearly as well done so this is the power of doing GUI automation and being able to control the mouse and keyboard and thus then therefore just basically being able to control any application that's on your computer but there is sort of a downside that I wanted to warn you about there's that movie Fantasia and a scene in it called The Sorcerer's Apprentice is the one with Mickey Mouse dressed as a wizard and he enchants these brooms to just go through and oh yeah of course this is going to come up no so he enchants these brooms to get buckets of water and fill up a bath over and over again except you know these are just mindlessly programmed to continuously fill up this bath water even as the water starts overflowing and Mickey can't stop it and instead it just starts filling up the entire building same thing with with pie Otto GUI and GUI automation because your script is controlling the mouse and keyboard if you want to stop that script you might not be able to move the mouse over to close that window and end up just having - I don't know pull the battery out of your laptop or something like that so high auto GUI does have some failsafe mechanisms in it the main one is that if you ever move the mouse to the top left corner where X is zero and Y is zero every every PI auto GUI function will be checking for this at the end of its of the code that it runs and if it sees that the mouse is up there then it'll automatically hello again yeah I'll just I'll just keep that and don't show that so helpful you can move so you can move the mouse cursor up to the top left corner and it automatically kill the the program by just raising this failsafe exception every single PI auto GUI function has a ten-second delay so it just gives you a little bit of time to toss this and you can change PI auto GUI pause to be a larger number if you want a larger delay so I'm going to go back to live demo mode let's run this program again except let's say that it's going out of control let's say this number is it's completely wrong or I just have ooh so a live demo with an infinite loop I really hope this works um okay so I'm going to run this and then it will be constantly drawing this and I can't stop it because it's moving the mouse so I just have to slam the mouse up to the corner did this actually work hey I think it did yes so it just raises this failsafe exception and that will halt your program and so you want something like that no matter what GUI automation tool you're using unfortunately there's no like global hotkey support yet in in PI auto GUI so you can't just hit like ctrl P or something like that to stop it but there is there is some sort of mechanism where you can stop the program from running the other downside for GUI automation tools is that you can pass it XY coordinates and say just click here and it really won't know what it's clicking on it's just you know just blindly click on whatever so it hopefully your window is set up correctly and there's a button that you want to click on it's in the right place but if not then your program can just start clicking on random stuff and continue running like a mindless broom from that Disney cartoon so pi auto GUI also has some limited image recognition facilities one is just the pixel function which just returns the RGB value of some x one of the pixel at some X Y coordinates so if you're expecting to click on a gray submit button then you can check okay is this actually gray where the pixel is but a little bit more sophisticated than that is you can also use screenshots and find images on the screen this is because pi auto GUI relies on pillow to do this if you're on linux you'll have to install this one tool scrot which does screenshots but you have this one function here locate on screen that will locate where some image where where some something on the screen is I'll show you with another live demo so let's just bring out all of the windows applications here's the calculator app that comes with Windows and I've created an image that of the seven key so let me actually just find this yeah seven key dot PNG this is just a regular image just like that and I can say I can ask PI auto GUI like look on the entire screen take a screenshot and then find out where this image is and if you find it give me the coordinates for where it is so let me just run this ok pi auto GUI locate on screen hopefully my working directory is set up and then run this and then it returns a rectangle basically here's the XY coordinate for the top corner hello thanks and here's here's the width and here's the height of that area on the screen where it found that seven key there's also locate Center on screen and notice this function was kind of long it took like half a second it could take upwards of two us up to a second to actually run so if you're trying to do something in real time where you need to have it located you know a hundred times a second this is probably not the function for you but if you look in the documentation there are several ways that you can make it faster just by searching a subset of the entire screen or a few other options that you can look at another function there is locate Center on screen if you just want the XY coordinate for where the middle of this rectangle is so you can see I'll just copy and paste this and then have PI auto GUI just click on that seven and you see the mouse instantly moves over there to click on the 7 you can even have something like put this inside of a loop and just have it click on that 7 over and over and over again so that's a way that you can have some I mean it is sort of you need a pixel perfect copy of what you're looking for if you have open CV also installed then Pi auto GUI can use that to get kind of like a fuzzy match so it doesn't have to be exactly what you're looking for so but just plain vanilla PI auto GUI you know if there's a slightly if there's just one pixel that's off by is a little bit and it's not going to find it you notice right here the seven key helpfully highlights if the mouse is over it so that'll totally throw PI auto GUI off but you do have something where you know you can at least find out where things are on the image or on the screen and go back to this alright so what is GUI animation used for I should have probably put this slide at the top of the talk but you can see well we can automatically test desktop apps things that aren't web apps that don't run in a browser selenium is great for testing things that are in a browser that's what you want to use GUI automation is sort of something that you want to use as a last ditch effort if there's no API or no other way to do it but you can also use it to you can also use GUI automation to test non HTML stuff in a web app so say you have a flash animation and you need to click on buttons inside that flash animation there's no HTML tag for for those buttons inside the flash animation or there's no HTML for stuff inside of a html5 canvas so it's great for just being able to click inside of things like that but the number one thing that you can use GUI automation for is to cheat at flash games so this is the final live demo the most ambitious one of them all so there's a flash game called sushi go round this is sort of a dine and dash game you have customers coming in there ordering sushi and then you have to click on the sushi ingredients but you also have to make sure you have enough ingredients and there's new customers coming in you have to clear the plates and all these really complicated things and you know you could spend time getting better at this game or you could write a program that plays the game for you and then stops and lets you type in your name when you get the top score for this so okay final live demo hopefully this is going to work this is something I have on my github repo sushi go round bot all right hopefully this is going to work it's going to take control of the mouse and keyboard so I will have no control over what it does next but let's try this okay there we go it finds out where the window is on the screen and then it starts ordering sushi for people so I can just think I'll just take a nap like the next five minutes of this talk and let it do its thing but you can see yeah it's I mean there were it doesn't play this game perfectly of course there were a lot of issues like I discovered while creating this and it sometimes gets confused but for the most part this can just play through the entire game and get a pretty decent high score what is worrying is that there are plenty of human players who can get a higher score than this bot which means they have spent a lot of time getting good at this game or they're just better at programming GUI automation BOTS to play it um yeah okay so and whenever I want to stop this I'll just have to slam the mouse cursor to the top left corner hopefully this works okay yes and then that raises the failsafe exception so cheating at flash games yes that's this entire talk you can download these slides from bitly slash automate talk again the module names are selenium selenium cell and I am however you want to pronounce it and PI OTO GUI you these are also covered in my book which you can read online at automate the boring stuff comm and here's my contact information thank you very much for for attending with soft yeah I guess we have time for questions as well so I don't know what the process is I just line up at the mics hello have you tried mixing selenium and peyote GUI to open a browser with selenium and then click it with peyote GUI I have an it's surprising what happens is that a dark portal appears and opens unleashing all sorts of I mean theoretically I guess this is possible you could do that selenium is really nice because it usually blocks on any function calls you make so if you click on a link it'll usually block and only return after the browser is done loading that new page that it's been linked to so being able to get all of the things working nicely together is entirely possible but yeah that's that's the main downside of GUI automation is that it's kind of really brittle it's easy to have your program to start clicking on random things and then you know say a dialog window appears in the middle of your presentation or some other unexpected thing happens it can totally throw off your automated script but yeah you can totally use them both at the same time if that's what you're if you have like a web app that also has flash animations that do other things but yeah any other questions you mentioned that to locate the cursor with the image it doesn't do fuzzy find it but for example if your windows plugging to your screen resolution changes to what s your work so if your screen resolution changes it will still work because it's the same pixels yeah unless your app is resizing everything else for different resolutions but yeah if you have any sort of like zoom in or zoom out or magnification that's happening then it'll it won't work for that there so you can help it can also detect if OpenCV the open computer vision module for python is installed in that case it'll start using that to do this matching and for that you can specify some sort of threshold like instead of like a perfect match you can specify 0.8 and that way if you know a few pixels are off then it'll still be able to find it on the screen but yeah just if you just install PI out of GUI by itself it'll it'll have to rely on having a pixel perfect match each time okay thank you anything else or anyone else having to use a peyote GUI in you know windows yet but I use another tool called alternate I know that's pretty much a similar thing and some there's like tons of a script you know people just create an eye yeah I know there's a like I just Google around there's a Python binding for that as well but didn't come up dated for two years yeah that's if something similar I found with a with a lot of GUI automation tools because I mean this is a really handy thing just be able to control the mouse and keyboard like if you're there's some API but it doesn't quite work as it's documented or it's not documented at all and you just want to toss up your hands and say whatever I'll just program the computer just automatically click on stuff so it's a really useful thing but a lot of tools that do GUI automation are out of date or you know they're there only for Python too or they only work on Windows or something like that which is why I created this module to sort of be able to just work and something else I was going to oh yeah so auto IT has a lot of great features there's another piece of software for Windows called autohotkey which is really wonderful except that they invented their own scripting language that you have to write in in order to use it which kind of limits how how great it is but yeah I am accepting pull requests on github for pi OTO GUI if you want to contribute there's sort of a roadmap mostly just looking at what autohotkey doesn't say that's really cool I wish PI auto GUI did that and then realizing I don't have a lot of time to actually follow up on that another question is about asana Nia and could you just do the I mean your script is great supporting the like exporting of the Centennial script or whatever for Lowell test or mean I mean of course it's poor man's notice because for real Waipahu a skill or honor but that's $100,000 so oh yeah yeah so I mean selenium is its own standalone tool that has bindings for a lot of different languages such as Python so selenium actually has a lot of different features like if you want to test different browsers and different at different resolutions or you're constantly running these on like headless machines that don't have a monitor installed so I'm not sure how much of that functionality is exported to the Python binding for selenium but I'm assuming that it's a lot of it I've kind of just barely scratched the surface but there's a very rich rich ecosystem around selenium that you can dive into but for this talk I just wanted to sort of give the fifteen minute overview of that tool and show that it's really you know you don't actually have to read too much on it to be able to start using it and getting some use out of it oh yeah ken is peyote GUI used by digital artists anyway to do anything more complex than Wow I mean I just drew the spiral there so I would like to assume I'm a digital artist um outside I mean Microsoft Paint so uh I mean if if artists do use it then they haven't told me I think mostly it's just been used for like really simple automated testing or if you've ever had like some really some enterprise software terrible UI where you you know when you log in you have to click on 20 checkboxes before then people have told me they wrote like a quick script that'll just automatically click on all 20 of those checkboxes because they're tired of doing that every single morning when they come to work and login so like really simple tiny scripts like that people have told me they found pie OTO GUI to be really helpful doing that stuff but as far as automatically using are like automating artistic processes or whatever I know like programs like Maya and other large pieces of art software have api's and other things are really fancy but you know if the documentation is really poor or there's something else that you don't want to do or like Photoshop automated batch processing doesn't do something that you want to do you can always write a script that'll just like oh well click here click here click here then click here and then just do that in a loop over and over again I mean but it has an application for that too thank you do you have any record and playback options using my artists so far no that's something that autohotkey does that would be really nice it has some sort of feature where you can just set it to record and then it'll just record all the mouse clicks that you do the major stumbling block for a feature like that is I want to have it on Windows Mac and Linux and have it working all the time so just like I'd like to be able to set up some sort of like global hotkey regice registration so if you press you know control B or something like that then PI auto GUI will be able to detect when that happens and call some function or something like that but so far there and once I have something like that then it's probably related to being a little record stuff so right now the best thing I have is just that what import PI auto GUI power great this display mouse position thing that can just tell you where the mouse is which is a tiny tool it's you know you have to basically write down something on paper a text file where your XY coordinates are and so unfortunately this isn't very sophisticated for for your workflow right ideally that would be something I want to add to peyote GUI which would just streamline it so much but yeah hi I'm just wondering what was the origin story behind automate the boring stuff and what did you originally intend your audience for this book to be oh so um I think it was like about 2012 maybe well this meme has always been out there of everyone should learn how to code but a few years ago it really became very pronounced on Twitter and social media like everybody's kind of worrying about software eating the world and so this meme of like everybody has to learn how to code yeah and so I thought about that and thought well I mean sure that'd be great but not everybody has to become a software engineer so what if everybody could start knew how to do some rudimentary programming I realize you know well there's a big use case with office workers or anybody with an office job and you're dealing with Excel spreadsheets all the time I had some friends who you know would say I spent four hours today opening a PDF highlighting some bit of text copying and pasting it into a spreadsheet and then opening the next PDF and just doing that over and over again and so the sort of thing where it's like oh well if you knew how to program even just a little bit you could write some script that could automatically do this so I started generating a whole lot of use cases of like well what do people need to know coding to do like what's the actual practical application for that and so that's sort of where automate the boring stuff with Python came in I sort of thought okay what would office workers or hobbyists people who want to learn to program but and also you know but they're not necessarily going to become software engineers so you know it's okay if they use global variables everywhere for their small scripts or something like that and so I came up with a whole list of topics of web scraping and GUI automation but also just you know updating Excel spreadsheets from a Python program or parsing PDFs or parsing Word documents and so the first half of this book is basically a generic Python tutorial and then the second half just goes through all of these different Python modules that many people have written and just exploring like oh how can you do all of these practical tasks and it's worked out pretty well I get a lot of great feedback from it and I decided to put it under a Creative Commons license and so now it's also free to read online as well oh and also right now there's a there's currently a Humble Bundle if you go to Humble Bundle com you can get the e-book of this for a dollar along with several other no starch press books so I think that goes on for for another seven or eight days if you just want to get a nicer PDF instead of just reading the HTML version of it but yeah that's basically where this book came from have you ever done any sweet pranks with the either of these tools what are you a cop no not real life is like that's sort of like what high school al would do but I mean technically I guess you could just have a script ring in the background and oh is this still recording it doesn't matter okay so one thing I would do is when you know a friend of mine when they worked from home but wanted their instant messenger to show that they were always active and on the computer because that that sets you to idle like after five or ten minutes so I just wrote a script that you know just every second or like every 10 seconds just moves the mouse over by a pixel and then 10 seconds later moves it back by a pixel just this so that there's some activity right there this is what my friend did next question oh okay I guess that's it so thank you very much
Info
Channel: SF Python
Views: 321,093
Rating: 4.9610052 out of 5
Keywords: PyBay, 2016
Id: dZLyfbSQPXI
Channel Id: undefined
Length: 41min 59sec (2519 seconds)
Published: Sat Sep 17 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.