Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View PDF from with VFP
Message
 
To
21/01/2005 13:22:49
Barbara Hill
B.L. Hill Applications Limited
Halifax, Nova Scotia, Canada
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00979286
Message ID:
00979460
Views:
35
Here is another idea that came to my mind: teach user to work with "My Ebooks" shelf that is included into Acrobat/Adobe reader.

DO YBooks WITH "c:\personal"
PROCEDURE YBooks
LPARAMETERS pDir

pDir=ADDBS(pDir)

=ADIR(apdf,pdir+"*.pdf")
=ASORT(apdf)

FOR ia=1 TO ALEN(apdf,1)
	apdf[ia,1]=pDir+apdf[ia,1]
ENDFOR
oShell = CreateObject("WScript.Shell")
oShell.Run(apdf[1,1])
*wait for Acrobat reader
	lntimeout=60
	lnstarttime=SECONDS()
	DO WHILE not (oShell.AppActivate("Acrobat Reader") OR oShell.AppActivate("Adobe Reader"));
						AND SECONDS()-lnstarttime<lntimeout
		INKEY(2)
	ENDDO

	IF oShell.AppActivate("Acrobat Reader") OR oShell.AppActivate("Adobe Reader")
		oShell.SendKeys("%FM")
		*wait for Bookshelf
		lntimeout=10
		lnstarttime=SECONDS()
		DO WHILE not oShell.AppActivate("My BookShelf");
						AND SECONDS()-lnstarttime<lntimeout
			INKEY(2)
		ENDDO

		IF oShell.AppActivate("My BookShelf")
			oShell.SendKeys("{ENTER}")
			lcfilelist=""
			FOR ia=1 TO ALEN(apdf,1)
				lcfilelist=lcfilelist+["]+apdf[ia,1]+[" ]
			endfor
			oShell.SendKeys(lcfilelist)
			oShell.SendKeys("{ENTER}")
		endif

	endif

	oShell=.null.

RETURN
>Thanks, Yuri. That may just do the trick.
>
>Barb
Previous
Reply
Map
View

Click here to load this message in the networking platform