09-08-2015, 08:13 PM
I want an executable that does something when a window opens with a certain title.
This can be any application within windows.
At the moment I can make an executable that does this withe following code
Macro Macro38
I just repeat above code indefinitely (every # second or # millisecond).
For example if there is window which has which has "test" in it's title, then "mspaint" will be opened ("mspaint" opens paint in windows).
I just wanted to ask if it there is a more memory/process friendly way to do this (in exe compiled exe).
Probably the infinite loop method with above code is process/memory friendly OR only method but then at least I know it 100% sure.
This can be any application within windows.
At the moment I can make an executable that does this withe following code
Macro Macro38
int i
str titles
ARRAY(int) handles
GetWindowList &titles "" 1|2|4 0 0 handles
ARRAY(str) arr = titles
for i 0 arr.len
,out arr[i]
I just repeat above code indefinitely (every # second or # millisecond).
For example if there is window which has which has "test" in it's title, then "mspaint" will be opened ("mspaint" opens paint in windows).
I just wanted to ask if it there is a more memory/process friendly way to do this (in exe compiled exe).
Probably the infinite loop method with above code is process/memory friendly OR only method but then at least I know it 100% sure.