Scripting Aspect for HotKey

I use a VB Script to set a HotKey. Now I would like to enter this script in the scripting aspect , so I would have this action as a verb.


Someone can help?




Set WshShell = WScript.CreateObject("WScript.Shell")


WshShell.SendKeys "{F9}"



Add New Comment


lukas_b   

asked 7 days ago



Answers

0

Use Simple Scripting Aspect. Enter the code enclosed in Sub - End Sub into the first Tab of aspect and apply. Enable verb over that Sub at the second tab.

I am curious if WshShell.SendKeys is able to send a keystroke to 800xA HotKey? Please update me if it works.

kamil.herman   

answered 6 days ago


 


Add New Comment


0

Please also add set WshShell = nothing to your code you don't want to create memory leaks.

WvanWees   

answered 6 days ago


 


Add New Comment


0

This is now my code. I try to open the help by a "verb Button" by sending F1. But it's not working. Some idea?

sub OpenHelp()

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.SendKeys"{F1}"

WshShell = nothing

end sub

lukas_b   

answered 1 days ago


 


By kamil.herman on 5/22/2018 | Like (0) | Report

And how about to launch your Help application by code like following example ?
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("c:\Program Files\Mozilla Firefox\firefox.exe")
Set objShell = Nothing


By lukas_b on 5/22/2018 | Like (0) | Report

I acually want to send F9 for another application. F1 for help ist just an example


By kamil.herman on 5/22/2018 | Like (0) | Report

After some googling and reading it looks SendKeys is blocked in Win7 and in Win10. In Win8.1 still works they say.


Add New Comment



Get weekly AKS updates


Partner Exclusive Webinars

 

> – Login to the partner portal to register



Points Redemption Program - Redeem your points for ABB training, Bluetooth speakers and mugs. Terms and conditions >


Earn points when you refer a friend
AKS Referral Program is "Live" - Learn more



AKS Experts


avatar
Ask Rob Lyon   

Rank: 2

info@lymac.co.nz I'm an independent DCS software and commissioning engineer with extensive experience in 800xA and other ABB products. I've worked in almost every corner of the world and still haven't seen it all.


avatar
Ask Flavio Mussolin   

Rank: 4

ABB AVP, Senior Electronic and Automation Engineer with over 30 years of experience in the field of process automation automotive, pharmaceutical, hollow glass, steel and rolling.


avatar
Ask Govindaraj   

Rank: 10

Working in ABB India Operation Center. Have Project engineering and commissioning experience in ABB 800xA, Freelance, AC500.


avatar
Ask Harsha.D   

Rank: 7

Tech.Support,software and commisioning engineer with Proficient knowledge in 800xA and its products, RNRP,Networking in general.


avatar
Ask MMM   

Rank: 5

ABB PA CT Technical Support


avatar
Ask Stefan Stromqvist   

Rank: 1

I joined ABB in the year of 1994 and has since 1999 been working as a Service & Support Engineer at BU Control Technologies in Västerås, Sweden. My areas of expertise are: 800xA Base, 800xA for Advant Master, Information Management, operating systems, RNRP and Ethernet comms/networking in general.


avatar
Ask Ronny Lindström   

Rank: 17

ABB Service Engineer


avatar
Ask nikismith   

Rank: 257

I have been a part of the Recording & Control Factory team for 17 years in total, having spent a number of years as a repairs technician withi the manufacturing department, but being in my current role for 9 years now.


avatar
Ask Sumit Gargav   

Rank: 3

I have worked with Freelance in majority, with 800xA FD and Melody system partly. Also had opportunity to work with Protocols - HART,Profibus,FF & Modbus.


avatar
Ask kstoilov   

Rank: 9

Control System Engineer: 800xA, Compact 800, AC500, AC31-50, Advant Master, Simatic, AC&DC Drives 11 years worked for ABB - Control Systems


avatar
Ask WvanWees   

Rank: 6

I'm a senior service engineer working for ABB in The Netherlands.


avatar
Ask Dieter Henkel   

Rank: 19