Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exe: do something when windowtitle contains ...
#1
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
Code:
Copy      Help
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)