Re: How to write code to get focuse the application which is open from server

2007-01-14 Thread vithi
Hi Paul,
Since your reply I try to use pywinauto. I was able to get the control
of a window that is a good news but it is not working for sub window
this main window create.(popup windows)
eg) File -> printwill open print window but the code is not
clicking print button. I try several combination
app,Print.OK.CloseClick() or app,Print.OK.Click() is not working

my code goes like that
app=application.Application()
qi = app.window_(title_re = ".*arcMap.*")
qi.TypeKeys("%FP")
app,Print.OK.Click()

the last line of code is not working same thing with file open to
qi.TypeKeys("%FO") create popup window "open" but
app,Open.Filename.SetEditText("test1,txt") is not working any help to
overcome to this problem (Here the "Print" , "Open" are windows title I
am using without any undestanding why I am using. Any help?





Paul McGuire wrote:
> "vinthan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > hi,
> > I am new to python. I have to write test cases in python. An
> > application is open in the desk top ( application writen in .Net) I
> > have to write code to get focuse the application and click on the link
> > which in the one side  and it will load the map on the other and I have
> > to check map is loaded. Any one tell me how do I use Dispatch or any
> > other method to write a code.
> >
> If you are running on Windows, look into pywinauto
> (http://www.openqa.org/pywinauto/).
>
> I have successfully used it to interact with a Flash animation running
> within an IE browser.
>
> I also had to inspect the graphics displayed by the Flash animation, for
> this I used PIL (http://www.pythonware.com/products/pil/).
> 
> Good luck,
> -- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to write code to get focuse the application which is open from server

2007-01-14 Thread vithi
Hi Paul,
Since your reply I try to use pywinauto. I was able to get the control
of a window that is a good news but it is not working for sub window
this main window create.(popup windows)
eg) File -> printwill open print window but the code is not
clicking print button. I try several combination
app,Print.OK.CloseClick() or app,Print.OK.Click() is not working

my code goes like that
app=application.Application()
qi = app.window_(title_re = ".*arcMap.*")
qi.TypeKeys("%FP")
app,Print.OK.Click()

the last line of code is not working same thing with file open to
qi.TypeKeys("%FO") create popup window "open" but
app,Open.Filename.SetEditText("test1,txt") is not working any help to
overcome to this problem (Here the "Print" , "Open" are windows title I
am using without any undestanding why I am using. Any help?





Paul McGuire wrote:
> "vinthan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > hi,
> > I am new to python. I have to write test cases in python. An
> > application is open in the desk top ( application writen in .Net) I
> > have to write code to get focuse the application and click on the link
> > which in the one side  and it will load the map on the other and I have
> > to check map is loaded. Any one tell me how do I use Dispatch or any
> > other method to write a code.
> >
> If you are running on Windows, look into pywinauto
> (http://www.openqa.org/pywinauto/).
>
> I have successfully used it to interact with a Flash animation running
> within an IE browser.
>
> I also had to inspect the graphics displayed by the Flash animation, for
> this I used PIL (http://www.pythonware.com/products/pil/).
> 
> Good luck,
> -- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to write code to get focuse the application which is open from server

2007-01-15 Thread vithi
Dennis,
I am sorry that was a typing error. I try like that
app.Print.OK.Click() but it was not working. The printer window was not
IdentifiedIs their any method I can use to achive the same goal. How
the window title was used as class name?. Could you please help me to
solve this problem.
thanks
this is the error meassage

Traceback (most recent call last):
  File "C:\Python24\test1.py", line 10, in -toplevel-
app.Print.Ok.CloseClick()
  File "c:\python24\pywinauto\pywinauto\application.py", line 237, in
__getattr__
ctrls = _resolve_control(
  File "c:\python24\pywinauto\pywinauto\application.py", line 854, in
_resolve_control
ctrl = _get_ctrl(criteria)
  File "c:\python24\pywinauto\pywinauto\application.py", line 622, in
_get_ctrl
dialog = controls.WrapHandle(
  File "c:\python24\pywinauto\pywinauto\findwindows.py", line 62, in
find_window
windows = find_windows(**kwargs)
  File "c:\python24\pywinauto\pywinauto\findwindows.py", line 177, in
find_windows
windows = findbestmatch.find_best_control_matches(
  File "c:\python24\pywinauto\pywinauto\findbestmatch.py", line 483, in
find_best_control_matches
raise MatchError(items = name_control_map.keys(), tofind =
search_text)
MatchError: Could not find 'Print' in '['', u'Transparent Windows
Client0', u'Transparent Windows Client2', u'Transparent Windows
Client1', u'Print - Remote', u'Transparent Windows Client', u'Print
- RemoteTransparent Windows Client']'

This is the code
import sys
import time
import application
app = application.Application()
qi=app.window_(title_re = ".*ArcView.*")
time.sleep(2)
qi.TypeKeys("%FP")
time.sleep(2)

app.Print.Ok.CloseClick()


Dennis Lee Bieber wrote:
> On 14 Jan 2007 21:11:35 -0800, "vithi" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> >
> > my code goes like that
>
>   "goes like"?  Don't type similarities from memory -- cut&paste the
> actual code (or, preferably, a stripped down version that you've
> actually run) that shows the behavior in question.
>
> > app=application.Application()
> > qi = app.window_(title_re = ".*arcMap.*")
> > qi.TypeKeys("%FP")
> > app,Print.OK.Click()
> >
>   And what is that last line supposed to be doing. "app,anything" is
> two separate objects: an application object, and something called Print
> with an attribute called OK which itself has a method called Click
>
>   I suspect, at a minimum, that last line is supposed to be
> 
> app.Print.OK.Click()
>^  period, not

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to write code to get focuse the application which is open from server

2007-01-15 Thread vithi
Dennis,
I am sorry that was a typing error. I try like that
app.Print.OK.Click() but it was not working. The printer window was not
IdentifiedIs their any method I can use to achive the same goal. How
the window title was used as class name?. Could you please help me to
solve this problem.
thanks
this is the error meassage

Traceback (most recent call last):
  File "C:\Python24\test1.py", line 10, in -toplevel-
app.Print.Ok.CloseClick()
  File "c:\python24\pywinauto\pywinauto\application.py", line 237, in
__getattr__
ctrls = _resolve_control(
  File "c:\python24\pywinauto\pywinauto\application.py", line 854, in
_resolve_control
ctrl = _get_ctrl(criteria)
  File "c:\python24\pywinauto\pywinauto\application.py", line 622, in
_get_ctrl
dialog = controls.WrapHandle(
  File "c:\python24\pywinauto\pywinauto\findwindows.py", line 62, in
find_window
windows = find_windows(**kwargs)
  File "c:\python24\pywinauto\pywinauto\findwindows.py", line 177, in
find_windows
windows = findbestmatch.find_best_control_matches(
  File "c:\python24\pywinauto\pywinauto\findbestmatch.py", line 483, in
find_best_control_matches
raise MatchError(items = name_control_map.keys(), tofind =
search_text)
MatchError: Could not find 'Print' in '['', u'Transparent Windows
Client0', u'Transparent Windows Client2', u'Transparent Windows
Client1', u'Print - Remote', u'Transparent Windows Client', u'Print
- RemoteTransparent Windows Client']'

This is the code
import sys
import time
import application
app = application.Application()
qi=app.window_(title_re = ".*ArcView.*")
time.sleep(2)
qi.TypeKeys("%FP")
time.sleep(2)

app.Print.Ok.CloseClick()


Dennis Lee Bieber wrote:
> On 14 Jan 2007 21:11:35 -0800, "vithi" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> >
> > my code goes like that
>
>   "goes like"?  Don't type similarities from memory -- cut&paste the
> actual code (or, preferably, a stripped down version that you've
> actually run) that shows the behavior in question.
>
> > app=application.Application()
> > qi = app.window_(title_re = ".*arcMap.*")
> > qi.TypeKeys("%FP")
> > app,Print.OK.Click()
> >
>   And what is that last line supposed to be doing. "app,anything" is
> two separate objects: an application object, and something called Print
> with an attribute called OK which itself has a method called Click
>
>   I suspect, at a minimum, that last line is supposed to be
> 
> app.Print.OK.Click()
>^  period, not

-- 
http://mail.python.org/mailman/listinfo/python-list


win32com.client

2007-01-31 Thread vithi
Hi
Any one tell me where I can get (or download) python modules win32com
or win32com.client because I have to use "Dispatch"  thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com.client

2007-01-31 Thread vithi
This is not I was looking for. There is a module call
"win32com.client" in python some people used it If any body know about
it let me know.

On Jan 31, 1:45 pm, Gary Herron <[EMAIL PROTECTED]> wrote:
> vithi wrote:
> > Hi
> > Any one tell me where I can get (or download) python modules win32com
> > or win32com.client because I have to use "Dispatch"  thanks
>
> You want the "python for windows" extension, available from
>  http://sourceforge.net/projects/pywin32/
>
> Gary Herron


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com.client

2007-02-01 Thread vithi
Hi,
If you are saying win32com in part of the  python then you are wrong.
Here is a prove:-

IDLE 1.2
>>> import win32com

Traceback (most recent call last):
  File "", line 1, in 
import win32com
ImportError: No module named win32com
>>>

you try in your computer



On Jan 31, 7:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 31 Jan 2007 22:17:10 -0300, vithi <[EMAIL PROTECTED]> escribió:
>
> > This is not I was looking for. There is a module call
> > "win32com.client" in python some people used it If any body know about
> > it let me know.
>
> > On Jan 31, 1:45 pm, Gary Herron <[EMAIL PROTECTED]> wrote:
> >> vithi wrote:
> >> > Hi
> >> > Any one tell me where I can get (or download) python modules win32com
> >> > or win32com.client because I have to use "Dispatch"  thanks
>
> >> You want the "python for windows" extension, available from
> >>  http://sourceforge.net/projects/pywin32/
>
> Yes. You get the win32com module from the above url. It's part of that  
> package, by Mark Hammond, and a lot of people uses it.
>
> --
> Gabriel Genellina


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com.client

2007-02-01 Thread vithi
On Jan 31, 6:35 pm, rzed <[EMAIL PROTECTED]> wrote:
> "vithi" <[EMAIL PROTECTED]> wrote innews:[EMAIL PROTECTED]:
>
> > Hi
> > Any one tell me where I can get (or download) python modules
> > win32com or win32com.client because I have to use "Dispatch"
> > thanks
>
> What distribution are you using? If you are using Windows and have
> downloaded the Python.org one, then, as Gary has told you:
> "You want the "python for windows" extension, available from  
> http://sourceforge.net/projects/pywin32/";
>
> I think the ActiveState distro includes it as part of its package.
>
> I don't know if any of this applies if you are using Linux, VMS, etc.
>
> --
> rzed


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com.client

2007-02-01 Thread vithi
Hi,
I use python for window. If you are saying win32com in part of the
python then you are wrong.
Here is a prove:-

IDLE 1.2



>>> import win32com


Traceback (most recent call last):
  File "", line 1, in 
import win32com
ImportError: No module named win32com

>>>


you try in your computer



vithi

-- 
http://mail.python.org/mailman/listinfo/python-list


how to use Dispatch to open an application in win32com.client

2007-02-16 Thread vithi
Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

-- 
http://mail.python.org/mailman/listinfo/python-list


how to use Dispatch to open an application in win32com.client

2007-02-16 Thread vithi
Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

-- 
http://mail.python.org/mailman/listinfo/python-list


how to use Dispatch to open an application in win32com.client

2007-02-16 Thread vithi
Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

-- 
http://mail.python.org/mailman/listinfo/python-list


how to use Dispatch to open an application in win32com.client

2007-02-16 Thread vithi
Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to use Dispatch to open an application in win32com.client

2007-02-17 Thread vithi
Hi
Since I haven't see any help or tutorial on com there is a application
is installed in the server I am login to the server then what code do
I have to implement to launch the application registered in a server.
how do I write a code to tell my computer to go in to the perticular
server and launch program "XYZ "

do you think this code alone enough to go and look for  xyz
application in the server, I don't get it
Give me any sample code or more help. It help me a lot.
 object = win32com.client.Dispatch("xyz.Application")


On Feb 16, 11:56 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 16 Feb 2007 23:36:26 -0300, vithi <[EMAIL PROTECTED]> escribió:
>
> > I am trying to launch an application. When I try like that
> > When I try like that Excel is opening
> > import win32com.client
> > object = win32com.client.Dispatch("Excel.Application")
> > object.Visible = 1
>
> > But when I try my application which is QeepIt.exe
> > which is in the c:\ drive it is not running
> > Any body tell me how to give path to open an exectable application in
> > Dispatch modules
> > I try like that
> > object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
> > It give an error.
>
> The above code is used to launch a COM server registered under the name  
> "Excel.Application" and then control it. If you don't know what a COM  
> server is, surely your application can't be used this way.
>
> For launching another program, perhaps sending it some text, and capturing  
> its output, look at the subprocess module. If you are only interested in  
> executing it, with no additional communication, os.system() may be enough.
>
> --
> Gabriel Genellina


-- 
http://mail.python.org/mailman/listinfo/python-list