I'm at a loss as to how I set the focus to Foxit PDF Reader.
I have it set as my default printer.
My script initiate a print job
[code]Let>IGNORESPACES=0
Let>InvNum=450043
Let>lw=0.75
Let>sw=0.30
CapsOn
WaitWindowOpen>Export Manager - [E0SHPG: Shipment Common Info]
SetFocus>Export Manager - [E0SHPG: Shipment Common Info]
Wait>lw
MouseMove>480,745
LClick
Wait>sw
//Send space to uncheck Print Preview checkbox
Send>
Press Tab
//Send space to select form checkbox
Send>
Press Tab
Wait>lw
Press Enter
Wait>lw
WaitWindowOpen>Print to PDF Document - Foxit Reader PDF Printer
SetFocus>Print to PDF Document - Foxit Reader PDF Printer
Wait>.50
//Tab to file name dialog box
Press Tab *5
Send>%InvNum%
Wait>.50
//View PDF
Press Enter
// Foxit Reader is open at this point but unable to get focus
// I have the same problem with Adobe Reader version 10.0
Wait>sw
Press Ctrl
Send>P
Release Ctrl
Press Enter
[/code]
Once again I have added my code in between a code block. And still not formatting correctly when i Preview or Submit my post
Please someone tell what I'm doing wrong!
Unable to Getfocus of Foxit Reader
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Unable to Getfocus of Foxit Reader
Thank you in advance for all your help
Gil
Gil
Re: Unable to Getfocus of Foxit Reader
Hi Gchichester,
What cause you to believe you're getting the focus of Foxit Reader?
Besides, the GetFocus command doesn't exist in MS.
What cause you to believe you're getting the focus of Foxit Reader?
Besides, the GetFocus command doesn't exist in MS.
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Re: Unable to get focus of Foxit Reader
Sorry, I use the wrong term in the subject. I meant "Unable to get focus of Foxit Reader"
But If you noticed I do use "SetFocus" in my script.
[quote]What cause you to believe you're getting the focus of Foxit Reader?[/quote]
After I send %InvNum% and save, Foxit Reader opens displaying the document I need to print but the following commands do nothing. If I manually press Ctrl P the print dialog opens
Press Ctrl
Send>P
Release Ctrl
Press Enter
But If you noticed I do use "SetFocus" in my script.
[quote]What cause you to believe you're getting the focus of Foxit Reader?[/quote]
After I send %InvNum% and save, Foxit Reader opens displaying the document I need to print but the following commands do nothing. If I manually press Ctrl P the print dialog opens
Press Ctrl
Send>P
Release Ctrl
Press Enter
Thank you in advance for all your help
Gil
Gil
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Unable to Getfocus of Foxit Reader
Doesn't sound like focus is the issue. You'd get an error if it couldn't find the window.
You may be trying to send it CTRL+SHIFT+p because you've specified upper case "P". Try this instead:
Press Ctrl
Send>p
Release Ctrl
Maybe add a few tiny waits before that Press Enter too:
Press Ctrl
Send>p
Release Ctrl
Wait>0.5
Press Enter
You may be trying to send it CTRL+SHIFT+p because you've specified upper case "P". Try this instead:
Press Ctrl
Send>p
Release Ctrl
Maybe add a few tiny waits before that Press Enter too:
Press Ctrl
Send>p
Release Ctrl
Wait>0.5
Press Enter
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Re: Unable to Getfocus of Foxit Reader
Marcus,
As you suggested I change to lowercase p
Also changed Ctrl to LCtrl
Works as needed.
It's strange that If I use uppercase P manually the Print Dialog opens ok
But only lowercase works in the script.
Thanks for your insite.
As you suggested I change to lowercase p
Also changed Ctrl to LCtrl
Works as needed.
It's strange that If I use uppercase P manually the Print Dialog opens ok
But only lowercase works in the script.
Thanks for your insite.
Thank you in advance for all your help
Gil
Gil
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Unable to Getfocus of Foxit Reader
Do you really use upper case P manually? Are you hitting caps lock and then ctrl+p or holding ctrl+shift+p?
Anyway, I always recommend specifying LOWERCASE letters for shortcut keys because you want the KEY not the CHARACTER.
Anyway, I always recommend specifying LOWERCASE letters for shortcut keys because you want the KEY not the CHARACTER.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Re: Unable to Getfocus of Foxit Reader
I did it manually as a test to see if it would open the Print Dialog.
For the test I had the Caps Lock on.
To tell the truth I didn't notice that the P was uppercase until you pointed it out
In the future if short cuts are not work that the first thing I'll check
For the test I had the Caps Lock on.
To tell the truth I didn't notice that the P was uppercase until you pointed it out
In the future if short cuts are not work that the first thing I'll check
Thank you in advance for all your help
Gil
Gil