Q: I have a 3rd party DLL I need to reference in a script in ConnectR. Is there any secret to it?

From Galen Healthcare Solutions - Allscripts TouchWorks EHR Wiki
Revision as of 15:25, 19 January 2009 by Justin.Campbell (talk | contribs) (New page: Here is an example of a script which is used to convert RTF text to ASCII. It uses the AHSRTFUtility DLL (stored locally on the interface server at C:\Windows\System32\AHSRTFUtility.dll): ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here is an example of a script which is used to convert RTF text to ASCII. It uses the AHSRTFUtility DLL (stored locally on the interface server at C:\Windows\System32\AHSRTFUtility.dll):

function convertRTFtoASCII(RTFText)
'declaration debug
  dim Debug
  Debug = "N"
  If Debug = "Y" then
     Set fsoDebug = CreateObject("Scripting.FileSystemObject")
     Set filDebug = fsoDebug.OpenTextFile("c:\debugrtfasc.txt", 8, True)
   End If

                          
If Debug = "Y" then filDebug.Write rtftext & now() & vbcrlf

    Dim oRTF 

    Set oRTF = CreateObject("AHSRTFUtility.RTFObject")
If Debug = "Y" then filDebug.Write "1" & now() & vbcrlf
    oRTF.Value = RTFText
If Debug = "Y" then filDebug.Write "2" & now() & vbcrlf
     convertRTFtoASCII= oRTF.Text
If Debug = "Y" then filDebug.Write "3" & now() & vbcrlf
    set oRTF = nothing      ' release object

If Debug = "Y" then filDebug.Write convertRTFtoASCII & now() & vbcrlf

'cleanup debug
IF Debug = "Y" then
  filDebug.close
  set filDebug = nothing
  set fsoDebug = nothing
End If

end function
  • Check to ensure that the most recent version of the .dll is the one that is registered.