{"id":324,"date":"2010-08-19T18:00:21","date_gmt":"2010-08-19T18:00:21","guid":{"rendered":"http:\/\/us111.siteground.us\/~tlhouse0\/ptfbpro.com\/automate\/?p=324"},"modified":"2012-06-13T21:55:47","modified_gmt":"2012-06-13T21:55:47","slug":"how-to-mute-the-sound-in-windows-by-hotkey","status":"publish","type":"post","link":"https:\/\/ptfbpro.com\/automate\/how-to-mute-the-sound-in-windows-by-hotkey\/","title":{"rendered":"How to mute the sound in Windows by hotkey"},"content":{"rendered":"<p>Many modern keyboards have a special key for muting\/unmuting the sound in Windows, but if yours doesn&#8217;t, you can create the next best thing with a PTFB Pro macro and a couple of lines of script. Here&#8217;s how to go about it.<\/p>\n<p><em>Stage 1 &#8211; create mute\/unmute script<\/em><\/p>\n<p>The first stage is to create a little &#8220;.vbs&#8221; script that will toggle the sound on\/off. Just open up Notepad (or your favorite text editor) and paste in the following two lines of text:<\/p>\n<p><code> Set oShell = CreateObject(\"WScript.Shell\")<\/code><br \/>\n<code> oShell.SendKeys(chr(&amp;hAD))<\/code><\/p>\n<p>Save the file somewhere convenient, with the .vbs extension. For example, I called mine &#8220;Mute.vbs&#8221; and popped it in my documents folder. Double-click it a couple of times just to make sure it works and you haven&#8217;t made a typo anywhere.<\/p>\n<p><em>Stage 2 &#8211; create PTFB Pro macro and bind to hotkey<\/em><\/p>\n<p>OK, now we&#8217;ve got our script, we&#8217;re going to create a PTFB Pro macro to run it, and bind that macro to a hotkey.<\/p>\n<ol>\n<li>Create a new screen based macro and stop recording immediately by hitting the Pause\/Break key.<\/li>\n<li>Open the new macro for editing. On the General page, give it a meaningful name (e.g. &#8220;Mute&#8221;).<\/li>\n<li>Switch to the Triggers page and turn off &#8220;Trigger spontaneously&#8221;. Now tick &#8220;Hotkey&#8221; and choose a memorable hotkey combination for the mute function. CTRL + SHIFT + M sounded good to me.<\/li>\n<li>Switch to the Editing page. Clear out any existing recorded actions and add just a single &#8220;Run Executable&#8221; item. For the command line, type in &#8220;cscript&#8221; followed by a space, followed by the full path to the vbs file you created earlier. If the path contgains spaces, remember to surround it with double quotes.<\/li>\n<\/ol>\n<p style=\"text-align: center;\"><a title=\"MuteCmdLine by GammyKnee, on Flickr\" href=\"http:\/\/www.flickr.com\/photos\/27172079@N08\/4907542351\/\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm5.static.flickr.com\/4114\/4907542351_bdbf6f12c2.jpg\" alt=\"MuteCmdLine\" width=\"500\" height=\"262\" \/><\/a><\/p>\n<p>That&#8217;s it. Your chosen hotkey will now execute the vbs file, toggling Windows audio between its muted and unmuted states.<\/p>\n<p><a href=\"http:\/\/www.ptfbpro.com\/\" target=\"_blank\">Find out more about boosting your productivity with autoclicks and macros.<\/a><br \/>\n<em><a href=\"http:\/\/www.ptfbpro.com\/download.shtml\" target=\"_blank\">CLICK HERE to download a free 30 day trial, no strings attached<\/a>. If you aren&#8217;t entirely happy simply uninstall!<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many modern keyboards have a special key for muting\/unmuting the sound in Windows, but if yours doesn&#8217;t, you can create the next best thing with a PTFB Pro macro and <a class=\"more-link\" href=\"https:\/\/ptfbpro.com\/automate\/how-to-mute-the-sound-in-windows-by-hotkey\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-automation-power-users"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/posts\/324"}],"collection":[{"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":0,"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"wp:attachment":[{"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ptfbpro.com\/automate\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}