I know this is going to cause some feedback but here I go. I was trying to create something like the new "Recall" feature in the new Windows Copilot. But to start by just capturing a image of the screen when a new window opens.
[OKAY: let the sk?tstorm begin]
Looking for a method to trigger when ANY window opens
Moderators: Dorian (MJT support), JRL
Looking for a method to trigger when ANY window opens
MS v15 | Windows 11 Pro | NY, USA
Re: Looking for a method to trigger when ANY window opens
This could get really complicated, depending on what you want to accomplish. Let's start with easy.
Code: Select all
Let>msg_xpos=0
Let>msg_Ypos=0
Message>Macro Scheduler Message
//Discover current Active Window
GetActiveWindow>vTitleA,vXpos,vYpos
/////////////////////////////
Label>Loop
//Closes the script when the message window is closed
IfWindowOpen>Macro Scheduler Message
Else
GoSub>Quit
EndIf
///////////////////////////////////////////////
//Small wait to prevent high CPU
Wait>0.01
////////////////////////////
//Acquire name of current active window and then compare to previous current active window
GetActiveWindow>vTitle,vXpos,vYpos
//If names are the same nothing has changed, do nothing
If>vTitle=vTitleA
Else
//If names are different, Do something.
//In this case display the name in the message box.
SetControlText>Macro Scheduler Message,TMemo,1,vTitle
Let>vTitleA=vTitle
EndIf
Goto>Loop
SRT>Quit
Exit>0
END>Quit