LarryDalooza Posted March 28, 2008 Posted March 28, 2008 Has anyone using lotus notes tried to use the API through AutoIt?... $ReturnCode = DllCall("c:\notes\nnotes.dll","int","NSFDbOpen","str","c:\notes\data\lkeys.nsf","int*",0) If $ReturnCode[0] <> 0 Then Exit $hNSF = $ReturnCode[2] $ReturnCode = DllCall("c:\notes\nnotes.dll","int","NSFDbGetBuildVersion","int",$hNSF,"int*",0) If $ReturnCode[0] <> 0 Then DllCall("c:\notes\nnotes.dll","int","NSFDbClose","int",$hNSF) Exit EndIf MsgBox(4096,"",$ReturnCode[2]) DllCall("c:\notes\nnotes.dll","int","NSFDbClose","int",$hNSF) I have tried cdecl and stuff... before I "tear it up", I am just wondering if anyone else has tried. Lar. AutoIt has helped make me wealthy
DW1 Posted March 28, 2008 Posted March 28, 2008 I would love to see what you come up with, as I use lotus notes daily and would like to script a few activities and maybe make a better search engine for it. Thanks for diving in Larry AutoIt3 Online Help
Developers Jos Posted March 28, 2008 Developers Posted March 28, 2008 (edited) I haven't used the DLL but have written several scripts using The COM interface which works fine: $Session = ObjCreate("Notes.NotesSession") Edited March 28, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
LarryDalooza Posted March 28, 2008 Author Posted March 28, 2008 oooo ... there is a COM interface ... I will need to find that reference... thanks. Lar AutoIt has helped make me wealthy
Developers Jos Posted March 28, 2008 Developers Posted March 28, 2008 oooo ... there is a COM interface ... I will need to find that reference... thanks.LarI have a redbook called "COM Together with Domino", file sg245670.pdf.Let me know when you want me to make it available.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
LarryDalooza Posted March 28, 2008 Author Posted March 28, 2008 Hey, thanks. I found the one (PDF) you referenced. As a contractor for IBM I suppose I should have access to some good info on COM and Notes and SameTime ... If I find anything I can share, I'll be back. Lar. AutoIt has helped make me wealthy
sigil Posted April 10, 2008 Posted April 10, 2008 Hi, I'm bumping this because I'm trying to work with Lotus through COM. I know that I can't call any methods or properties until I can actually get the COM object associated with Lotus, and I haven't been able to do that. Here's my test code: $session = ObjGet("","Lotus.NotesSession") if not IsObj($session) then Msgbox(0,"Status","Couldn't attach to Lotus.") else Msgbox(0,"Status","Attached to Lotus.") endif So far, IsObj($session) always returns false. I've been reading sg245670.pdf, but I'm having trouble understanding how to apply it to AutoIt.
Developers Jos Posted April 10, 2008 Developers Posted April 10, 2008 I think its like I posted a few posts up: $Session = ObjCreate("Notes.NotesSession") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sigil Posted April 10, 2008 Posted April 10, 2008 I think its like I posted a few posts up: $Session = ObjCreate("Notes.NotesSession") Ok, that works fine for creating a Lotus object, but I want to make a script that performs operations on an existing instance of Notes. Specifically I want to create appointments in a Lotus calendar, and I don't want to use a whole lot of Send() And when I try to use ObjGet("Notes.NotesSession"), it doesn't attach.
Developers Jos Posted April 10, 2008 Developers Posted April 10, 2008 Ok, that works fine for creating a Lotus object, but I want to make a script that performs operations on an existing instance of Notes. Specifically I want to create appointments in a Lotus calendar, and I don't want to use a whole lot of Send() And when I try to use ObjGet("Notes.NotesSession"), it doesn't attach.Pretty sure you can create the Calendar entry that way too. The script I have written using the COM interface all start with the ObjCreate() which will either start Notes when its not active or else just work fine in the "background".Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sigil Posted April 10, 2008 Posted April 10, 2008 Pretty sure you can create the Calendar entry that way too. The script I have written using the COM interface all start with the ObjCreate() which will either start Notes when its not active or else just work fine in the "background".JosOk, I'll try using ObjCreate() to work with Lotus when it's already open. At http://www.ibm.com/developerworks/lotus/li.../ls-COM_Access/, it says that the COM Toolkit is no longer available. Where can I find something like it?
Xenobiologist Posted April 10, 2008 Posted April 10, 2008 Larry try telling the Rational guys to implement an API for all the products they based on eclipse plattform. Like : ClearQuest Lotus Notes RDA RSA RDZ and so on. Besides one question, what kind of scripts are you trying to script for Notes? Or just some nice udfs? Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
sigil Posted April 10, 2008 Posted April 10, 2008 Besides one question, what kind of scripts are you trying to script for Notes? Or just some nice udfs? Mega asking me? I'm trying to make a script that gets info about an appointment from one application: -time -date -details -whose appointment it is and then goes into Lotus and sets the appointment in the appropriate person's calendar. I am a little stuck at this point. Trying to get the name for my server, using: $session = ObjCreate("Notes.NotesSession") $sname=$session.servername because I need to use GetDatabase. But calling Servername keeps giving an error "The requested action with this object has failed." feel like I'm in a little over my head here.
Developers Jos Posted April 10, 2008 Developers Posted April 10, 2008 (edited) I cannot test here but does something like this work? $sname = $Session.GetEnvironmentString("MailServer", True) This is an example that should open the default mailfile: $MailDB = $Session.GetDatabase ("", "") If $MailDB.ISOPEN <> True Then $MailDB.OPENMAIL EndIf $MailServer = $MailDB.Server $MailFileName = $MailDB.FileName $MailFilePath = $MailDB.FilePath Edited April 10, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SolidStark Posted March 22, 2016 Posted March 22, 2016 I know this an old Lotus Notes Forum, but does anyone have any idea how to do the print command through Autoit. I can get everything to work but the Print part when I convert it over. How do we use the Lotus Script Call function in Autoit? The Lotus Script is as follows: Sub Click(Source As Button) Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Set uidoc = workspace.CurrentDocument Call uidoc.Print End Sub
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now