Lotus script code to click hotspot

Hi,

I created one form and one button in that form. Also wrote some code in that button which send some report to different server.

Now i have to write an agent that will take handle of this and code to click that button…

Is their any lotus script code that take handle of button and also code to click that button…Kindly share

Subject: Lotus script code to click hotspot

  1. Show us your code (what you have written) and explain what is not working.

  2. Is the code in the button Lotussript or Formula?

  3. Where will the agent be executing? Client or server? How will it be triggered?

Without more info it is hard to help you, but it sounds like you might be on the wrong track.

I would put the code that you want the button to execute in a function/subroutine. You can put it in a script library for easier sharing.

This function/subroutine is then called once from the button and once in your agent.

Remember, if the agent is running on the server it can only contain/use backend classes, no UI classes.

Subject: Lotus script code to clictton and k hotspot

I think my query is not clear…Let me make it more simple

there is a form “frm” that contains a button “bt”.

There is a view “vw” that contain one document created with this form “frm”

Now i am writing one agent “agt” which picks the created document from view “vw”, take the handle of button “bt” and click that button.

Now my question is

1)Need to write code to take handle of button

2)need code for clicking that button.

.

here is my code in which i am able to pick the created docuemtn but dont know how to take handle of button “bt”

%REM

Agent testAgent

Created Mar 3, 2016 by Pooja Rani31/India/IBM

Description: Comments for Agent

%END REM

Option Public

Option Declare

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim col As NotesDocumentCollection

Dim doc As NotesDocument

Set db=s.CurrentDatabase

Set col=db.UnprocessedDocuments



Dim session As New NotesSession

Dim user As String

user = session.CommonUserName

'Print "Collection size: " & col.count 



Set doc=col.getfirstdocument

While Not doc Is Nothing

	MessageBox doc.day(0)

	MessageBox user

	'Perform desired operations

	Set doc=col.GetNextDocument(doc) 





Wend 

End Sub

Subject: Do you really work for IBM?

Will the button just be opening a page, as Karl asked, is this running in a client on the front end?

Subject: Lotus script code

You still don’t answer two of my three questions:

  1. Is the code in the button Lotusscript or Formula?

  2. Where will the agent be executing? Client or server? How will it be triggered?

Can you show the code on the button? Again, as I said in my first answer, you should put whatever code you have in the button in a function in script library and then simply call that function.

Function myButtonCode()

'*** Code to be executed when button

'*** is clicked goes here

End Function

Then your button code looks like this:

Sub Click(Source As Button)

Call myButtonCode()

End Sub

And you put a call to myButtonCode() in your agent.

Additionally, do not use extended notation when accessing document fields, use the GetItemValue method instead.

Just a curious question, how long have you been programming using Notes/Domino? The reason I am asking is partially because I am interested to learn if companies still hire new Domino developers.