Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window not found, macro stops
#1
Is it possible for the macro to continue if a certain window is not found?

Maybe an ONNOTFOUND or ONERROR statement?

I use the act command all the time, but the window sometimes is locked up but it comes back eventually. I dont want the macro to stop when the window does not exists.

Thanks!
#2
Code:
Copy      Help
ifi- window name

this should do it....
you can get even more options on this in the Help file....those may also be able to help you zero in on what you're looking for....
#3
Or

act "window"
err ;;on error continue
...

or

act "window"
err wait 30 "window" ;;on error wait
...
#4
I cant get this to work correctly Cry

Let me give you a little bit of background of what I need. The macro answers to a lot of popup windows. Sometimes, either the user clicks on it to close, or just simply slow to come up. What I need is for the macro to go on a waitling loop until the window comes back up. Can this be created in a Fuction so I dont have to do it everytime i use the act "window" For example:

act "window"
err
rep
wait 1 second until "window" is back up then continue?

LOL, I dont know how to say it better than the above.

Thanks so much.
#5
well, you almost coded it right there. Smile

Code:
Copy      Help
act "window"
err
rep
,ifa "window"
,,break
,1
#6
Well no, lmao. The macro will be full of the same codes. I use "act" all the time.

Cry
#7
that didn't work? I thought for sure it would work....
what's happening when you run it?
#8
Oh it worked, just need to put it in a function so that i dont have to retype the same codes over and over.

act "Notepad"
FindMyWindow


;this is the code for FindMyWindow function
err
rep
mes "window not found"
wait 1
ifi "Notepad"
break

mes "window found"
ret



Does it look right? Works just fine for me Tongue I am very happy!

tyvm
#9
oh, to make it a function,
  • right click on the macro name
    click properties
    change "type" from "macro" to "function" on the drop down list


Forum Jump:


Users browsing this thread: 5 Guest(s)