Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > Re: Tricky Send...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 1332 of 1428
Post > Topic >>

Re: Tricky Sendkeys() problem

by OzPaul <pfweston@[EMAIL PROTECTED] > Feb 26, 2008 at 03:03 PM

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
>
> ;-----
 




 6 Posts in Topic:
Tricky Sendkeys() problem
"Jim Moseley" &  2008-02-20 21:19:01 
Re: Tricky Sendkeys() problem
OzPaul <pfweston@[EMAI  2008-02-26 15:03:15 
Re: Tricky Sendkeys() problem
"Méta-MCI \(MVP\)&qu  2008-02-27 00:56:33 
Re: Tricky Sendkeys() problem
Mark Bannister <markRe  2008-02-27 09:47:48 
Re: Tricky Sendkeys() problem
Tom Krieg <user@[EMAIL  2008-02-28 10:57:07 
Re: Tricky Sendkeys() problem
OzPaul <pfweston@[EMAI  2008-03-02 16:21:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 22:17:41 CST 2008.