Hello, new here and asking a question.

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
historyman
Newbie
Posts: 3
Joined: Wed Apr 04, 2007 5:22 pm

Hello, new here and asking a question.

Post by historyman » Wed Apr 04, 2007 5:45 pm

Hello everyone -

I've been working with MS free download now for a week. Written some routines to open applications and do functions - mostly proprietary applications that are used in museums, libraries, etc. Database type stuff. Well one of the applications I want to work with is Q&A - old DOS windowed database. I can open it get picure of screen & area that is toi be selected but of course you can't mouse over to click and activate that file. So how do I activate a file in a DOS list window? I want to input a file name - say NAMES, then in the DOS list window move to NAMES if in the list and select the file to open. Next I want to extract the fields open in the new DOS window and copy them out to an Access database.

Here's where I am, the last part doesn't work obviously:
/*
For: Lancaster County Historical Society
Date: 3 April, 2007
*/

Let>INPUT_TIMEOUT=10000
*/
Let>qadata=\\Lchsfs01\QA4_READ\
Let>Directory=\\C:\temp\
// Ensure input is in caps
CapsOn
// Get the File to convert
Input>Path,Which Q & A Database do you wish to convert?,
Let>SearchFor=Path
Capsoff
// Now add .DTF to the file name
Let>Pathsub=.DTF
ConCat>Path,Pathsub
// Add directory location to the file name
ConCat>qadata,path
// Get all the files in the directory
GetFileList>\\Lchsfs01\QA4_READ\*.DTF,FileList,;
Separate>FileList,;,Files
Let>Max=Files_Count
let>i=1
Repeat>i
Let>Filename=Files_%i%
if>Files_%i%=qadata
GoTo>Convert
endif
Let>i=i+1
Until>i=Max
GoTo>EndofProgram

Label>Convert

Run Program>\\Lchsfs01\QA4\QA1.EXE
Let>WW_TIMEOUT=5
WaitWindowOpen>\\Lchsfs01\QAFSF4\QA1.exe
Press Enter
Wait>1
Send>S
Wait>1
Press Enter
Wait>1
GetScreenRes>sX,sY
ScreenCapture>0,0,sX,sY,C:\temp\QA.bmp
Let>bmp=.bmp
Concat>SearchFor,bmp
Concat>Directory,SearchFor
FindImagePos>Directory,C:\temp\QA.bmp,20,1,xPos,yPos,Fnd
Message>Directory
Wait>3
If>Fnd>0
//Tab until screen matches found file then
Send>Enter
Else
Let>k=1
Repeat>k
Press Esc
Let>k=k+1
Until>k=8
Send>x
Press Enter
// To return to the exit screen

Endif

//Exit
Send>Enter
We Bring Lancaster Hisatory to the World!
http://www.lancasterhistory.org

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Apr 04, 2007 7:59 pm

Just to let you know, I support hundreds of Q&A users as part of my client base. Each of you thinks you are the only one using Q&A. And no one wants to give it up. (Actually no good reason to give it up).

I have not had a chance to review your script yet, but wanted to let you know that I use Macro Scheduler with Q&A every night. It is used to exchange information between Q&A, Access, and Quickbooks. It is also used to do backups and sends emails to confirm Posting routines have been done.

I will try to look at your script in the next few hours.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Apr 04, 2007 8:40 pm

Got back to look at this sooner than I thought.

I have a number of observations and comments, random order.

1. You don't need to add DTF to filenames, Q&A will insert itself

2. You should be starting Q&A with qa.com vs. qa1.exe. Some parts of the program will not be loaded properly with qa1.exe

3. You have much more to do to export. Will still have to retrieve and sort records and define layout and delimiters.

4. Q&A has excellent macro utlity that can be used in conjunction with Macro Scheduler. I think using both will be your best solution here.

5. I see the term "convert". Just to let you know I have converted many Q&A databases to Access and more than half went back to Q&A DOS because it was faster, easier to use, etc.

6. Depending on version of Access, you may be limited to quantity of fields, while Q&A allows an unlimited number of fields.

7. Q&A also allows up to 32000 characters in any field, but Access is limited in the text fields (256 chars?).

8. Have you looked at Lantica's Sesame product that was designed as a cross platform, windows version, hierarchical structure database specifically that converts from Q&A including the programming, reports, default values, key commands, etc. More info available at http://www.lantica.com (I have also done conversions to Sesame, fewer users went back to Q&A vs. Access. I think because common keystroke commands, same programming code, shorter learning curve for Q&A users).

9. Looks like you are trying to do this export on 8 different files? Suggest making one or more Q&A macros to export. Once they are defined, use Macro Scheduler to start Q&A, using a loop to process through each of the Q&A macros. Then continue with Macro Scheduler to close Q&A, open Access and import the data exported above.

I will send you an email for some off line communication for issues not related to Macro Scheduler.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts