Please help me with the following script which aim is to:
1.Detect Active Window
2. Move Active Window to x,y position
3. Activate the window
;Active Window Info:
;------------------------------
;Window Title, Class and Process
;-------------------------------
;New notification (Window Title)
;ahk_class Windows.UI.Core.CoreWindow
;ahk_exe ShellExperienceHost.exe
;Script: Does Not Detect Active Window !
Please Help, Thank You.
dzur
Code: Select all
;
Menu, MyMenu, Add, Detect Move and Activate Window, MenuHandler
Menu, MyMenu, Add ; Add a separator line.
Menu, MyMenu, Add, Exit Menu, MenuHandler
;
MenuHandler:
;
if (A_ThisMenuItem = "Detect Move and Activate Window")
; Goal: Detect, Move and Activate an existing New Notification Window
if WinExist, New notification or WinExist("ahk_class Windows.UI.Core.CoreWindow") or WinExist ("ahk_exe ShellExperienceHost.exe")
{
MsgBox,64,New Notification Window Detected... about to be Moved and Activated !
;
WinMove, 10, 10
WinActivate, ahk_exe ShellExperienceHost.exe
;-------------------------------------------
}
else
{
MsgBox, Notification Window Not Detected !
}
if (A_ThisMenuItem = " Exit Menu")
{
Exit App
}
;
;Assign Auto Hot Key: (F9)
F9::Menu, MyMenu, Show ; i.e. press the F9 hotkey to show the menu.
;