Sign in to follow this  
Followers 0
KenNichols

There must be a better way to write to a PDF

5 posts in this topic

I have searched the forums and can't find anything even close to this. I just need to open a PDF and add text to the fields already in place.

CODE
Func Submit()

GUISetCursor(15)

Opt("SendKeyDelay", 150)

Opt("WinTitleMatchMode", 2);1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

$Total = GUICtrlRead($lblTotal)

$Drivers = GUICtrlRead($lblDrivers)

$Tab = "{TAB}"

$Space = "{SPACE}"

ShellExecute("New Equipment Move.pdf")

WinWaitActive("New Equipment Move.pdf", 5)

If WinActive("New Equipment Move.pdf") Then

; Disable mouse and keyboard

BlockInput(1)

; Sends text

Sleep(200)

Send("{TAB}")

Send("1")

Send("{TAB}")

Send("1")

Send("{TAB}")

Send(@MON & "/" & @MDAY & "/" & @YEAR)

Sleep(100)

Send("{TAB 21}")

If $Drivers < 2 Then

Send($Space)

Else

Send($Tab)

EndIf

Sleep(100)

If $Drivers > 1 Then

Send($Space)

Else

Send($Tab)

EndIf

Send("{TAB 5}")

Send($Total)

; Enable mouse and keyboard

BlockInput(0)

GUISetCursor(2)

EndIf

EndFunc ;==>Submit


[topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner!

Share this post


Link to post
Share on other sites



THANK YOU!

Looks like .xdp is my answer Thanks!

Hey,

I'm a newbie here and am trying to fill in the fields of a PDF and I came across this post. Can you explain how you are accessing the .xdp data so I can wrap my head around it?

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0