Sending Keystrokes to Tabbed Dialogs
Keywords: tabbed dialogs
Question:
In NT, I would like to pass the selected item name, e.g. a file I've selected in Explorer, to a WBT routine that would:I've tried many variants of SendKeysTo (something like !{ENTER}^{PGDN}^{PGDN}!p), but end up frustrated. What do you suggest?
- Access its Properties dialog
- Jump to the Security tab
- Press the Permissions button
I want the item to be a variable, inasmuch as I could have either a file or a folder selected and want to quickly view permissions.
I've got a file selected in Explorer. I run a WBT file as follows:
SendKeysTo("Explorer","!{ENTER}") WinWaitExist("~Properties",5) SendKeysTo("~Properties","^{PGDN}^{PGDN}!p")...but the last line does not yield a result! In fact, NT 4.0 does not recognize the ^{PGDN} sequence when run from within a WBT script.I just *know* your answer is going to be "check out the Control extensions", which I have, but I'm no closer to a solution to this seemingly simple little routine I trying to cobble together. Once I obtain the code number of the Permissions button, I'm apparently not bright enough to understand how to use that code number to gain direct access to the Permissions button. THIS IS WHERE I GET LOST!
Answer:
One kind of problem with tabbed dialogs is that the windows making up the tabbed dialog do not exist until the tab is selected. This introduces a delay which much be accounted for.Maybe try (for debugging) and see where it goes wrong...
SendKeysTo("Explorer","!{ENTER}") WinWaitExist("~Properties",5) SendKeysTo("~Properties","^{PGDN}") TimeDelay(2) SendKeysTo("~Properties","^{PGDN}") TimeDelay(2) SendKeysTo("~Properties","!p") TimeDelay(2)
Article ID: W13833Filename: Sending Keystrokes to Tabbed Dialogs.txt