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
Send keys to Adobe Acrobat
Re: Send keys to Adobe Acrobat
Code: Select all
F6::
Run, Acrobat
WinWaitActive, Acrobat
SetKeyDelay,50,50
Send,{Alt down}{f down}{Alt up}rss
return
Re: Send keys to Adobe Acrobat
#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.
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.
Re: Send keys to Adobe Acrobat
#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.
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.
Re: Send keys to Adobe Acrobat
I see I missed {f up}. Anyway, good that you solved it, and nice of you to report your solution ![Thumbup :thumbup:](./images/smilies/icon_thumbup.gif)
![Thumbup :thumbup:](./images/smilies/icon_thumbup.gif)
Who is online
Users browsing this forum: Marium0505, mcl and 357 guests