Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read a text files contents as a variable
#2
So the goal for this was to be able to automate Adobe Acrobat to go to a specific page. We have a help/notes reference in our office we are creating. Funny enough a program like Acrobat does not have a way to do this via a command line. To be clear, it has a way to launch a specific instance and go to a page number. However, once the document is already opened, it cannot navigate pages via the command line. Not a problem... because Quick Macros to the rescue. That is what I love about Quick Macros, that being it always has answers where other programs fall short. Our page number is written to a local text file via our help/notes reference (which is a FileMaker Database Solution). So the Quick Macros macro takes it from there. I am sharing hoping other users can take advantage of it. I also hope that more knowledgeable users than myself will suggest better ways to write this macro if any. Thanks
Code:
Copy      Help
str s1 f
f="C:\fmUtil\pdfPage.txt"
s1.getfile(f)
out s1

int w1=win("C-- in One Hour a Day, Sams Teach Yourself, 8th Edition.pdf - Adobe Acrobat Pro DC" "AcrobatSDIWindow")


if (!w1)

,run "D:\Tutor\Training\C Programming\C++\Sams\C-- in One Hour a Day, Sams Teach Yourself, 8th Edition.pdf"
,int w3=wait(19 win("C-- in One Hour a Day, Sams Teach Yourself, 8th Edition.pdf - Adobe Acrobat Pro DC" "AcrobatSDIWindow"))
,'CSn            ;; Ctrl+Shift+N
,int w4=wait(19 win("Go To Page" "#32770"))

,'F"{s1}" Y        ;; Enter
,
else
,
,act w1
,
,'CSn            ;; Ctrl+Shift+N
,int w2=wait(19 win("Go To Page" "#32770"))

,'F"{s1}" Y        ;; Enter


Messages In This Thread
RE: Read a text files contents as a variable - by pctechtv - 04-06-2019, 09:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)