Send keys to Adobe Acrobat

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Novice25
Posts: 1
Joined: 21 Jan 2017, 16:44

Send keys to Adobe Acrobat

21 Jan 2017, 18:43

I just downloaded ahk. I'm a complete non-tech novice, and I would just like to do one simple thing with ahk. I would like to use the F6 key to open Adobe Acrobat, which I have succeeded in writing the code for (see below). Then I would like the following keystrokes to automatically occur: Alt-f | r | s | s | That's it! (That would bring me directly to "Custom Scan.”) Do I need a pause after the opening of Acrobat?

Can anyone email me the proper syntax to do this? Thanks!

Novice25
email address is kcm25@aol.com

Here’s what I have so far (which successfully opens Acrobat):

F6::
Run Acrobat
return
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Send keys to Adobe Acrobat

22 Jan 2017, 07:11

Code: Select all

F6::
	Run, Acrobat
	WinWaitActive, Acrobat
	SetKeyDelay,50,50
	Send,{Alt down}{f down}{Alt up}rss
return
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: Send keys to Adobe Acrobat

23 Jan 2017, 22:09

#NoEnv
SendMode Input
run, acrobat
sleep, 1000
send, !f
sleep, 20
send, r
sleep, 20
send, s
sleep, 20
send, s
Return

The code suggested above didn't work for me.
This, however, ran very quickly to the custom scan.
I'm an utter novice at this, but it seems Acrobat needs a full second to get ready for any more input.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: Send keys to Adobe Acrobat

23 Jan 2017, 22:19

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
If !WinExist("Acrobat")
{
Run Acrobat
}
else
{
WinActivate Acrobat
}
sleep, 1000
send, !f
sleep, 20
send, r
sleep, 20
send, s
sleep, 20
send, s
Return

;This appears to work whether Acrobat is already started or not.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Send keys to Adobe Acrobat

23 Jan 2017, 23:14

I see I missed {f up}. Anyway, good that you solved it, and nice of you to report your solution :thumbup:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Marium0505, mcl and 357 guests