• 🔥 Бесплатный курс от Академии Кодебай: «Анализ защищенности веб-приложений»

    🛡 Научитесь находить и использовать уязвимости веб-приложений.
    🧠 Изучите SQLi, XSS, CSRF, IDOR и другие типовые атаки на практике.
    🧪 Погрузитесь в реальные лаборатории и взломайте свой первый сайт!
    🚀 Подходит новичкам — никаких сложных предварительных знаний не требуется.

    Доступ открыт прямо сейчас Записаться бесплатно

выполнить формулу

  • Автор темы Автор темы aks
  • Дата начала Дата начала
Статус
Закрыто для дальнейших ответов.
A

aks

Здравствуйте, господа! Возможно ли выполнить @-формулу в скрипте? Искал поиском на форуме - ничего не нашёл, хотя помню, что обсуждалось. Подскажите пожалуйста.

Спасибо!
 
Evaluate function and statement

Example
Execute a Lotus software application macro.
Syntax
Evaluate ( macro [ , object ] )
Elements
macro
A string expression specifying the text of a Lotus software application macro, in the syntax that the product recognizes. Refer to the Lotus software documentation for the correct syntax of the macro.
If the macro text is in a constant or string literal, the Lotus software application needs to do only initial processing of the macro once, at compile time, while variable strings incur that processing each time the macro is evaluated.
object
Optional. The name of a product object. Refer to the product documentation to determine if the macro requires an object, and what the object is.
Return value
If the Lotus software application macro being executed returns a value, the Evaluate function returns a Variant containing that value. Otherwise, the function does not return a value.


Код:
' For each document in a Notes database, use a Notes macro to
' compute the average for a list of numeric entries in the 
' NumberList field. Evaluate returns a Variant, and Notes 
' macros return an array. In this case, the array contains only 
' 1 element (element 0). For more info, see the Notes
' documentation.

Sub Click(Source As Button)
' The macro text must be known at compile time.
Const NotesMacro$ = "@Sum(NumberList) / @Elements(NumberList)"
Dim result As Variant, j As Integer
Dim db As New NotesDatabase("", "MYSALES.NSF")
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set dc = db.AllDocuments
For j% = 1 To dc.Count
Set doc = dc.GetNthDocument(j%)
result = Evaluate(NotesMacro$, doc)
MessageBox("Average is " & result(0))
Next
End Sub
 
Статус
Закрыто для дальнейших ответов.
Мы в соцсетях:

Взломай свой первый сервер и прокачай скилл — Начни игру на HackerLab

Похожие темы