Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How python writes text into another windows application

Reply
Thread Tools

How python writes text into another windows application

 
 
Meitham
Guest
Posts: n/a
 
      10-29-2007
Hi,

I am trying to write a simple program that reads data from a source file
(Excel sheet, XML file or text file) and then write the data into
another application by pasting the data into the applications fields,
and jumps from one field to another by writing \t tab.

My question is, how do I write the data into another application fields.
My target application is the TNT consignment manager. I asked TNT for
their API to make my life easier but they refused to release it . I
have a software that uses the same way I am looking after to fill in
application fields, it is the QuickAddress. Any idea how to achieve that?

Thanks

Meitham
 
Reply With Quote
 
 
 
 
Laurent Pointal
Guest
Posts: n/a
 
      10-30-2007
Le Mon, 29 Oct 2007 21:53:47 +0000, Meitham a √©crit¬*:

> Hi,
>
> I am trying to write a simple program that reads data from a source file
> (Excel sheet, XML file or text file) and then write the data into
> another application by pasting the data into the applications fields,
> and jumps from one field to another by writing \t tab.
>
> My question is, how do I write the data into another application fields.
> My target application is the TNT consignment manager. I asked TNT for
> their API to make my life easier but they refused to release it . I
> have a software that uses the same way I am looking after to fill in
> application fields, it is the QuickAddress. Any idea how to achieve
> that?
>
> Thanks
>
> Meitham


If you run Windows, try with pywinauto, it should have the tools you need
to control an external application via its gui.


http://sourceforge.net/projects/pywinauto





--
Laurent POINTAL - http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Wolfgang Draxinger
Guest
Posts: n/a
 
      10-30-2007
Meitham wrote:

> My question is, how do I write the data into another
> application fields. My target application is the TNT
> consignment manager. I asked TNT for their API to make my life
> easier but they refused to release it .


You know what the word "market" means? Just tell TNT, that it
seems they don't need you as a customer and so you will change
to another parcel service.

I had the very same situation with a regional parcel service a
few years ago, you won't believe how quick they were in
providing me with API information, in the prospect of loosing a
valuable customer (the fact that you want to automatize the
process suggests, that you have a lot of stuff to be delivered).

If they still don't bite, just show them a calculation, that it's
cheaper for you, to choose another parcel service that might
cost more, but you can save that money with the automatized data
entry.

Of course it's possible to send keypresses, mouse moves/clicks
and other messages to another application, but then you _MUST_
make sure, that no other application or a user interferes in the
process, and if an update of the software changes the interface
you have to reimplement the stuff from grounds up.

Wolfgang Draxinger
--
E-Mail address works, Jabber: (E-Mail Removed), ICQ: 134682867

 
Reply With Quote
 
Meitham
Guest
Posts: n/a
 
      11-01-2007
Thank you all for your kind answers.
I was going to use just shell.SendKeys("fu bar"), but as your answers
suggested pywinauto is a ready framework that covers all I need.

I wanted to play some politics with TNT, but I'm new in the company and
my manager won't listen .

Meitham

Wolfgang Draxinger wrote:
> Meitham wrote:
>
>> My question is, how do I write the data into another
>> application fields. My target application is the TNT
>> consignment manager. I asked TNT for their API to make my life
>> easier but they refused to release it .

>
> You know what the word "market" means? Just tell TNT, that it
> seems they don't need you as a customer and so you will change
> to another parcel service.
>
> I had the very same situation with a regional parcel service a
> few years ago, you won't believe how quick they were in
> providing me with API information, in the prospect of loosing a
> valuable customer (the fact that you want to automatize the
> process suggests, that you have a lot of stuff to be delivered).
>
> If they still don't bite, just show them a calculation, that it's
> cheaper for you, to choose another parcel service that might
> cost more, but you can save that money with the automatized data
> entry.
>
> Of course it's possible to send keypresses, mouse moves/clicks
> and other messages to another application, but then you _MUST_
> make sure, that no other application or a user interferes in the
> process, and if an update of the software changes the interface
> you have to reimplement the stuff from grounds up.
>
> Wolfgang Draxinger


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
newbie: inserting data into sql form writes only null values thersitz ASP .Net 3 01-31-2007 11:58 PM
What application writes/reads APE files Clubsprint DVD Video 6 09-26-2006 01:35 PM
How to write a script that takes input from the screen and writes a number to a text file? Poppy Gerard Perl Misc 4 12-29-2003 01:31 AM
Strange behavior with IE when writing a script that writes another script Benoit Fries Javascript 1 11-14-2003 10:10 AM



Advertisments