Untitled
unknown
plain_text
a year ago
572 B
22
Indexable
while ($true) {
# Send the "Next Track" media key to Spotify
Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public class MediaControl {
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, IntPtr dwExtraInfo);
}
"@
[MediaControl]::keybd_event(0xB0, 0, 0, [IntPtr]::Zero) # 0xB0 is the virtual key code for "Next Track"
# Wait for 30 seconds
Start-Sleep -Seconds 30
}
Editor is loading...
Leave a Comment