pdf access

Discuss and share scripts and script files...
Post Reply
graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

pdf access

Post by graham »

Edited - the wrong copy was used :oops: , should work now?

Here is a small script to give quick access to user selected items

Code: Select all

// XYplorer PDF Help quick load - v1
// see notes below for info:

//------------search items ---------
//   add or delete entries as required, each entry has 3 lines


"Command Line Switches"
   global $page; $page = 39;
   sub "_find";

"Configuration"
   global $page; $page = 41;
   sub "_find";

"Folder View Settings"
   global $page; $page =146;
   sub "_find";

"Keyboard Shortcuts & Mouse Tricks"
 global $page; $page = 31;
   sub "_find";

"Move/Copy/Backup To"
   global $page; $page =65;
   sub "_find";

"Rename Special"
   global $page; $page =61;
   sub "_find";

"Scripting"
   global $page; $page =157;
   sub "_find";

"Scripting Commands"
   global $page; $page = 169;
   sub "_find";

"Settings"
   global $page; $page =68;
   sub "_find";

//----------code---------

"_find"
   goto <xypath>;
   $error= readfile("xyhelppdfpaths.txt",t);
   $test =$error>0? "ok":"-(Setup paths)  enter locations";
   sub "_"."$test";


"_ok"
   goto <xypath>;
   $paths=readfile("xyhelppdfpaths.txt",t);
   strpos $pos,$paths,"#";
   substr $adobe, $paths,0,$pos;  
   strlen $len, $paths;
   substr $xyhelp, $paths,$pos+1,$len; 
   global $page;
   $param = /A "page=$page=openactions";
   $command = """$adobe""".$param."""$xyhelp""";
   open $command;


"_-(Setup paths)  enter locations"
   msg "The paths for Adobe Reader and XYplorerHelp.pdf need to be set up (once only)",1;
   input $acrobat, "Enter path for acrobat reader", "c:\program files\adobe\reader 9.0\reader\acrord32.exe"; 
   input $xypdfhelp, "Enter path for XYplorerHelp.pdf", "<xypath>\xyplorerhelp.pdf"; 
   
   writefile("<xypath>\xyhelppdfpaths.txt","$acrobat#$xypdfhelp",o,t);
   load "<xypath>\scripts\pdfhelp.xys";

//Notes

   /*  The script enables quick access to the pdf help file based 
       on a list of favourite lookups.  These can be changed or added to 
       by changing the code.  Each new entry is 3 lines eg:

                              "Configuration"
                                   global $page; $page = 41;
                                   sub "_find";

       The script requires the user enter the paths for Acrobat reader and the XYplorerHelp.pdf
       This needs to be done once only when the script is first run by selecting an
       item - the script will then ask for the paths if not found. The paths are stored in
       a file in <xypath> as xyhelppdfpaths.txt*/

Post Reply