Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > script to automate GUI application (newbie)

Reply
Thread Tools

script to automate GUI application (newbie)

 
 
bogdan romocea
Guest
Posts: n/a
 
      01-18-2005
Dear Python experts,

I have a GUI application (Windows; apparently written in Java) which I
want to use through a script (without a mouse or keyboard). First, one
of several buttons needs to be clicked (no keyboard shortcuts
available, but I can measure the coordinates in pixels from the top
left corner of the window to the center of the button to be clicked).
Then, a window with a few drop-down lists pops up - I have to make some
choices and click OK (it's possible to navigate from one drop-down to
the next with Tab, and hit Enter for OK).

I want to run the script above from code (if this then click "... and
OK") and perhaps by means of several desktop shortcuts (one shortcut
for each set of GUI inputs).

Is such a script possible? If yes, how do I get there? I searched
comp.lang.python but didn't find something directly applicable (or so
it seemed to me - I'm a beginner). Directions (and sample code, if
possible) will be warmly appreciated.

Thank you,
b.






__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
 
Reply With Quote
 
 
 
 
Grig Gheorghiu
Guest
Posts: n/a
 
      01-18-2005
Bogdan,

If your app is written in Java, take a look at Marathon
(http://marathonman.sourceforge.net/). It uses Jython as its scripting
language and it's pretty smart about how it does automation (i.e. it
doesn't look at screen coordinates, but at control names). It also
offers a capture/replay functionality, and it automatically builds the
Jython script that drives your flow of actions. You can then edit and
enhance the script manually.

Grig

bogdan romocea wrote:
> Dear Python experts,
>
> I have a GUI application (Windows; apparently written in Java) which

I
> want to use through a script (without a mouse or keyboard). First,

one
> of several buttons needs to be clicked (no keyboard shortcuts
> available, but I can measure the coordinates in pixels from the top
> left corner of the window to the center of the button to be clicked).
> Then, a window with a few drop-down lists pops up - I have to make

some
> choices and click OK (it's possible to navigate from one drop-down to
> the next with Tab, and hit Enter for OK).
>
> I want to run the script above from code (if this then click "... and
> OK") and perhaps by means of several desktop shortcuts (one shortcut
> for each set of GUI inputs).
>
> Is such a script possible? If yes, how do I get there? I searched
> comp.lang.python but didn't find something directly applicable (or so
> it seemed to me - I'm a beginner). Directions (and sample code, if
> possible) will be warmly appreciated.
>
> Thank you,
> b.
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250


 
Reply With Quote
 
 
 
 
Jim
Guest
Posts: n/a
 
      01-18-2005

It sounds like a case for the Expect program, to me. Try Google-ing
for "Expect". If you are looking for a Python approach, then try
googling for "Expect Python".

Jim

 
Reply With Quote
 
Cameron Laird
Guest
Posts: n/a
 
      01-18-2005
In article < .com>,
Jim <> wrote:
>
>It sounds like a case for the Expect program, to me. Try Google-ing
>for "Expect". If you are looking for a Python approach, then try
>googling for "Expect Python".
>
>Jim
>


No--that is, I find his description unambiguous in NOT allowing
for "keyboard control", which is Expect's domain. Expect, of
any flavor, will not help.

Along with the Java-savvy solutions already mentioned, several
general-purpose record-playback tools are available for Windows.
<URL: http://wiki.tcl.tk/8813 > mentions several.
 
Reply With Quote
 
McBooCzech
Guest
Posts: n/a
 
      01-19-2005
Try following scripting language to automating Windows GUI, it
simulates keystrokes (supports most keyboard layouts), simulates mouse
movements and clicks and does tons of other stuff:
http://www.hiddensoft.com/autoit3/

It works nicely for me.

 
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
Python script to automate use of Google Translate? (or othertranslator) Kenneth McDonald Python 3 04-23-2008 11:03 PM
Automate/script a web browser? Steve Freides Computer Support 5 06-14-2007 06:25 PM
RE: pwinauto to remote automate a GUI ? Tim Golden Python 2 12-14-2006 07:04 PM
Re: Script to automate extraction of file from compressed archives Michael Wehner Perl 0 05-21-2006 01:13 AM
can i write script in ruby to automate a java-swing application Tester in ruby Ruby 1 10-14-2005 01:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57