Thread: Monitor off
View Single Post
  #5  
Old 11-17-2023, 21:15
wild wild is offline
Friend
 
Join Date: Oct 2017
Posts: 37
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 54
Thanks Rcvd at 32 Times in 17 Posts
wild Reputation: 1
I suggest to use the asynchronous PostMessage(...) instead of the synchronous SendMessage(...) to avoid waiting forever.....


Code:
cmd /c "powershell.exe -Command "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)""
Reply With Quote
The Following User Gave Reputation+1 to wild For This Useful Post:
Fyyre (12-07-2023)
The Following 5 Users Say Thank You to wild For This Useful Post:
blue_devil (11-19-2023), foosaa (05-03-2024), niculaita (11-30-2023), ontryit (01-18-2025), tonyweb (11-19-2023)