;  ********************************************************
;  ** Launch Dialog, select which Window to resize       **
;  ** "Watch List" or "Print Log", if the Print Log      **
;  ** is selected should it be cleared.                  **
;  ********************************************************

; <<< START OF WRD.WBT >>>

; var's
App1		= ""	; Button seelcted for Watch List or Print Log
Clr1		= ""	; CheckBox for CLear Print Log
Window1	= ""	; Name of Window Watch List or Print Log
POW		= ""	; Position of Window (Upper or Lower) (Left or Right)
rc1		= ""	; return code from call to Dialog

:Start_Of_Test

rc1 = 0
; loop until (rc1 not equal 0)
while (rc1 != 1)
	; WRD.WBC is a compiled dialog (Encoding scripts for calls from .EXE's)
	;rc1 = Call("WRD.WBC", "")
	; rc1 return code from call to Dialog.
	; Button "Next" = 0  keep looping
	; Button "Done" = 1  end looping

	Dialog1Format=`WWWDLGED,5.0`

	Dialog1Caption=`Place Window at Location`
	Dialog1X=193
	Dialog1Y=95
	Dialog1Width=122
	Dialog1Height=95
	Dialog1NumControls=10

	Dialog101=`6,40,40,DEFAULT,RADIOBUTTON,POW,"&3 Lower Left",3`
	Dialog102=`72,4,46,DEFAULT,RADIOBUTTON,POW,"&2 Upper Right",2`
	Dialog103=`6,4,44,DEFAULT,RADIOBUTTON,POW,"&1 Upper Left",1`
	Dialog104=`72,40,46,DEFAULT,RADIOBUTTON,POW,"&4 Lower Right",4`
	Dialog105=`18,76,36,DEFAULT,PUSHBUTTON,DEFAULT,"&Execute",1`
	Dialog106=`6,22,38,DEFAULT,RADIOBUTTON,App1,"&Print Log",1`
	Dialog107=`72,22,40,DEFAULT,RADIOBUTTON,App1,"&Watch List",2`
	Dialog108=`6,58,50,DEFAULT,CHECKBOX,Clr1,"&Clear Print Log",1`
	Dialog109=`64,76,36,DEFAULT,PUSHBUTTON,DEFAULT,"&Done",0`
	Dialog110=`68,58,50,DEFAULT,STATICTEXT,DEFAULT,"<ESC> To CANCEL"`

	ButtonPushed=Dialog("Dialog1")

	; Print Log or Watch List
	if App1 == 1 then
		Window1 = "~WinRunner Print Log"
	endif
	if App1 == 2 then
		Window1 = "~Watch List"
	endif

	; Activate Window and clear Print Log if CheckBox Checked
	if (winexist(Window1) == @TRUE) then
		WinShow(Window1)
		WinActivate(Window1)
	else
		message("Error Message", "Window [%Window1%] Not Found !")
		goto Start_Of_Test
	endif
	if ( (App1 == 1) && (Clr1 == 1) ) then
		SendMenusTo(Window1,  "File Clear All")
	endif

	; Resize and position Window
	switch POW
		case 1
			WinPlaceSet(@NORMAL, Window1, "0 0 440 500")
			break
		Case 2
			WinPlaceSet(@NORMAL, Window1, "500 0 1000 500")
			break
		Case 3
			WinPlaceSet(@NORMAL, Window1, "0 500 440 963")
			break
		Case 4
			WinPlaceSet(@NORMAL, Window1, "500 500 1000 963")
			break
		Case POW	; default case
			Messsage("Position of Window Not selected!")
			break
	EndSwitch

endwhile

; Corners of the window "Left Top Right Bottom"

; <<< END OF WRD.WBT >>>




