Running on python 3.6 , mac OS X El Capitan , idle.
I basically want to search a title of a game on google or another search engine and I want to set a time to search it. I've tried the code below and sometimes the code gets executed (it will open the browser and type what I want it to type) and sometimes it doesn't. This is my program thus far;
#!/Users etc
import re,sys,os.path,pip,os.path
import webbrowser
def press_key(key):
cmd = "osascript -e 'tell application \"System Events\" to keystroke \"" + key + "\"'"
os.system(cmd)
b=webbrowser.get('safari')
b.open('google.com') and press_key("hello")
Also I want to search results in a cvs file or similar type file where i'm able to sort it "graph style". Filter results by price etc.
At this moment , what i've written down is just a script and it doesn't work all the time. Are there any modules to type interactively you would recommend for a mac user? I would like to look at faster alternative ways if there are any.