createobject("wscript.shell")?

how would you implement this via DXL?

 


set shell = createobject("wscript.shell")
shell.appactivate("DOORS Database: /TEST - DOORS")
shell.sendkeys "(% )(X)"  'maximize active window
string maxActiveWindow(string Window) {
        string err = null
        OleAutoObj shell = oleCreateAutoObject("WScript.shell")
        OleAutoArgs shellArgs = create
        
        put(shellArgs, Window)
        err = oleMethod(shell, "AppActivate", shellArgs) //activate window

        if (null(err)) {
                clear(shellArgs)
                put(shellArgs, "(% )(R)")
                err = oleMethod(shell, "sendkeys", shellArgs) //retsore active window
                clear(shellArgs)
        }
        
        if (null(err)) {
                clear(shellArgs)
                put(shellArgs, "(% )(X)")
                err = oleMethod(shell, "sendkeys", shellArgs) //maximize active window
                clear(shellArgs)
        }
        
        clear(shellArgs)
        delete(shellArgs)
        oleCloseAutoObject(shell)
        shell = null
        
        return err
}

print maxActiveWindow("DOORS Database: /TEST - DOORS")

 


EHcnck - Wed Dec 27 21:52:36 EST 2017