09-25-2008, 08:07 AM
Below are the steps that I need automated. I have started on it but kinda stuck.
1. While Windows Explorer is open, I need the macro to to open the currently selected file. I was able to accomplish this by using:
2. The selected file is opened and edited, I was able to this part as well, save and close the document.
3. What I need to do is the macro to select the next filename from Windows Explorer and do the same edits as Step 2. Then when it reaches the last filename from the list, is to quit the macro.
Any suggestions? I have searched the newsgroup and found the following:
I was able to work on the above example but the problem is, it is always selecting the first filename in Windows Explorer. I need to be able to start anywhere from Windows Explorer.
Thanks so much.
1. While Windows Explorer is open, I need the macro to to open the currently selected file. I was able to accomplish this by using:
act "Temp"
int+ hwnd=win
int+ vFileList=id(1 hwnd)
str vCurrentFile
GetListViewItemTxt(vFileList -1 &vCurrentFile 0 2)
Acc a=acc(vCurrentFile "LISTITEM" win("Temp" "ExploreWClass") "id=1" "" 0x1000)
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
out vCurrentFile
2. The selected file is opened and edited, I was able to this part as well, save and close the document.
3. What I need to do is the macro to select the next filename from Windows Explorer and do the same edits as Step 2. Then when it reaches the last filename from the list, is to quit the macro.
Any suggestions? I have searched the newsgroup and found the following:
act "Temp"
int+ hwnd=win
int+ vFileList=id(1 hwnd)
str vCurrentFile
Acc a=acc(vCurrentFile "LISTITEM" win("Temp" "ExploreWClass") "id=1" "" 0x1000)
for a.elem 1 10000000
vCurrentFile=a.Name; err break
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
key (VK_RETURN)
I was able to work on the above example but the problem is, it is always selecting the first filename in Windows Explorer. I need to be able to start anywhere from Windows Explorer.
Thanks so much.