Jump to content

Listing Windows Created By Other Users


Recommended Posts

IIRC, you can't send keystrokes to windows belonging to processes running with higher privileges than your script's. That will almost never happen in XP since pretty much everything runs with admin. access. The same does not happen if you have UAC enable in Vista/7.

Obs: Just tested it with two simple scripts in Windows 7, and it works like that: the window is visible, can be activated, but does not accept keystrokes from lower-privileged processes. They're completely ignored.

#RequireAdmin
#include <GUIConstantsEx.au3>

GUICreate("AU3-RUNAS-HIGH",500,500)
GUICtrlCreateEdit("",4,4,492,492)
GUISetState(@SW_SHOW)

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

;#RequireAdmin
Global $hWnd = WinWait("AU3-RUNAS-HIGH")
If $hWnd Then
    WinActivate($hWnd)
    Send("asdw")
EndIf
Edited by danielkza
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...