I have several adobe fill-in forms that I use in my practice, often with info that comes from another program. Using Win32::GUITest::SendKeys, I have scripts that fill in the data for me. It doesn't take very long to set up, just tab through a document and write descriptive names. Other scripts export the data to a .pl file that is just a bunch of Scalar assignments.
ie: $DueDate = 'January 31, 2002;
Code looks like this, (CA Sales Tax Form):
use win32::GuiTest; $MyPhone = "xxx-xxx-xxxx"; do "STData.dat"; if ( $Client eq " TEST " ) # fill in company specific data { do "TEST.dat"; } system("start \"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe +\" Current_Sales_Tax"); sleep 10; Tab(); Send("$DueDate"); Tab(); Send("$Period"); Tab(); Send("$Year"); Tab(); Send("$PermitNum"); Tab(); Send("$Name"); Tab(); Send("$Street"); Tab(); Send("$City"); Tab(); Send("$State"); Tab(); Send("$Zip"); Tab(); Send("$GrossSales"); Tab(2); Send("$GrossSales"); Tab(); Send("$Resale"); Tab(); Send("$Food"); Tab(); Send("$Labor"); Tab(); Send("$SalesToGov"); Tab(10); Send("$TotalNonTaxable"); Tab(); Send("$SubjectToST"); Tab(2); Send("$StateTax"); Tab(); Send("$SubjectToST"); Tab(); Send("$CountyTax"); Tab(2); Send("$SubjectToST"); Tab(); Send("$LocalTax"); Tab(); Send("$DistrictTax"); Tab(); Send("$TotalST"); Tab(2); Send("$TotalST"); Tab(); Send("$PmtOne"); Tab(); Send("$PmtTwo"); Tab(); Send("$TotalPmt"); Tab(); Send("$RemaningTax"); Tab(3); Send("$RemaningTax"); Tab(2); Send("$CoPhone"); Tab(3); Send("$MyPhone"); Tab(3); Send("$SubjectToST"); Tab(2); Send("$SubjectToST"); Tab(); Send("$PermitNum"); Tab(); Send("$Period $Year"); #------------------------- Subroutines ------------------------- sub Send { Win32::GuiTest::SendKeys("$_[0]"); } sub Tab { #USAGE: Tab() or Tab(3) or any other number if ($_[0]) { Win32::GuiTest::SendKeys("{TAB $_[0]}"); } else { Win32::GuiTest::SendKeys("{TAB}"); } }
Any suggestions?

In reply to Ghost fill in adobe forms by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.