Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scroll to item in the right-hand panel of windows explorer
#1
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.
#2
Macro Macro2697
Code:
Copy      Help
int w=win("Documents" "CabinetWClass")
int c=child("" "DirectUIHWND" w 0x0 "accName=Items View") ;;list 'Items View'
act c
key H Q(#3)
#3
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?
#4
Macro Macro2701
Code:
Copy      Help
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
#5
Thanks a lot. It works great.


Forum Jump:


Users browsing this thread: 1 Guest(s)