How can I maximize, restore, or minimize a window with a vbscript?

后端 未结 4 1975
粉色の甜心
粉色の甜心 2020-12-05 08:35

I need to be able to make separte .vbs files that will (when triggered with a keyboard short-cut) will make the active window maximized, minimized, or restored.

How

4条回答
  •  眼角桃花
    2020-12-05 09:21

    SendKeys was not working in my computer. Spanish native with Spanish and English keyboard. I did this and worked in my code as instruction and worked to maximize my excel window. I put the .Sleep to visually check it.

    objExcel.SendKeys"% x"
    objExcel.Visible = True
    objExcel.SendKeys"% x"
    
    WScript.Sleep 2000
    

提交回复
热议问题