;------------------------------------------------------------------------------------------------------------------------------------------
; WBStudioLargeFileOpenPanel.wbt
; Winbatch utility for a larger file open panel.
;------------------------------------------------------------------------------------------------------------------------------------------
; Steffen Fraas, sfraas@zoo.co.uk 20010405
; Modified by Detlev Dalitz.20020130
;------------------------------------------------------------------------------------------------------------------------------------------
; Usage: Create a shortcut to this script on desktop or on taskbar and run the shortcut.
;------------------------------------------------------------------------------------------------------------------------------------------
IntControl(1002,0,0,0,0) ; Hide icon.
RunZoom("WinBatch Studio.exe","") ; Start up Winbatch Studio, change as required.
AddExtender("WWCTL34I.DLL") ; Load extender.
; Save mouse position for later re-positioning.
mousememo = StrCat("MouseMove(",StrReplace(MouseInfo(2)," ",","),',"","")')
While WinExist("WinBatch Studio") ; Whilst winbatching...
; Open dialog FileOpen.
ControlHandle=cWndByWndSpec("WinBatchStudioMainWndClass","WINBATCH STUDIO",6,59648,59393,59419,59422,59420,59421)
cSetFocus(ControlHandle) ; Activates Window
TimeDelay(1)
SendKey(`^o`) ; Sends Keystrokes.
If WinExist("Open") ; Wait for open (control-o) request.
window1=cWndByWndSpec("#32770","WINBATCH STUDIO",13,1091,1137,1088,1120,1121,1090,1152,1089,1136,1040,1,2,1038)
cSetFocus(window1) ; Activates Window.
; move upper left corner
Winid=cWinIDConvert(window1)
MouseMove(3,3,Winid,"") ; Point at upper left of open panel.
MousePlay("-270 -160",Winid,"",@MPLAYLBUTTON,0.1) ; Expand it.
; move lower right corner
window2=cWndbyid(window1,-1)
Winid=cWinIDConvert(window2)
MouseMove(3,3,Winid,"") ; Point at lower right of open panel.
MousePlay("280 420",Winid,"",@MPLAYLBUTTON,0.1) ; Expand it.
; choose details
ControlHandle=cWndbyclass(window1,`ToolbarWindow32`)
cClickToolbar(Controlhandle,9) ; Clicks a toolbar button.
; sort date descending
window2=cWndbyid(window1,1121)
window3=cWndbyid(window2,1)
ControlHandle=cWndbyid(window3,0)
winid=cWinIDConvert(ControlHandle)
MouseMove(621,14,winid,"")
MouseClick(@LCLICK,0) ; TODO - Check on various screen resolutions.
; put focus onto listview
window2=cWndbyid(window1,1121)
ControlHandle=cWndbyid(window2,1)
cSetFocus(ControlHandle) ; Activates Window.
; Move mouse pointer to previously saved position.
%mousememo%
Exit ; Next open panel will be same size as last one. Job done, exit.
EndIf
TimeDelay(1) ; No open request yet.
EndWhile
Exit
;------------------------------------------------------------------------------------------------------------------------------------------