Still haven't decided what program I'd like to write using python... but I'm going to start just randomly messing around .... 11:32
http://kogs-www.informatik.uni-hamburg.de/~meine/python_tricks
got sidetracked looking at carbon stuff related to recording mouse events...
http://www.meandmark.com/timerspart1.html
(this is good)
also found this which seems good.. for forcing a window to stay on the top
http://developer.apple.com/carbon/tipsandtricks.html
Well, I've almost got it working its now 12:45 ... 1 hour approx... but I spent a good 25 minutes helping do some housework and talking on the phone...
GLOBAL MOUSE COORDS WORKING ... APP DOESN'T EVENT NEED TO BE ON TOP! - I don't think I would have got this working if it weren't for messing with python (even though in the end I didn't use python at all).
Sunday, January 17, 2010
Thursday, January 14, 2010
Goal 5 : Basics
So... I think I need to use carbon to get the exact kind of mouse event stuff I was looking for... its tedious, but there's no rush for me to find out exactly how to do it... in the meantime I'm going to take step back and play with python in a slightly more regular way... starting with some basics today I'm going to mess with writing functions, look into where the math functions are and a few other things... starting at 3:31
cool that you can multiply strings...
"hi" * 5
"hihihihihi"
http://docs.python.org/tutorial/introduction.html
lists look both interesting and complex... didding haskell more than python... nice stuff though... 3:43
# interesting
a, b = 0, 1
cool that you can multiply strings...
"hi" * 5
"hihihihihi"
http://docs.python.org/tutorial/introduction.html
lists look both interesting and complex... didding haskell more than python... nice stuff though... 3:43
# interesting
a, b = 0, 1
Wednesday, January 13, 2010
Goal 4 : More Mouse Events
Looking for the system hooks... hopefully my notes from yesterday will lead me in the right direction.
409
hmmm looking kind of annoying at 413... going to rest a bit and get back to this later
originally started looking into python specifically to record mouse events... just found out how to do it in carbon I think?
http://developer.apple.com/Mac/library/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
will look at that later....
still interested in python though.... i remember seeing something interesting about python and artificial intelligence will dig that up in the near future....
4:20
409
hmmm looking kind of annoying at 413... going to rest a bit and get back to this later
originally started looking into python specifically to record mouse events... just found out how to do it in carbon I think?
http://developer.apple.com/Mac/library/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
will look at that later....
still interested in python though.... i remember seeing something interesting about python and artificial intelligence will dig that up in the near future....
4:20
Tuesday, January 12, 2010
5 minute terminal play
I played around with python and terminal for 5 minutes at some point and noticed that I could program UI stuff in realtime (very nice)... also saw what looked like some kind of alternative syntax for python.
Going to relax and look at the docs for 10 minutes...
Going to relax and look at the docs for 10 minutes...
Goal 3 : Mouse Events 1
Want to mess with mouse events if possible today... Goal : 4 will be more basic... should really look into variables a bit more ....
I used a little python today ... just the shell to do some basic calculations...
110 % 3 and a few others, for something I was writing.
Anyway... it 1:48 and I'm going to go ahead and check out mouse events for 15...
I got mouse events working in Tkinter, but I want system hooks ... and just found this:
(windows only)
http://pypi.python.org/pypi/pyHook/1.5.1
(osx cocoa - i think this is the way)
http://stackoverflow.com/questions/281133/controlling-the-mouse-from-python-in-os-x
...
So looks like Goal : 4 is still accessing mouse events... I Tkinter is good for interface stuff, but I need the system hook for what I'm working on...
Here is the Tkinter stuff:
I used a little python today ... just the shell to do some basic calculations...
110 % 3 and a few others, for something I was writing.
Anyway... it 1:48 and I'm going to go ahead and check out mouse events for 15...
I got mouse events working in Tkinter, but I want system hooks ... and just found this:
(windows only)
http://pypi.python.org/pypi/pyHook/1.5.1
(osx cocoa - i think this is the way)
http://stackoverflow.com/questions/281133/controlling-the-mouse-from-python-in-os-x
...
So looks like Goal : 4 is still accessing mouse events... I Tkinter is good for interface stuff, but I need the system hook for what I'm working on...
Here is the Tkinter stuff:
# File: bind1.py
from Tkinter import *
root = Tk()
def callback(event):
print "clicked at", event.x, event.y
frame = Frame(root, width=100, height=100)
frame.bind("", callback)
frame.pack()
root.mainloop()
Monday, January 11, 2010
Goal 2 : Increase UI Knowledge
This may well be a lofty goal... and I'm cheating a bit by doing 2 15 minute sessions today... but I'm curious how the UI stuff works in python, so i'm going to google around for 15 minutes - will test and document my findings...
starting at 5:50
http://www.pythonware.com/library/tkinter/introduction/whats-tkinter.htm
at 5:56 I was able to get a UI hello world running using Tkinter...
Cool. so Tkinter seems to be the way to go for UI, it appears to be pretty straight forward.
Next up is to look into mouse events.
starting at 5:50
http://www.pythonware.com/library/tkinter/introduction/whats-tkinter.htm
at 5:56 I was able to get a UI hello world running using Tkinter...
Cool. so Tkinter seems to be the way to go for UI, it appears to be pretty straight forward.
Next up is to look into mouse events.
Subscribe to:
Posts (Atom)