Example()
FuncExample()
    ; Run Notepad
    Run("notepad.exe")
    ; Wait 10 seconds for the Notepad window toappear.
    Local $hWnd =WinWait("[CLASS:Notepad]", "", 10)
    MsgBox(1,"Test1", $hWnd, 3)
    ; Convert the handle to a string.
    Local $sHWnd = String($hWnd)
    MsgBox(1,"Test2", $sHWnd, 3)
    ; Minimize the Notepad window and wait for2 seconds.
    WinSetState(HWnd($sHWnd), "",@SW_MINIMIZE)
    Sleep(2000)
 
    ; Restore the Notepad window and wait for 2seconds.
    WinSetState(HWnd($sHWnd), "",@SW_RESTORE)
    Sleep(2000)
    MsgBox(1,"Test3", HWnd($sHWnd))
    WinClose(HWnd($sHWnd)) ; Close the Notepadwindow.
    MsgBox(1,"Test4", HWnd($sHWnd))
EndFunc   

 

相关文章:

  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
相关资源
相似解决方案