Avalados por :
#-Início-----------------------------------------------------------------
#-Sub Principal------------------------------------------------------------
Função Principal() {
[Reflection.Assembly]::LoadWithPartialName("Microsoft.VisualBasic") > $Nulo
[Reflection.Assembly]::LoadFile($PSScriptRoot + "\SAPFEWSELib.dll") > $Nulo
$SapGuiAuto = [Microsoft.VisualBasic.Interaction]::GetObject("SAPGUI")
Se ($SapGuiAuto -eq $Nulo) {
Interromper
}
$Application = $SapGuiAuto.GetType().InvokeMember("GetScriptingEngine",
[System.Reflection.Bindingflags]::InvokeMethod,
$nulo, $SapGuiAuto, $nulo, $nulo, $nulo, $nulo)
[SAPFEWSELib.GuiApplication]$Application =
[System.Runtime.InteropServices.Marshal]::CreateWrapperOfType($Application,
[SAPFEWSELib.GuiApplicationClass])
Se ($Application -eq $Nulo) {
Interromper
}
$Connection = $Application.Children.Item(1)
[SAPFEWSELib.GuiConnectionClass]$Connection =
[System.Runtime.InteropServices.Marshal]::CreateWrapperOfType($Connection,
[SAPFEWSELib.GuiConnectionClass])
Se ($Connection -eq $Nulo) {
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute