Hi. Might anyone know why the code I have below stops short, after executing the program Hpqdirec.exe? It does nothing else, unless I click the launch button a second time, and then it doesn't execute all of my sendkey commands. I've just begun learning about vbs & sendkeys so I'm not sure what the problems is. Thanks in advance for any help.
cold25
Private Sub cmdLaunchHP_Click()
Call shell("C:\Program Files\Hewlett-Packard\Digital Imaging\bin\Hpqdirec.exe")
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "HP Director"
WshShell.SendKeys "%{h}"
WshShell.SendKeys "~"
WshShell.AppActivate "hp photo & imaging help"
WshShell.SendKeys "%{n}"
WshShell.SendKeys "{DOWN 50}"
WshShell.SendKeys "~"
WshShell.SendKeys "Typed something."
End Sub
cold25
Private Sub cmdLaunchHP_Click()
Call shell("C:\Program Files\Hewlett-Packard\Digital Imaging\bin\Hpqdirec.exe")
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "HP Director"
WshShell.SendKeys "%{h}"
WshShell.SendKeys "~"
WshShell.AppActivate "hp photo & imaging help"
WshShell.SendKeys "%{n}"
WshShell.SendKeys "{DOWN 50}"
WshShell.SendKeys "~"
WshShell.SendKeys "Typed something."
End Sub