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.
Using View System Windows
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I think all you can do is monitor the name of the file, like this [b/untested[/b] sample:
Note that this loop will run forever until the TestFile is renamed/deleted. Will also be a constant drain on system resources.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
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
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.
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.