Home PLC Hmi Scada Opc Otros ... : Library Vbscript Wincc
Home PLC Hmi Scada Opc Otros ... : Library Vbscript Wincc
Home PLC Hmi Scada Opc Otros ... : Library Vbscript Wincc
php
1 of 4 16/08/2020 17:43
Library VBScript WinCC https://plc-hmi-scadas.com/WinCC_Libreria_US.php
int : CloseProgram (string Program, out string Message) 'Program = Name of the process
Dim Obj , msg
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
return = Obj.CloseProgram("firefox",msg)
If return = -1 Then
HMIRuntime.Trace msg & vbNewline
End If
void : Login ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.Login()
void : Logout ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.Logout()
bool : LoggedInByCard ()
Dim Obj , ret
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
ret = Obj.LoggedInByCard()
void : NormalWinCC ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.NormalWinCC()
void : MinimizeWinCC ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.MinimizeWinCC()
void : MaximizeWinCC ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.MaximizeWinCC()
Thanks to WkHtmlToPdf I have created this functions, if you want try it, you need to install WkHtmlToPdf. You can donwload from https://wkhtmltopdf.org/downloads.html https:
//wkhtmltopdf.org/downloads.html
With this functions you will able to convert a website to pdf or convert a htm file to pdf.
int PrintHtmlToPdf (String Source, String Path , String msg)
Dim Obj , msg , ret
item.Enabled = False
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
HMIRuntime.Trace "Start: " & Obj.GetDateTime() & vbNewline
ret = Obj.PrintHtmlToPdf ("https://wkhtmltopdf.org","C:\\PDF\\wkhtmltopdf.pdf",msg)
If ret = -1 Then
HMIRuntime.Trace "Error: " & msg & vbNewline
End If
HMIRuntime.Trace "Finished: " & Obj.GetDateTime() & vbNewline
2 of 4 16/08/2020 17:43
Library VBScript WinCC https://plc-hmi-scadas.com/WinCC_Libreria_US.php
item.Enabled = True
Thanks to HtmlRenderer.PdfSharp I have created this functions, with this you don´t need to install nothing.
With this functions you will able to create a pdf from html code, and you can include css style and image
Update , if you donwload the last version there is some changes with several functions 26-07-2018
string : GetUserGroup ()
string : GetUserGroupLogon ()
string : GetMaxLimitTag (string TagName)
string : GetMinLimitTag (string TagName)
string : GetRuntimeProject ()
Dim Obj , ret
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
ret = Obj.GetRuntimeProject()
void : ShowTaskbar ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
Obj.ShowTaskbar()
void : HideTaskbar ()
Dim Obj
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
3 of 4 16/08/2020 17:43
Library VBScript WinCC https://plc-hmi-scadas.com/WinCC_Libreria_US.php
Obj.HideTaskbar()
string : GetUserGroup ()
Dim Obj , return
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
return = Obj.GetUserGroup()
HMIRuntime.Trace "User Group : " & return & vbNewline
string : GetUserGroupLogon ()
Dim Obj , return
Set Obj = CreateObject("VBScriptLibraryWinCC.dll")
return = Obj.GetUserGroupLogon()
HMIRuntime.Trace "User Group: " & return & vbNewline
4 of 4 16/08/2020 17:43