Jump to content

Recommended Posts

Posted

Hi all!

I searched the forums - while there are a few out there -there are not many on here who have tried to use autoit with the Act!! database

Now i know that we all hate the act database. But my boss insists on us using it in addition to our Filemaker Pro 8.0 database that we use for other stuff. so i am forced to do as he wishes.

I have been stuck trying to use tabs and mouseclicks and clipboard to get and set fields in our act! 6.0 database

This wasn't acceptable. Things were not ever working correctly.

I found the Act 6.0 Software Developer Kit - which had examples in visual basic and visual C++

the SDK can be found here: http://www.act.com/support/updates/index.cfm?DOWNLOAD=114

Using this - I Finally figured out how to use objects on this program - and here's what i came up with - this should get people started on some basics of using the act contact database

Replace the

"C:\Act\Test.dbf" With the location of your database or the demo database that is in one of the Act Folders

See the attached file for the Include necessary for this file (its just a simple list of Includes that was part of a visual basic script.

#include <ActFieldConstants.au3>

$actdb = "C:\Act\Test.dbf"

;creates the act object.
$objACT = ObjCreate("ACTOLE.APPOBJECT")
If @error Then
     MsgBox(262192,"Woops!","Could not attach Act Object")
    Exit
EndIf

With $objACT
    .OpenDB ($actdb)   ;opens desired database
                         ; if login is required for script, autoit waits for login before resuming
    .Maximize ;Maximizes the screen
EndWith

;creates the contact object
$objActContact = $objACT.Views.Create (1, "MyContact")

$objActContact.LookupMyRecord ;Looks up Your Record


With $objActContact
    $Name = .GetField($CF_Name);gets field and stores it to variable $Name
    $Company = .GetField($CF_Company)
EndWith
MsgBox(262208,"Act Sample","Hello " & $Name & @CRLF & "You Work For " & $Company)



;add contact
With $objActContact
    .AddNewContact
    .SetField ($CF_Company, "AutoIt Test Company")
    .SetField ($CF_Name, "Mike Dawson")
    .SetField ($CF_Address1, "123 Somewhere Drive")
    .SetField ($CF_City, "Somewhere")
    .SetField ($CF_State, "DE")
    .SetField ($CF_Zip, "55555")
    .SetField ($CF_Phone, "(302) 555-5555")
    .SetField ($CF_Title, "Project Manager")
    .SetField ($CF_Ext, "123" )
    .SetField ($CVF_EmailAddress, "cassetti@gmail.com")
EndWith

ActfieldConstants.au3

Posted (edited)

Thanks :whistle:

I'm glad i can contribute to this language who has saved me tons of time over and over again!

I've been working on the script and running into no problems

the only thing i was mistaken on - was the login when not currently in a database. If you try this program out - with act open but no database loaded, the script works fine

exit completely out of act and try this script - the script ends before it can send all the data through, so the result is simply the user started up act - no actions happened.

My solution was to simply check for act using a winexists. and if it doesn't - message box tells user they are an idiot and to start act then run this program.

Edited by cassetti
  • 3 months later...
Posted

Hi all!

I searched the forums - while there are a few out there -there are not many on here who have tried to use autoit with the Act!! database

......

the SDK can be found here: http://www.act.com/support/updates/index.cfm?DOWNLOAD=114

...

Hi all,

i found some other stuff at [http://www.cicorporation.com/act/sdk/index.htm] and tried to write some code. Here are my first steps:

accessing to the history, adding a note od a file

" activities

changing the active record

find out the unique ID of the record and move to a specified record.

Have fun

Elric

act_snippet.au3

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...