 |
|
 |
|
Next: paradox and php via odbc
|
| Author |
Message |
External

Since: Aug 28, 2006 Posts: 88
|
(Msg. 1) Posted: Wed Feb 20, 2008 9:19 pm
Post subject: Tricky Sendkeys() problem Archived from groups: comp>databases>paradox (more info?)
|
|
|
Greetings, all.
I just ran across a problem that took me a while to solve, and thought I'd
share it.
We needed to automate a PDF printer. Using SendKeys() almost worked. Unfortunately,
the developer was tricky and put in a variable number of fields, so we couldn't
just tab a certain number of times.
I noticed that only 1 field was enterable & contained text - all the others
were buttons or checkboxes. So, using cut/paste, I was able to tell when
I was on the correct field to type in my file name.
HTH,
Jim Moseley
;---------
var tempStr, pdfPrefixCur string endVar
tempStr = ""
if not tempStr.writeToClipBoard() then ; clear the clipboard
errorShow("Write blank to Clipboard")
return
endif
loopI = 0
while true
sendkeys("{delay 50}{tab}^{insert}",true) ; tab & copy (ctrl-insert)
if not tempStr.readFromClipboard() then
errorShow("Read value from Clipboard")
return
endif
if tempStr <> "" then ; something returned - success!
quitloop
endif
loopI = loopI + 1
if loopI > 100 then
quitloop
endif
endWhile
if loopI > 100 then
return
endif
if not pdfPrefixCur.writeToClipboard() then
errorShow("Write value to clipboard")
endif
sendkeys("{delay 100}+{insert}{enter}",true) ; paste (shift-insert)
sleep(3000) ; let it do its thing
;----- >> Stay informed about: Tricky Sendkeys() problem |
|
| Back to top |
|
 |  |
External

Since: May 22, 2007 Posts: 9
|
(Msg. 2) Posted: Tue Feb 26, 2008 3:03 pm
Post subject: Re: Tricky Sendkeys() problem [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
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 pm, "Jim Moseley" wrote:
> Greetings, all.
>
> I just ran across a problem that took me a while to solve, and thought I'd
> share it.
>
> We needed to automate a PDF printer. Using SendKeys() almost worked. Unfortunately,
> the developer was tricky and put in a variable number of fields, so we couldn't
> just tab a certain number of times.
>
> I noticed that only 1 field was enterable & contained text - all the others
> were buttons or checkboxes. So, using cut/paste, I was able to tell when
> I was on the correct field to type in my file name.
>
> HTH,
> Jim Moseley
>
> ;---------
>
> var tempStr, pdfPrefixCur string endVar
>
> tempStr = ""
> if not tempStr.writeToClipBoard() then ; clear the clipboard
> errorShow("Write blank to Clipboard")
> return
> endif
> loopI = 0
> while true
> sendkeys("{delay 50}{tab}^{insert}",true) ; tab & copy (ctrl-insert)
> if not tempStr.readFromClipboard() then
> errorShow("Read value from Clipboard")
> return
> endif
> if tempStr <> "" then ; something returned - success!
> quitloop
> endif
> loopI = loopI + 1
> if loopI > 100 then
> quitloop
> endif
> endWhile
> if loopI > 100 then
> return
> endif
> if not pdfPrefixCur.writeToClipboard() then
> errorShow("Write value to clipboard")
> endif
> sendkeys("{delay 100}+{insert}{enter}",true) ; paste (shift-insert)
> sleep(3000) ; let it do its thing
>
> ;----- >> Stay informed about: Tricky Sendkeys() problem |
|
| Back to top |
|
 |  |
External

Since: Dec 20, 2007 Posts: 3
|
(Msg. 3) Posted: Tue Feb 26, 2008 8:03 pm
Post subject: Re: Tricky Sendkeys() problem [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Feb 09, 2005 Posts: 26
|
(Msg. 4) Posted: Wed Feb 27, 2008 9:47 am
Post subject: Re: Tricky Sendkeys() problem [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Méta-MCI (MVP) wrote:
> Hi!
>
>> We needed to automate a PDF printer.
>
> Use PDFcreator. This soft is free, priceless, open-source. AND, it can
> be completely automated.
>
> @-salutations
>
> Michel Claveau
>
>
>
>
>
Michel:
I use pdfcreator but have never figured out how to automate it. Any
hints...?
--
Mark B >> Stay informed about: Tricky Sendkeys() problem |
|
| Back to top |
|
 |  |
External

Since: Jan 11, 2008 Posts: 6
|
(Msg. 5) Posted: Thu Feb 28, 2008 10:57 am
Post subject: Re: Tricky Sendkeys() problem [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I tried to and gave up. You have to use the registry, and that's a "no
no" as far as I'm concerned and also under Vista. Pdf995 is much easier
to automate. What's $10 between friends?
Tom K
Mark Bannister wrote:
> Michel:
> I use pdfcreator but have never figured out how to automate it. Any
> hints...?
> >> Stay informed about: Tricky Sendkeys() problem |
|
| Back to top |
|
 |  |
External

Since: May 22, 2007 Posts: 9
|
(Msg. 6) Posted: Sun Mar 02, 2008 4:21 pm
Post subject: Re: Tricky Sendkeys() problem [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I used to use pdf995 at work until IT put more restrictions on the
security side of our PCs... and it stopped working. They did however
supply Creator free of charge and I have managed to set it up so it
works the same as 995. Under Printer / Options set to use Auto Save on
and specify how identify saved file (name, type etc) and also the
path. Then in Paradox simply print to Creator as before with 995.
Happy again. Regards Paul. >> Stay informed about: Tricky Sendkeys() problem |
|
| Back to top |
|
 |  |
| Related Topics: | A Paradoxical SQL Problem - I'm trying to solve this in an old Paradox database. Any suggestions (other than "don't use Paradox") would be appreciated: I have two tables USER_SKILL (USER,SKILL_ID,SKILL_LEVEL) e.g. Fred 10 3 Fred 12 4 Jim 11 4 SKILLS (SKILL_ID,SKILL_NA...
Odd BDE init problem...? - Howdy, I had to re-install Windows, and then, of course, Paradox. I set up the NETDIR in the BDE Config, and hoped to be all set. Now, however, I am getting the error: "Could not initialize the BDE... must set the location of the NET Control Fil...
Problem SQL Server - Hi, I have change my OS. I was under NT and now I use XP with Paradox 9 and SQL server 2000. My Problem is that It's impossible to open a Sqlserver Table . I select The SQL Alias, but it stay on the Alias work. I'am using forms who use sql tables and no...
Memo problem - We have a memo problem. At work we use P11 in a network with 3 PC's. 1 of them with XP-SP2 and P11 (and P11runtime), the other 2 are W98 PC's with Paradox runtime11. BDE 5.1, LocalShare set TRUE, also followed the "EnableOplocks set to 0...." ...
Unlocking problem... - Howdy, Originally, I had code on a form to enter today() in a field called ModDate when something in the underlying tables was modified using the form. That code looked like this, and worked fine: ;// This code executes only for the form: if.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|