Posts: 133
Threads: 15
Joined: Jun 2014
How could I scroll to an item that has been a few pagedown in the right-hand panel in windows explorer?
For example when the "Documents" folder is selected I would like it to scroll to a file that is in the 3rd pagedown in the right hand panel.
Posts: 11,869
Threads: 138
Joined: Dec 2002
Macro
Macro2697
int w=win("Documents" "CabinetWClass")
int c=child("" "DirectUIHWND" w 0x0 "accName=Items View") ;;list 'Items View'
act c
key H Q(#3)
Posts: 133
Threads: 15
Joined: Jun 2014
Thanks Gintaras,
My next question is if the position of the filename is changing all the time. Could you make the filename visible no matter where it is?
Posts: 11,869
Threads: 138
Joined: Dec 2002
Macro
Macro2701
str folder="My QM"
str filename="test.php" ;;not tested: don't know whether it always must be with extension or as displayed
int w=win(folder "CabinetWClass"); if(!w) end ERR_WINDOW
act w
SHDocVw.InternetExplorer ie=GetFolderWindowIE(w); if(!w) end ERR_FAILED
Shell32.ShellFolderView d=ie.Document
;find and select folder item whose name is filename
Shell32.FolderItem fi
foreach fi d.Folder.Items
,str name=fi.Name
,if name~filename
,,VARIANT v=fi
,,d.SelectItem(v 1|4|8|16) ;;https://msdn.microsoft.com/en-us/library/windows/desktop/bb774047%28v=vs.85%29.aspx
,,break
Import GetFolderWindowIE from Archive.qml:
Collected QM apps, functions, samples
Posts: 133
Threads: 15
Joined: Jun 2014
Thanks a lot. It works great.