Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function Triggers
#1
I have a few dialog boxes I need to close with similar names while the main macro is running. Correct me if I understood this please Smile

For example, I wanted to close anything with the word "Microsoft Internet Explorer". So I made a function with a triger and used "$Microsoft Internet Explorer$" without the quotes in the Window name. I am using clo command to close the window. If I have 3 windows, how do I close all 3? Can you use regular expressions on clo command?

I am trying not to make so many functions and hopefully only use one.
#2
Code:
Copy      Help
rep
,int hwnd=win("Microsoft Internet Explorer$" "" "" 0x200)
,if(!hwnd) break
,clo hwnd
,0.1
#3
I don't know, maybe I'm too sleepy :lol: but having them separated seems faster?

When I had them into separate functions with the exact window names, I hardly see the windows at all. Now its kinda slower.
#4
I used 0.1 second delay, but if speed is important, delete it.

If it is function with window trigger, it should run automatically for each window. To ensure that it close the trigger-window, use this:

clo TriggerWindow

(it is whole function, don't use the code from previous post).
#5
I don't know what I'm doing wrong but this is not working Cry

$Microsoft Internet Explorer$ = Window Name
IEFrame = Class


clo TriggerWindow is what I am using instead.



As a test, I tried it on this forum and it didn't close the window!


Forum Jump:


Users browsing this thread: 1 Guest(s)