×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

perl or python or autohotkey

perl or python or autohotkey

perl or python or autohotkey

(OP)
Hi, i wish to automate windows applications with a script. which one is best to learn - perl or python. My plan is to
1. automate windows applications, eg; invoke a software and make it run with certain inputs
2. read/write/replace text at specific locations inside the file
3. built small gui's
- no intention to work on web programing,

personally for my programing, fortran is ok, and i use it very often for engg calcs - if i could avoid perl/python and do above items with autohotkey, i rpefer that
i am new to perl,python, autohotkey, so wish to know which one wud b the best

thanks

RE: perl or python or autohotkey

You might also want to look into Pulover's Macro Creator. It is open source and works very well. I have only used it to edit PDF files, ie make the same change to 100+ pages, but I believe you can use it to do what you are asking.

http://www.macrocreator.com/

RE: perl or python or autohotkey

Why not VBA.

Included with all MS Office products and made to do exactly what you say you want to do.

RE: perl or python or autohotkey

MintJulep, VBA is great for doing stuff in whatever microsoft platform you're using.

If you're wanting to manipulate files and content (across different platforms, not just Office) then it probably isn't necessarily the best for that task.
An example: Outlook does not provide the same FileDialog interface that Word and Excel do, thus automating the storage of emails in Outlook via VBA is much harder than it needs to be.

The example of read / write / replace text inside MS Word files is relevant though, its much easier to do that inside Word than it is via 3rd party scripting functions.

EDMS Australia

RE: perl or python or autohotkey

(OP)
hi JG2828, is it possible to include bit of programming into macro recorder - ie; i wish to run a 3rd party software - after the first run (invoked by the the macro), the macro should be capable of reading the output text file, search for some specific values in it, do some calculations with them and then edit the input file (for 3rd party) based on some calculations, followed by rerun of the 3rd party software. this should happen till particular criteria is met. i wish to know whether macro recorder can do it...i know that perl can do it because i have seen people do it, just not sure whether perl/python/autohot key. personally, i use fortran for general engineering program, so wish to learn a new lang/scripting which has definite advantage over fortran. (as i said, not planing for web/game developemnt)

RE: perl or python or autohotkey

Hi rkr19,
Macrocreator is actually based on Autohotkey, like a GUI interface for Autohotkey. I think it can do all you are asking, but I don't know for sure. I have never attempted anything that complex. Download it for free and give it a try.

RE: perl or python or autohotkey

ShortKey is a utility that inserts itself after the keyboard and before everything else, enables you to expand keystrokes anytime. Might be worth looking at. The underlying programming is not that hard, just monitor the keyboard interrupt.

RE: perl or python or autohotkey

I would recommend Python, which has many 3rd party libraries and is good at OS automation.

RE: perl or python or autohotkey

AutoIt is my preference. There are a lot of examples already available and the syntax is pretty simple, but only for Windows. It has an active forum and a tremendous feature list. It would be easy enough to convert program logic from AutoIt to any other language https://www.autoitscript.com/site/autoit/

Next in line would be VBA, but it is only when it's the only alternative. It does have much better integration with the Office applications, but each application has a unique set of APIs, some that should be similar, but aren't.

Python is an interesting alternative, but it has a bunch of libraries coming from all over the place. It's popular among programmers and it's multiplatform

RE: perl or python or autohotkey

(OP)
@3DDave, any book you recommend for Autoit - or is it just forums?

RE: perl or python or autohotkey

The docs that come with it are pretty good. I just read through the available built-in functions and the examples. People are doing amazing things on the forums, so if you need inspiration, there it is. The syntax is straightforward and it has plenty of specialized functions to work with applications that aren't welcoming.

My favorite, though available in other languages, is the ability to read and write the Windows text clipboard - so copy, run the program to transform the data, and paste. But AutoIt can be compiled, so it becomes copy, double-click program icon, paste.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close