send keys problem/ Pdx 8

send keys problem/ Pdx 8

Post by Hila » Thu, 26 Jun 2003 01:18:04



I have a push button on a form that creates a query and calls a report
that needs to print to a label printer. I need to modify the Printer
Properties to change paper size and orientation. I have found that
sendkeys is the only way to effectively to do this.  When I run the
form and push the button the code stops when I call:
rHandle.menuaction(MenuFilePrint)
Any code after that does not execute until I close the Print Menu. How
can I send sendkeys() to the Print Menu?

Any help would GREATLY be appreciated.

if NOT rHandle.open(strReportName) then
msgStop("Error opening " + strReportName, "Please make sure the report
exists and try again.")
endIf
else msgstop ("No Data" , "There are no labels to print for account.")
endif

rHandle.menuaction(MenuFilePrint)
sendkeys ("{tab}")
sendkeys ("{tab}")
sendkeys ("{tab}")
sendkeys ("{tab}")
sendkeys ("{tab}")
sendkeys ("{tab}")
sendkeys ("%(O)")      ;Go to Properties
sendkeys ("%(D)")      ;Change to Default paper size
sendkeys ("%(L)")      ;Change to Landscape orientation
sendkeys ("%(A)")      ;Apply

 
 
 

send keys problem/ Pdx 8

Post by Liz » Thu, 26 Jun 2003 02:22:58


You have to put all those commands in one sendKeys() line and set the
logical flag to False (I think, if it doesn't work, try True) (see
ObjectPAL help for the full syntax) and put the sendKeys() line
_before_ the line which opens the print dialog.

Liz


> I have a push button on a form that creates a query and calls a report
> that needs to print to a label printer. I need to modify the Printer
> Properties to change paper size and orientation. I have found that
> sendkeys is the only way to effectively to do this.  When I run the
> form and push the button the code stops when I call:
> rHandle.menuaction(MenuFilePrint)
> Any code after that does not execute until I close the Print Menu. How
> can I send sendkeys() to the Print Menu?

> Any help would GREATLY be appreciated.

> if NOT rHandle.open(strReportName) then
> msgStop("Error opening " + strReportName, "Please make sure the report
> exists and try again.")
> endIf
> else msgstop ("No Data" , "There are no labels to print for account.")
> endif

> rHandle.menuaction(MenuFilePrint)
> sendkeys ("{tab}")
> sendkeys ("{tab}")
> sendkeys ("{tab}")
> sendkeys ("{tab}")
> sendkeys ("{tab}")
> sendkeys ("{tab}")
> sendkeys ("%(O)")      ;Go to Properties
> sendkeys ("%(D)")      ;Change to Default paper size
> sendkeys ("%(L)")      ;Change to Landscape orientation
> sendkeys ("%(A)")      ;Apply


 
 
 

send keys problem/ Pdx 8

Post by Hila » Thu, 26 Jun 2003 21:23:47


Thanks Liz, I have it working now.  

Just a note  for anyone else who needs to do this. At least in my case
with Pdx8 and Win 98, I could not start the send keys with {tab}
because for some reason it changes it from printing "Full File" to
printing "Page Range" 1 to 1.  This is the only way I got it to go to
properties screen and keep "Full File" toggled on.

sendkeys ("%(n),{tab},{tab},%(o),%(d),%(l),{tab},{tab},{tab},{tab},{tab},{tab},{enter}",false)
rHandle.menuaction(MenuFilePrint)

Hilary

 
 
 

1. Agonizing over Pdx 8 over 7, and a significant Pdx 8 problem (HELP)

My organization's IS department is busy installing the new Corel Suite 8 which
includes Paradox 8, so I saw it as inevitable that the work I was doing would
have to migrate to version 8.  When I saw Service Pack 1 come out, I thought,
finally, some maturity to the version is at hand, now that a major bug-fix has
come out.  As I evaluated the product, I ran into this problem, which if
unsolvable, will cause me to go thumbs-down on version 8, and maybe go to a
competing product altogether (much as I really like Paradox and oPAL).

The problem:
In my form, assume a box object contains an edit field.  I want to attach a
keyChar method to the box, and a keyChar with a passEvent in the edit field.  
The problem is the project viewer in 8.  If I add a keyChar method and give it
the proper method header of "method keyChar(var EventInfo KeyEvent)" -- when I
save it, it is not visible in the object explorer for retrieval. Instead, I
have to press <new event>, type in keyChar, and then the code I saved comes up,
but in the code window, it shows in the second mthod pulldown, "action" as
though there was no entry for my custom built-in method, but rather that the
code sorter, simply came up with action as the first item in the list.  The
problem is compounded by if the uiobject in fact has an action method already
attached to it.   In that case a click in the method pulldown in the code
window, causes the keychar method code to disappear, and the previously coded
action method to appear.  To bring the keychar code back, I have to go back to
<new method> and type "keychar" again to bring up my saved keychar code.

I hope this is a documented solvable problem.  If not, it freezes my paradox 8
development efforts in their tracks.  With the forms complexity I'm dealing
with, if I can't depend on the smooth and problem-free operation of the object
explorer and code window, then back to version 7, and that for me would
eventually spell the deathknell of Paradox, as other products gain market-share
and robustness.


George Alexeief
Los Angeles

2. CFP: Euro-Par'97 Workshop/Track on Parallel Symbolic Computation

3. Is it possible to use DLL to send message to pdx (PWIN4.5)

4. Increased posting by Microsoft employees

5. PDX 4.5 Dos - Delete Key

6. Rownum

7. Can't make an MDE file....I get name conflicts???

8. PDX 5-16 and PDX 7-32 Coexistence

9. Pdx 7 Vs Pdx 8

10. ODBC-Pdx-ODBC-Pdx

11. Foreign Key use and Trapping Error message to send to client

12. How 2 send [F2] key to an MS-DOS Window