How python writes text into another windows application

Discussion in 'Python' started by Meitham, Oct 29, 2007.

  1. Meitham

    Meitham Guest

    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
    Meitham, Oct 29, 2007
    #1
    1. Advertising

  2. 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 -
    Laurent Pointal, Oct 30, 2007
    #2
    1. Advertising

  3. 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: , ICQ: 134682867
    Wolfgang Draxinger, Oct 30, 2007
    #3
  4. Meitham

    Meitham Guest

    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
    Meitham, Nov 1, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. thersitz
    Replies:
    3
    Views:
    623
    thersitz
    Jan 31, 2007
  2. Ovidiu Deac

    python logging writes an empty file

    Ovidiu Deac, Mar 26, 2010, in forum: Python
    Replies:
    0
    Views:
    307
    Ovidiu Deac
    Mar 26, 2010
  3. Ovidiu Deac

    Re: python logging writes an empty file

    Ovidiu Deac, Mar 26, 2010, in forum: Python
    Replies:
    2
    Views:
    975
    Ovidiu Deac
    Mar 26, 2010
  4. Benoit Fries
    Replies:
    1
    Views:
    74
    Thomas 'PointedEars' Lahn
    Nov 14, 2003
  5. Poppy Gerard
    Replies:
    4
    Views:
    170
    Poppy Gerard
    Dec 29, 2003
Loading...

Share This Page