Jump to content
papote

Copy text fields from Access Table

Recommended Posts

papote

I am just trying out AutoIt. I used to use AutoHotKey. I am trying to port one of my scripts over.

I have an Access Table where I store the values of each field in a variable and then go to my other program and send the values.

So far, I got the following, but it doesn't seem to be working right.

$it = InputBox("Loop","")

$AccessWindowTitle = "Microsoft Access - Acct2016 : Database (Access 2007 - 2010)"
$MeditechWindowTitle = "My Other App"


if $it <= 0 then
      Exit
EndIf

For $i = 1 to $it Step 1

   if WinExists($AccessWindowTitle) Then
      Sleep(100)
      Send("^c")
      Global $oacc = clipget()
      Send("{TAB}")
   endif

   MsgBox(1,"", $oacc)

Next

The msgbox is just to test if it copied correctly. Thus far it is displaying the following:

"{TAB}"

It doesn't seem to be activating the Access Window, but the instructions are running.

 

Edited by papote

Share this post


Link to post
Share on other sites
jchd

You could probably use ADO to open your Access DB and use the SQL-like microsoftisms to insert/update the DB. But you'll need someone more knowledgeable than me on Access (I'm an SQLite fan)


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

×