Virtual key press, possible?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 586
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Virtual key press, possible?

Post by Grovkillen » Thu Dec 17, 2020 11:18 am

Is it possible to "press" virtual keys? I would like to press the "VK_MEDIA_PLAY_PAUSE" as an example.

This will not work since it need to have an object handle.

Code: Select all

ObjectSendKeys>0,VK_MEDIA_PLAY_PAUSE
Let>ME=%Script%

Running: 15.0.18
version history

User avatar
JRL
Automation Wizard
Posts: 3383
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Virtual key press, possible?

Post by JRL » Thu Dec 17, 2020 4:32 pm

From: https://help.mjtnet.com/article/262-virtual-key-codes
VK_MEDIA_PLAY_PAUSE (179): Windows 2000/XP: Play/Pause Media key
This works for me on youtube

Send>VK179

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts