Jump to content
Sign in to follow this  

Help with Methodology

Recommended Posts


Need some function suggestions I think.

Forgive me if I am ignorant to some obvious, quick solution to my problem. This is my first real script I’ve ever written – I’m a noobie.

Anyway, I’m trying to write a script that will pull patient information / prescription data from our dental charts, put that into an array, and place that data then into an Adobe Acrobat file so that it can be just printed. I will later add more functions, but this is where I want to start.

I’m to the point in my script where I can pull the info, and place it into the chart (success), but I’ve having difficulty getting it to work on all the other doctors computers. I think this is because I’ve chosen a bad way to go this, and that’s where I need help/ideas.

My methods at present are to take the array data, place my specific bit of information into ClipPut, then paste the data into the acrobat file. To start this process I have to use the MouseMove command to reset the form and then place the cursor on the first field. I just tab through the rest of them, pasting as I go with new variable data stored in ClipPut. This also causes problems, as sometimes the tab function processes fastor than then next ClipPut, and it duplicates already pasted data or fails to paste completely. I fixed this with Sleep(500), but it makes the script feel a lot slower.

So my question is – is there a better way to enter data into an acrobat form locally saved on one’s computer? I feel like moving the mouse around and using cntrl+v is a really sucky way to do it, but I can’t figure out how else it should be done… or at least how to make it work on any computer I place it on.

If I’ve done a bad job of describing this problem, I’ll post the script tomorrow when I go into work. Thanks in advance for any tips or tricks.

Edited by Gumma

Share this post

Link to post
Share on other sites

If its always the same form, then you could try using ControlSend. You can use the AutoIt Window Information Tool to get the necessary identification data for the controls you want to send to.

Share this post

Link to post
Share on other sites

Welcome to the AutoIt forum!

I can't answer for Acrobat interface but it looks like this is a dynamic form not using standard Windows controls. You're right to think that the pedestrian solution is likely to fail often, due to unexpected spurious popups or other source of mis-synch.

It's possible that Acobat offers a COM interface, which could probably be used to insert the right fields in the right place.

Another possibility, much simpler in my view, relies on Word. If you can use Word to make a template document, then pasting fields can be done easily and reliably from AutoIt using a standard UDF. From then on printing a PDF can be acheived by using one of the many free PDF "printers" drivers available.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this