Sign in to follow this  
Followers 0
cryton2707

event trap

2 posts in this topic

Hello all,

Basically I have a script that modifies a graphic then copies it to the clip board and then uses paint to then save this as a new bmp.

My problem is that on some machines the spoolsrv.exe can pop up a dialogue for some error reading memory locations. This dialogue popping up though takes focus from the window the script is running it.. and the script stops dead until you close the dialogue and re focus the window.

Anyone know how I can event trap this. Iits not happening on all machines I run the script on and its not at a specified time.. So Ideally I'd like to event trap it so that I can then close the dialogue and continue my script..

Can any one please please please help me with this :)

Thanks


Welcome to the internet :) where men are men! Women are men! and 16 year old women are FBI agents!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

So you just want to close the window? Well if you want to close the window you could put this in your script when the window usually pops up...

WinKill ("WINDOWTITLEHERE")

If you replace WINDOWTITLEHERE with the title of the window you want to close then that will close the window...

And when your window looses focus do:

WinActivate ("TITLEOFWINDOWHERE")

Replacing TITLEOFWINDOWHERE with the window you want to bring in focus...

EDIT: Larry you posted when i was typing this post! =P :)

Edited by layer

FootbaG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0