Hi All,

Here is the popup manager I wrote. (im just about to
head off on holiday but I'll be back in Jan)

download here: http://www.mindflowsolutions.com/software/popup.zip

I would be grateful if people could try this out and give me feedback on
if it is working for them. Any improvements and suggestions are also
welcome.

The software consists of 2 parts.

popup.exe  <--- the main application
config.txt <--- the config file

The exe doesnt (or shouldnt) need any dependencies it should all be
compiled in.

The config file contains the windows/alerts you want to close in yaml
format. See the example. You can name the windows in the config file
anything you like but you must indent the title, text and button with 2
spaces and then 1 space after the colon. You will get an error if use tabs
in this file. Such is the nature of yaml. Also I dont know if you can use
the : in the text anywhere I think you have to escape it somehow.

Execution:

popup.exe  <---- reads the config.txt and loops forever looking for the
windows in the file - when it finds them it clicks whatever button you
have specified.

you can also provide an interval between loops - the default is 1 second,
and you can turn the logging off - default is on.

example:
popup.exe 5  <---- interval of 5 secs
popup.exe 0.1 <---- interval of 0.1 secs
popup.exe 1 off <---- interval 1 secs and turn off the logs

The config file is parsed on each loop so once the exe is started you can
modify the config and save for immediate effect - no need to stop and
restart the exe.

Example:
The included config.txt has 2 popup windows from this url:
http://www.waller.co.uk/javatest.htm

If you navigate there in IE and then start the exe it will locate and
close the 2 windows.

Problems:
If there is a very long list of windows to close it might take a while
even on 0.1 secs interval to loop thru and look for them all.

If you set the interval to 0 - your cpu gets a hammering.

I have only tested it on a few javascript alerts.

Background:
The popup.exe runs as a separate process due to the nature of ruby
threading its very difficult to handle modal windows in the parent or
children of the ruby process that instigates the modal dialogue.

Maybe one day I will find a way - but at the moment this was a quick and
easy solution to handling dialogue and modal windows.

Thanks for trying out this experimental software. Please provide feedback
through the mailing list.

Thanks

Kingsley


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to