Nice of you to share this Jim. Never ceases to impress me what one can
do with Paradox! Regards Paul.
On Feb 21, 12:19=A0pm, "Jim Moseley" <jm...@[EMAIL PROTECTED]
> wrote:
> Greetings, all.
>
> I just ran across a problem that took me a while to solve, and thought
I'd=
> share it. =A0
>
> We needed to automate a PDF printer. =A0Using SendKeys() almost worked.
=
=A0Unfortunately,
> the developer was tricky and put in a variable number of fields, so we
cou=
ldn't
> just tab a certain number of times. =A0
>
> I noticed that only 1 field was enterable & contained text - all the
other=
s
> were buttons or checkboxes. =A0So, using cut/paste, I was able to tell
whe=
n
> I was on the correct field to type in my file name.
>
> HTH,
> Jim Moseley
>
> ;---------
>
> var tempStr, pdfPrefixCur string endVar
>
> tempStr =3D ""
> if not tempStr.writeToClipBoard() then =A0 ; clear the clipboard
> =A0 =A0errorShow("Write blank to Clipboard")
> =A0 =A0return
> endif
> loopI =3D 0
> while true
> =A0 =A0sendkeys("{delay 50}{tab}^{insert}",true) =A0; tab & copy
(ctrl-ins=
ert)
> =A0 =A0if not tempStr.readFromClipboard() then
> =A0 =A0 =A0 errorShow("Read value from Clipboard")
> =A0 =A0 =A0 return
> =A0 =A0endif
> =A0 =A0if tempStr <> "" then =A0 ; something returned - success!
> =A0 =A0 =A0 quitloop
> =A0 =A0endif
> =A0 =A0loopI =3D loopI + 1
> =A0 =A0if loopI > 100 then
> =A0 =A0 =A0 quitloop
> =A0 =A0endif
> endWhile
> if loopI > 100 then
> =A0 =A0return
> endif
> if not pdfPrefixCur.writeToClipboard() then
> =A0 =A0errorShow("Write value to clipboard")
> endif
> sendkeys("{delay 100}+{insert}{enter}",true) =A0; paste (****ft-insert)
> sleep(3000) =A0; let it do its thing
>
> ;-----


|