Re: [Tutor] 200 dollar questions!

2007-07-16 Thread Rikard Bosnjakovic
On 01/07/07, elis aeris <[EMAIL PROTECTED]> wrote: [...] > GainFocus(handle) > > Keyboard_event ( "hello python!") > Mouse_event (x,y, left, 2) > > the (x,y) = should be relative to the active window and independent of the > window's position. > 2 as in clicking twice. This sounds the renta

Re: [Tutor] 200 dollar questions!

2007-07-01 Thread Eike Welk
On Sunday 01 July 2007 05:30, elis aeris wrote: > Yes, I am trying to write a OCR algorithm with neural network, but > the theories of NN is of little importance, what I am trying to get > ready for the project is run speed. If you do serious image analysis you should maybe switch to NumPy and Sc

Re: [Tutor] 200 dollar questions!

2007-07-01 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > import win32ui > window = win32ui.FindWindow(None, "123.txt") > yourwindow.ShowWindow() The title is incorrect. A Notepad window has a title like: 123.txt - Notepad So thats what you need to search for. I told you Windoze APIs were flakey! :-) Alan G

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Luke Paireepinart
elis aeris wrote: > which modules and origin is this function? You can infer from the fact that your image object already has the pixel data stored within it that the getdata would be a method of the object. In other words, just call image.getdata() and, if I recall correctly, when you asked where

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread elis aeris
which modules and origin is this function? is it the fastest way to get it? I am told to optimize getpixel (x, y) alone, so that's the only thing i am trying, it's part of a project that will go live in september, so the prof we are under hasn't one anything but some introductory readings.

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Luke Paireepinart
elis aeris wrote: > Yes, I am trying to write a OCR algorithm with neural network, but the > theories of NN is of little importance, what I am trying to get ready > for the project is run speed. Yes, but what you're trying to do _is_ important. Example code that just loops over a small part of an

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread elis aeris
Yes, I am trying to write a OCR algorithm with neural network, but the theories of NN is of little importance, what I am trying to get ready for the project is run speed. the problem comes in a number of ways: first, as you mentioned, image.getpixel is not very fast, according to PIL http

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Luke Paireepinart
elis aeris wrote: > I ran this: > [snip a lot of code] In the future, please send big sections of code as attachments. It is better in the regard that formatting is preserved as well as us not having to scroll down past a bunch of code to see what the issue is. Often, with just the traceback and an

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread elis aeris
I ran this: import time import ImageGrab # Part of PIL from ctypes import * # Load up the Win32 APIs we need to use. class RECT(Structure): _fields_ = [ ('left', c_ulong), ('top', c_ulong), ('right', c_ulong), ('bottom', c_ulong) ] time.sleep(2) GetForegroundWindow = windl

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread elis aeris
import win32api import win32ui window = win32ui.FindWindow(None, "123.txt") yourwindow.ShowWindow() Traceback (most recent call last): File "C:/python codes/gain_focus.py", line 3, in window = win32ui.FindWindow(None, "123.txt") win32ui: No window can be found. __

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > I am using pywin32, for python 2.5 on windows xp. > What I want to do is these: > > handle = Gethandle ("window_name") Try FindWindow(), it returns a handle given a class/window title > "window_name" = "123.txt" with notepad, for example. That looks

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread elis aeris
http://search.msdn.microsoft.com/search/results.aspx?view=msdn&qu=mo use_event http://search.msdn.microsoft.com/search/results.aspx?view=msdn&qu=ke ybd_event

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Jeff Johnson
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Alan Gauld
> http://www.eternite.co.uk/web_page/python_tutor_example.zip > > that's the anwser i got from a questions, I had a look but it didn't show up too well. It seems to relate to a question about mouse events in a web page? > because i was determined to go unstuck from this bunch > that has entangl

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread ALAN GAULD
Returning it to the List - Original Message http://www.eternite.co.uk/web_page/python_tutor_example.zip that's the anwser i got from a questions, because i was determined to go unstuck from this bunch that has entangled me for two days, i was willing to pay for a timely answer.

Re: [Tutor] 200 dollar questions!

2007-06-30 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote >I am a 4 day python newbie, and already I am writing practical codes. > > I want to learn as fast as possible so I am willing to pay for some > tutorials. > > Please reply if you are interested, although 200 is not a lot of > money. I'm not sure exactly wha

[Tutor] 200 dollar questions!

2007-06-29 Thread elis aeris
I am a 4 day python newbie, and already I am writing practical codes. I want to learn as fast as possible so I am willing to pay for some tutorials. Please reply if you are interested, although 200 is not a lot of money. ___ Tutor maillist - Tutor@py