<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Запуск внешнего приложения с Lotus]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=904</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=904&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Запуск внешнего приложения с Lotus».]]></description>
		<lastBuildDate>Thu, 09 Apr 2015 10:46:54 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Запуск внешнего приложения с Lotus]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124292#p124292</link>
			<description><![CDATA[<p>данный пример запускает по клику на кнопку внешнее приложение java.exe <br />Далее запускается таймер, который при появлении файла в папке pathOUT крепит его в док и стирает файл.</p><p>В кнопке:<br /></p><div class="codebox"><pre><code>Set nTimer = New NotesTimer(5)
Print &quot;ТАЙМЕР ПОИСКА ФАЙЛОВ В ПАПКЕ ВКЛ&quot;
    
On Event Alarm From nTimer Call FileExists
    
krip$ = |C:\Program Files\Java\jre7\bin\java.exe -jar &quot;C:\HTTPserver.jar&quot; &quot;|+  datapatch$ +XMLname  + |&quot; 9999 &quot;| + datapatch$ + |OUT\\&quot;|
Print  krip$
kripto% = Shell (krip$)
    
Print &quot;XML кнопка подписи - КОНЕЦ&quot;</code></pre></div><p>А форме в Globals -&gt; Declarations:<br /></p><div class="codebox"><pre><code>Dim nTimer As NotesTimer
Public XMLname As String 
Public datapatch As String</code></pre></div><p>Функция на форме в Globals<br /></p><div class="codebox"><pre><code>Sub FileExists(Source As NotesTimer)
    Print &quot;FileExists - START&quot;
    Dim pathOUT As String, FName As String 
    pathOUT =  datapatch &amp; &quot;OUT\&quot;
    FName = Dir$(pathOUT &amp; {*.*}, 0) 
    If FName = XMLname Then 
        Dim workspace As New NotesUIWorkspace
        Dim uidoc As NotesUIDocument
        Set uidoc = workspace.CurrentDocument
        Dim doc As NotesDocument
        Set doc = uidoc.Document
        Dim rtitem As NotesRichTextItem
        Set rtitem = New NotesRichTextItem( doc, &quot;XMLattach&quot; )
        Call rtitem.EmbedObject ( EMBED_ATTACHMENT, &quot;&quot;, pathOUT &amp; FName)
        Kill     pathOUT  &amp; FName &#039; подписанный XML
        Kill     datapatch &amp; XMLname &#039; исходный XML
        Call doc.save (True, False)
        nTimer.Enabled = False
        Call uidoc.Close
        Call workspace.EditDocument(False, doc)
        Msgbox &quot;Подписанный XML прикреплен&quot;
        Exit Sub
    End If
    Print &quot;FileExists - END&quot;
End Sub</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Thu, 09 Apr 2015 10:46:54 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124292#p124292</guid>
		</item>
	</channel>
</rss>
