Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/13/2024 in all areas

  1. if MPTool is running with elevated privileges then the script will #RequireAdmin at the top
    2 points
  2. if i want to do "ping 10.0.0.1 -t" in cmd mode. i just use run("ping 10.0.0.1 -t") but i have just seen this To run DOS (console) commands, try RunWait(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) so i use this runwait( @comspec & " /c ping 10.0.0.1 -t","",@SW_HIDE) which is the correct or better way to run Dos commands?
    1 point
  3. omg, this works, #RequireAdmin thank you so much
    1 point
  4. Example() Func Example() Local $hWndNote = WinWait("[CLASS:Notepad]", "", 3) WinActivate($hWndNote) ConsoleWrite("- Notepad WinActivate" & @CRLF) _WinShowState($hWndNote) Sleep(3000) WinSetState($hWndNote, "", @SW_MINIMIZE) ConsoleWrite("- Notepad SW_MINIMIZE" & @CRLF) _WinShowState($hWndNote) Sleep(3000) WinActivate($hWndNote) ConsoleWrite("- Notepad WinActivate" & @CRLF) ;~ WinSetState($hWndNote, "", @SW_RESTORE) ;~ ConsoleWrite("- Notepad @SW_RESTORE" & @CRLF) _WinShowState($hWndNote) Sleep(3000) EndFunc ;==>Example Func _WinShowState($hWnd) $state = WinGetState($hWnd) ConsoleWrite("$state=" & $state) If BitAND($state, 16) Then ConsoleWrite(" is minimized" & @CRLF) Else ConsoleWrite(" not minimized" & @CRLF) EndIf ConsoleWrite("" & @CRLF) EndFunc ;~ $WIN_STATE_EXISTS (1) = Window exists ;~ $WIN_STATE_VISIBLE (2) = Window is visible ;~ $WIN_STATE_ENABLED (4) = Window is enabled ;~ $WIN_STATE_ACTIVE (8) = Window is active ;~ $WIN_STATE_MINIMIZED (16) = Window is minimized ;~ $WIN_STATE_MAXIMIZED (32) = Window is maximized Edit: use WinActivate($hWndNote) to restore
    1 point
×
×
  • Create New...