Jump to content
Sign in to follow this  
cryton2707

event trap

Recommended Posts

cryton2707

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
layer

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.