Using View System Windows

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Guest

Using View System Windows

Post by Guest » Wed Nov 10, 2004 12:02 pm

I want to capture the name of a file on the trigger event of a user renaming it in Windows Explorer (either right-clicking or selecting File, Rename).

To do this I believe that I need to identify the file name window (more like a field) using the View System Windows facility.

The file that I am renaming in this example is test2b.txt. It is shown in the last line of this group returned by View System Windows.

1442746 - TFrmEnumWin "Open Windows"
1049618 - TStatusBar "Found 164 Objects"
1180678 - TButton "Find"
1049608 - TButton "Refresh List"
1180704 - TEdit "test2b"

The trouble is, I cannot find any instructions on how to use these values in MS help or this support forum. What do TFrmEnumWin, 1180704 and TEdit represent and how do I use them?

Thanks.

Lumumba

Post by Lumumba » Wed Nov 10, 2004 12:15 pm

As far as I know the T-things are Delphi Controls ...

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Nov 10, 2004 5:22 pm

I think all you can do is monitor the name of the file, like this [b/untested[/b] sample:
Let>TestFile=test2b

Label>Check
IfFileExists>%TestFile%,Good,Gone

Label>Good
Wait>3
Goto>Check

Label>Gone
MessageModal>%TestFile% does not exist. May have been renamed.

Label>End
Note that this loop will run forever until the TestFile is renamed/deleted. Will also be a constant drain on system resources.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Guest

Post by Guest » Wed Nov 10, 2004 7:24 pm

Many thanks Lumumba and Bob.

Bob, I don't want to watch just a single file and I agree that constant polling would use too many resources. However, similar products seem to have this facility so I thought there might be a way. - Perhaps also using MS's little brother, PerfectMenu.

All ideas welcome.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts