Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Win32::OLE and Adobe Acrobatby blm (Hermit) |
on Jan 11, 2006 at 11:52 UTC ( [id://522410]=note: print w/replies, xml ) | Need Help?? |
Actually you dont even need OLE to do this. There is a Win32 API call "ShellExecute" exported by shell32.dll. Basically you pick a file and what you want to do with it (open print etc) and it goes and looks up how to do it from the registry, starts the appropriate application and tells the application to perform the action. These actions are what you see as the first options in the right click context menu for the file that you want to perform the action on. Knowing this I did a search for on Google and found this script by Brad Fitzpatrick (the livejournal guy). I then modified it and tested it on my computer and it works.
You might have to install Win32::API but I had no trouble doing this with the ppm in the latest 5.8 perl from Activestate. Let me know if you have problems.
In Section
Seekers of Perl Wisdom
|
|