--- In [email protected], "Dave Knorr" <[EMAIL PROTECTED]> wrote: > > Thanks Sean, but your script didn't work. > Bruce, your script worked, sort of. For some reason the name of the > caption must be full length; no wildcards allowed. This is puzzling, > but not a show-stopper, but i would like to be able to figure out a > more elegant method (and maybe learn something in the process). > Karen, I had hesitated incorporating your debugger script into my > efforts, but damn it's a nice tool! Thanks for taking the time to > share ( and I believe Ted Wall has some history with this ) > > I'm still not finished with this (I plan on playing with the debugger > script a lot more), but I wanted to let you all know that I appreciate > the help.
I think you'd better debug first setting the following as the command: win.debug(arg(1),arg(2),arg(3),?'"'++arg(4)++?'"',?'"'++win.caption(arg(2))++?'"') (You may try win.gettext(arg(2)) instead of win.caption(arg(2)).) At first I was a bit surprised to hear win.caption(arg(2)) was working when the window was created, but not working when the window was destroyed. Usually the converse is expected to be true, I think. If you use == in expressions, both side should exactly match literally, so you can't use wildcards in those cases. However, you can use index/revindex, or win.match() instead, e.g.: win.match(arg(2),"* - Personal Macro workbook.xls") index(arg(4)," - Personal Macro workbook.xls") Sean Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
