473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

How python writes text into another windows application

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
Oct 29 '07 #1
3 1418
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 - la*************@laposte.net
Oct 30 '07 #2
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: he******@jabber.org, ICQ: 134682867

Oct 30 '07 #3
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
Nov 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Zunbeltz Izaola | last post by:
Hi! I am planning a program and I need some advice about what tool to use. Basically my program will deal with a object A. A is a list like object with same attributtes and a list of objects...
5
by: Will | last post by:
Is there multi-media support in Python? So I can... 1 - play video in all the standard formats... windows & Mac? 2 - play flash files 3 - Power Point 4 - Standard graphic formats 5 - Sound in...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
19
by: dcrespo | last post by:
Hi all... Is there a way to print a PDF file directly from Python without having Acrobat installed? I know about ReportLab. It's a python module that lets you create almost any PDF document, but I...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
267
by: Xah Lee | last post by:
Python, Lambda, and Guido van Rossum Xah Lee, 2006-05-05 In this post, i'd like to deconstruct one of Guido's recent blog about lambda in Python. In Guido's blog written in 2006-02-10 at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.