How to send ^p (Ctrl-P) to Foxit PhantomPDF? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
MortenZdk
Posts: 9
Joined: 25 Aug 2018, 06:02

How to send ^p (Ctrl-P) to Foxit PhantomPDF?

09 Sep 2018, 01:08

The Foxit PhantomPDF is a PDF reader and editor.

I would like to make a shortcut for print, thus send ^p (Ctrl-P) to the program, and for this I made the AHK code:

Code: Select all

^!+T::Send ^p
and also tried:

Code: Select all

^!+T::Send {Ctrl Down}p{Ctrl Up}
However, in both cases the PhantomPDF often operates as if sending !p (Alt-P), but some few cases it correctly operates as if sending ^p (Ctrl-P).

Is there some suggestions for how to consistently send ^p (Ctrl-P) to the program?
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: How to send ^p (Ctrl-P) to Foxit PhantomPDF?  Topic is solved

09 Sep 2018, 01:48

- Perhaps this:

Code: Select all

^!+t::Send {Alt Up}{Ctrl Down}p{Ctrl Up}
- Btw 'T' in hotkeys implies 'shift+t'.

- A screenshot suggests that Foxit PhantomPDF uses a ribbon, perhaps ribbon items can be invoked directly, although I haven't seen any threads on the forum re. this.
- Acc using accDoDefaultAction might work to invoke a button.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
MortenZdk
Posts: 9
Joined: 25 Aug 2018, 06:02

Re: How to send ^p (Ctrl-P) to Foxit PhantomPDF?

09 Sep 2018, 04:44

Thanks for the comments, which made me change the keystroke to access the print dialogue through the ribbon instead, using "{Alt Down}fp{Alt Up}", whereby I got around the problem with non working ^p.
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: How to send ^p (Ctrl-P) to Foxit PhantomPDF?

09 Sep 2018, 06:12

Btw. For standard context menus (whether the menu bar is standard or not), you can often use PostMessage and WM_COMMAND.
Get Info from Context Menu (x64/x32 compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31971
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
MortenZdk
Posts: 9
Joined: 25 Aug 2018, 06:02

Re: How to send ^p (Ctrl-P) to Foxit PhantomPDF?

09 Sep 2018, 08:56

Thanks, I have not used PostMessage before, but look like an alternative is sending bare key strokes is not possible or does not work.

Return to “Ask For Help”

Who is online

Users browsing this forum: asad41163, boiler, Google [Bot] and 203 guests