Sign in to follow this  
Followers 0
hoppy

com / obj question

5 posts in this topic

I 've got a script that simmulates keystrokes and stuff to run a report from aan access mdb unattended.

Is there a beterway now with the beta using com/obj?

Share this post


Link to post
Share on other sites



Yes there most certainly is. Now what it is I dont know :). I havent gotten into COM as I dont need it currently. Check out MSDN for Access COM Objects.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Not sure if the term better applies.

Controlling Access is pretty straightforward without com/obj.

Many times I find a simple macro is simple enough at times and you can make a *.mam file up with access or do it yourself:

[shortcut Properties]AccessShortcutVersion=1

DatabaseName=sample.mdb

ObjectName=fix

ObjectType=Macro

Computer=MYComputer

DatabasePath=C:\sample.mdb

EnableRemote=0

CreationTime= 1c4bd38 c517620

Icon=265

this one simply runs the fix macro on sample database. (at the end it spits out a report and quits)

I do use the obj/com support for pulling out data and adding in data, so I don't have to open access at all.

sykes did a little spot in scraps, for more info see:

http://www.autoitscript.com/forum/index.php?showtopic=12281

overall obj / com just gives more choices, you can deside what is better.

Access automation via com at microsoft:

http://msdn.microsoft.com/library/default...._HV05187021.asp

You just need to make sure to open the database, ( or make a new one,)

here is a quick example:

$db="c:\\tempDB.mdb"

   $ObjIE=ObjCreate("Access.Application")
   $ObjIE.visible = 1
   $ObjIE.OpenCurrentDatabase($db)
   $ObjIE.DoCmd.OpenForm("form1")
   sleep(1000)

edit .. make sure to notice double \\ on filenpaths

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Thanks guys,

I think I'll give that mam file thing a try, seems just what I need.

Share this post


Link to post
Share on other sites

btw, MAM is short for Microsoft Access Macro

the extension will be hidden, like *.lnk


AutoIt3, the MACGYVER Pocket Knife for computers.

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  
Followers 0