CallDialog Dialog
CallDialog PageD

BEGINDIALOG Dialog 337, 260, 350, 110
CAPTION "Convert by Tecnodude"
	TEXT "Convert Version .03 by Tecnodude 1-19-2001", 59, 15
	DEFPUSHBUTTON "&OK", btnOK, 125, 41, 75, 23
ENDDIALOG

BEGINDIALOG PageD 337, 260, 350, 138
CAPTION "Number of pages to convert"
	TEXT "Please enter the number of pages to convert:", 55, 19
	EDITTEXT pages$, 128, 42, 78, 20
	DEFPUSHBUTTON "&OK", btnOK, 130, 78, 75, 23
ENDDIALOG
pages=val(pages$)
repeat
	UseWindow("MSREADER.EXE|EBUI_CHILD|Microsoft Reader|1",1)
	ClickMouse(Left,Down,54,62)

	MoveMouse(84,654)
	ClickMouse(Left,Up,84,654)

	UseWindow("MSREADER.EXE|EBUI_CHILD|Microsoft Reader|1",1)
	ClickMouse(Left,Down,31,131)
	ClickMouse(Left,Up,31,131)

	UseWindow("MSREADER.EXE|EBUI_CHILD|Microsoft Reader|1",1)
	SendKeys("<Alt>")

	UseWindow("WORDPAD.EXE|RichEdit20W|New WordPad Document - WordPad|1",1)
	SendKeys("<Ctrl v>")

	UseWindow("MSREADER.EXE|EBUI_CHILD|Microsoft Reader|1",1)
	SendKeys("<pagedown>")
pages=pages-1
until pages<1