{"id":16369,"date":"2015-08-04T05:01:52","date_gmt":"2015-08-03T19:01:52","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=16369"},"modified":"2015-08-04T06:43:40","modified_gmt":"2015-08-03T20:43:40","slug":"applescript-surfing-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/applescript-surfing-primer-tutorial\/","title":{"rendered":"AppleScript Surfing Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/AppleScriptEditor\/AppleScript_Surfing.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"AppleScript Surfing Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/AppleScriptEditor\/AppleScript_Surfing.jpg\" title=\"AppleScript Surfing Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">AppleScript Surfing Primer Tutorial<\/p><\/div>\n<p>What AutoHotKey is as a recording piece of functionality for Windows is, AppleScript is Mac OS X&#8217;s recording functionality equivalent.<\/p>\n<p>Today we shaped to want to show you the equivalent functionality AutoHotKey achieved surfing the net with Internet Explorer as shown below with <a target=_blank title='AutoHotKey Surfing ASP.Net Primer Tutorial' href='#asapt'>AutoHotKey Surfing ASP.Net Primer Tutorial<\/a> on a Mac (using Mac OS X Mavericks) and using Firefox, and ran into a roadblock that is either that AppleScript is not as featureful as AutoHotKey, or we&#8217;re not up to the AppleScript smarts required.  So we compromised and changed the WordPress blog code&#8217;s header.php to help out, some of the way, to helping via the <b>bold<\/b> changes below &#8230;<\/p>\n<p><code><br \/>\n<b><br \/>\nfunction precc() {<br \/>\n var ourwov=location.search.split('wopenall=')[1] ? location.search.split('wopenall=')[1].split('&')[0] : ' ';<br \/>\n var ows, owstwo, iot;<br \/>\n if (ourwov != ' ') {<br \/>\n  var hones=docgetclass(\"entry-title\", \"h1\");<br \/>\n  if (hones.length &gt; 0) {<br \/>\n   for (iot=0; iot&lt;hones.length; iot++) {<br \/>\n    if (ourwov == \"\" || hones[iot].innerHTML.toLowerCase().indexOf(ourwov.toLowerCase()) != -1) {<br \/>\n      ows=hones[iot].innerHTML.split(\"href=\");<br \/>\n      if (ows.length &gt; 1) {<br \/>\n       owstwo=ows[1].substring(1).split(ows[1].substring(0,1));<br \/>\n       window.open(owstwo[0], \"_blank\");<br \/>\n      }<br \/>\n    }<br \/>\n   }<br \/>\n  }<br \/>\n }<br \/>\n}<br \/>\n<\/b><br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body onload=\"<b>precc(); <\/b>courseCookies();\" &lt;?php body_class(); ?&gt;&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; which make the <i>open location &#8230;<\/i> statement of our AppleScript script as below &#8230;<\/p>\n<p><code><br \/>\ntell application \"Finder\"<br \/>\n\tactivate<br \/>\n\tset target of Finder window 1 to folder \"Applications\" of startup disk<br \/>\n\tset name of application file \"Firefox.app\" of folder \"Applications\" of startup disk to \"Firefox.app\"<br \/>\n\topen application file \"Firefox.app\" of folder \"Applications\" of startup disk<br \/>\n\tdelay 4<br \/>\n\topen location \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/applescript?wopenall=applescript\"<br \/>\nend tell<br \/>\n<\/code><\/p>\n<p> &#8230; be more meaningful with the <i>?wopenall=applescript<\/i> being used to open the first page worth of blog posting links be opened as new tab web pages in Firefox &#8230; semi-cute, huh?!<\/p>\n<p>So if you have a Mac and Mac OS X and have the Firefox web browser installed and you look in Applications-&gt;Utilities and find the AppleScript Editor why not try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/AppleScriptEditor\/FirefoxBrowser.txt_GETME\" title='FirefoxBrowser.scpt'>FirefoxBrowser.scpt<\/a> or see what happens with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/AppleScriptEditor\/AppleScript_Surfing.jpg\">today&#8217;s tutorial picture<\/a> or just see the use, in isolation, of the WordPress changes with <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/applescript?wopenall=applescript\" title='WordPress changes'>this link<\/a>.<\/p>\n<hr>\n<p id='asapt'>Previous relevant <a target=_blank title='AutoHotKey Surfing ASP.Net Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/autohotkey-surfing-asp-net-primer-tutorial\/'>AutoHotKey Surfing ASP.Net Primer Tutorial<\/a> os shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/AutoHotKeySurf\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"AutoHotKey Surfing ASP.Net Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/AutoHotKeySurf\/aspnet_autohotkey-32of.jpg\" title=\"AutoHotKey Surfing ASP.Net Primer Tutorial\" id='xocsa' onmouseover=\" this.src=this.src.replace('-11of.j', '-12of.xj').replace('-12of.j', '-13of.xj').replace('-13of.j', '-14of.xj').replace('-14of.j', '-21of.xj').replace('-21of.j', '-22of.xj').replace('-22of.j', '-31of.xj').replace('-31of.j', '-32of.xj').replace('-32of.j', '-11of.xj').replace('.x', '.');   \"  \/><\/a><p class=\"wp-caption-text\">AutoHotKey Surfing ASP.Net Primer Tutorial<\/p><\/div>\n<p>When, some time back, we talked about the &#8220;sisterly&#8221; (to today&#8217;s ASP.Net) PHP way of approaching the AutoHotKey Surfing &#8220;interface&#8221; to a web application with <a target=_blank title='AutoHotKey Surfing PHP exec Tutorial' href='#aspet'>AutoHotKey Surfing PHP exec Tutorial<\/a> as shown below, it was inferred that we might approach this, in ASP.Net (using Microsoft&#8217;s <a target=_blank title='Microsoft Visual Studio' href='https:\/\/www.visualstudio.com\/en-us\/visual-studio-homepage-vs.aspx'>Visual Studio<\/a> <a target=_blank title='Integrated Development Environment information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment'>IDE<\/a> under Windows), by using a &#8220;new Process()&#8221; technique &#8230; well, please scratch that idea &#8230; Windows security has come down pretty hard on such thoughts &#8230; so what we did today was compartmentalize more and allow the &#8220;AutoHotKey Surfing&#8221; be handled by Windows desktop techniques and has as the &#8220;interface method&#8221; the existance, or not, of files &#8230; a favourite technique for us, as much as anything because &#8220;methodologies&#8221; containing &#8220;file_exists&#8221; (or its like) are common in so many &#8220;server&#8221; programming languages &#8230; &#8220;server&#8221; not &#8220;client&#8221; &#8230; so not Javascript.<\/p>\n<p>So we have &#8230;<\/p>\n<ol>\n<li>ASP.Net (VB.Net codebehind) code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/AutoHotKeySurf\/AutoHotKey_Test.aspx_GETME\" title='AutoHotKey_Test.aspx'>AutoHotKey_Test.aspx<\/a> (or call it something better?!) &#8230; and its helper Windows (DOS) Command Line &#8230;<\/li>\n<li>Windows (DOS) Command Line batch file you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/AutoHotKeySurf\/autohk.bat_GETME\" title='ask.bnat'>autohk.bat<\/a> (which is designed to keep running, and we show with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/ASPNet\/AutoHotKeySurf\/\" title='click picture'>slideshow<\/a> which, today, doesn&#8217;t show the Task Schedular idea you might like that we showed with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/c-sorting-asp-net-primer-tutorial\/' title='C Sorting ASP.Net Primer Tutorial'>C Sorting ASP.Net Primer Tutorial<\/a>) <\/li>\n<\/ol>\n<p>As far as the code goes it assumes either the ASP.Net project will be located where the AutoHotKey compiler Ahk2Exe.exe is located or you could make the code better or it can work with the AutoHotKey compiler Ahk2Exe.exe on the computer&#8217;s PATH.  Anyway, try for yourself and if you settle on something there is the ASP.Net VB.Net <o>Dim prefix as String = &#8220;&#8221;<\/i> that would need amendment.<\/p>\n<p>Of <font size=5>more<\/font> <font size=2>than<\/font> <font size=4>somewhat<\/font> help today was <i>ASP.NET 3.5 Unleashed<\/i> by Stephen Walther &#8230; thanks.<\/p>\n<p>So please compare and contrast the server <font size=5>giants<\/font> and their software integration with some Windows operating system C.<\/p>\n<hr>\n<p id='aspet'>Previous relevant <a target=_blank title='AutoHotKey Surfing PHP exec Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/autohotkey-surfing-php-exec-tutorial\/'>AutoHotKey Surfing PHP exec Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/php_autohotkey-72of.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"C Sorting PHP exec Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/php_autohotkey-72of.jpg\" title=\"AutoHotKey Surfing PHP exec Tutorial\" id='oahk' onmouseover=\" this.src=this.src.replace('-72of.jpg', '-73of.xJPG').replace('-73of.JPG', '-51of.xjpg').replace('-51of.j', '-61of.xj').replace('-61of.jpg', '-62of.xJPG').replace('-62of.JPG', '-63of.xJPG').replace('-63of.JPG', '-72of.xjpg').replace('.x', '.');    \"  \/><\/a><p class=\"wp-caption-text\">AutoHotKey Surfing PHP exec Tutorial<\/p><\/div>\n<p>There&#8217;s another companion piece to our C &#8220;sorting&#8221; program tutorials finishing with <a target=_blank title='C Sorting PHP exec Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/c-sorting-php-exec-tutorial'>C Sorting PHP exec Tutorial<\/a> as of a couple of days ago.  And it&#8217;s a pretty important chapter if you are interested in software integration, and &#8220;meeting points&#8221;.   We talk about the &#8220;meeting point&#8221; of web and desktop applications through the use of mechanisms with the web application server language&#8217;s world &#8230; our web server language today is PHP and its <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> method, but it could be ASP.Net and a new Process() scenario if that&#8217;s how you roll &#8230; but it has to be Windows web hosting &#8230; as we do with some local web serving utilizing the brilliant <a target=_blank title='EasyPHP local Windows WAMP Apache\/PHP\/MySql web server landing page' href='http:\/\/www.easyphp.org'>EasyPHP<\/a> local web server &#8230; we can&#8217;t show you live on rjmprogramming.com.au domain because it is a Linux web server.   The difference today is that instead of using some C code compiled using the Digital Mars C compiler, we dynamically create a Windows executable, on the fly, using the brilliant <a target=_blank title='AutoHotKey landing page' href='http:\/\/www.autohotkey.org'>AutoHotKey<\/a> (last talked about at this blog with <a target=_blank href='#ast'>AutoHotKey StayAwake Tutorial<\/a> as shown below) and its *.ahk scripting language that can compile Windows executables for the Windows environment you find yourself in.<\/p>\n<p>The AutoHotKey script created  on the fly has behind its logic the brilliance of the code suggested at this very <a target=_blank title='Great AutoHotKey ideas link' href='http:\/\/www.autohotkey.com\/board\/topic\/92337-find-link-and-select\/'>useful link<\/a> &#8230; so, thanks.<\/p>\n<p>What happens on EasyPHP local (WAMP) Apache\/PHP\/MySql web server, under Windows, is that &#8230;<\/p>\n<ol>\n<li>we have our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/idea.txt_GETME\" title='idea.php'>idea.php<\/a> (and you are welcome to make a better name) &#8230; in the Document Root of EasyPHP (in our case at c:\\progra~1\\EasyPHP-12.1\\www\\idea.php &#8230; or http:\/\/127.0.0.1:8887\/idea.php) &#8230; and in the same place have &#8230;<\/li>\n<li>a subdirectory called AutoHotKey containing the AutoHotKey scripting software &#8230; so that on typing http:\/\/127.0.0.1:8887\/idea.php into the Internet Explorer address bar &#8230; <\/li>\n<li>an HTML form asks about a good Tag to look for at the blog <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\" title=\"This blog\">here<\/a> and, optionally, within the blog posting titles that result, a search string to narrow down the scope &#8230; and then &#8230;<\/li>\n<li>we have the information for PHP to write out an AutoHotKey script for the purpose which PHP exec() arranges to dynamically create a Windows executable that &#8230;<\/li>\n<li>runs to open an Internet Explorer webpage for the Tag search and any accompanying offshoot webpages for matching title search blog postings of interest &#8230; cute, huh?<\/li>\n<\/ol>\n<p>&#8220;Who&#8221; (but they&#8217;re on &#8220;second&#8221;) says desktop work is irrelevant to web applications?  After all, the server side languages interface to what the desktop world looks like &#8230; a web server operating system.  It is worth remembering that no matter how &#8220;cloudy&#8221; things get there are still web servers at the end of all these trails.<\/p>\n<hr>\n<p id='cslpt'>Previous relevant <a target=_blank title='' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/c-sorting-command-line-piping-tutorial\/'>AutoHotKey Record and Compile Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Record\/TaskMgr_MsgBox.m4v\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"AutoHotKey Record and Compile Primer Tutorial ... http:\/\/www.autohotkey.com\" src=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Record\/TaskMgr_MsgBox.jpg\" title=\"AutoHotKey Record and Compile Primer Tutorial ... http:\/\/www.autohotkey.com\"  \/><\/a><p class=\"wp-caption-text\">AutoHotKey Record and Compile Primer Tutorial ... http:\/\/www.autohotkey.com<\/p><\/div>\n<p>Have you heard of AutoHotKey?<br \/>\nIt is a Windows (desktop) application (that is quite brilliant) which can record and replay mouse and keystrokes, or assign a group of actions to a HotKey.    Anybody into procedures and the operations side of I.T. will want to know about it, am sure.  <\/p>\n<p>Our unusual* video of a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Record\/TaskMgr_MsgBox.m4v\" title=\"Click picture\">tutorial<\/a>  (which aims to start up the Windows Task Manager process and place an AutoHotKey MsgBox along with it, to allow the user to possibly close the <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Windows_Task_Manager' title='Windows Task Manager information from Wikipedia'>Windows Task Manager<\/a> process using the AutoHotKey executable) today uses the Mac application PhotoBooth with the (video) effect called &#8220;Rollercoaster&#8221; (and set Edit->Auto Flip New Items to on (otherwise it will all be back to front!)) &#8230; am not sure of its relevance and whether you can see enough &#8230; so, if that is the case, we basically (on a Windows laptop) (* dedicated to Sydney Royal Easter Show):<\/p>\n<ol>\n<li>As a side issue, opened up a previous script (you can use Notepad) from the <i>Compiler<\/i> folder off the root <i>AutoHotKey<\/i> folder and copied some <i>MsgBox<\/i> code of interest.<\/li>\n<li>Used Windows Explorer to double click the <i>AutoScriptWriter<\/i> folder off the root <i>AutoHotKey<\/i> folder.<\/li>\n<li>Double clicked <i>AutoScriptWriter.exe<\/i>.<\/li>\n<li>At the &#8220;Initiate the following &#8216;Run&#8217; line upon Record&#8221; put <i>taskmgr<\/i><\/li>\n<li>Within the main body went Ctrl-V to paste in that code regarding <i>MsgBox<\/i><\/li>\n<li>Clicked <i>Record<\/i> button.<\/li>\n<li>Clicked anywhere in space on the Desktop.<\/li>\n<li>Clicked <i>Stop<\/i> button.<\/li>\n<li>Rearranged the lines of code such that <i>Run, taskmgr<\/i> sat up the top.<\/li>\n<li>Hit the <i>Save<\/i> button.<\/li>\n<li>Saved to the <i>Compiler<\/i> folder off the root <i>AutoHotKey<\/i> folder with the name TaskMgr_MsgBox (and it will give the default AutoHotKey extension of .ahk (for a script)).<\/li>\n<li>Used Windows Explorer to double click the <i>Compiler<\/i> folder off the root <i>AutoHotKey<\/i> folder.<\/li>\n<li>Right-clicked <i>TaskMgr_MsgBox.ahk<\/i> and chose <i>Run Script<\/i> &#8230; it worked .. great.<\/li>\n<li>Right-clicked <i>TaskMgr_MsgBox.ahk<\/i> and chose <i>Compile Script<\/i>.<\/li>\n<li>Double clicked resultant <i>TaskMgr_MsgBox.exe<\/i> (with the AutoHotKey &#8220;H&#8221; icon &#8230; cute, huh?) &#8230; it worked .. great.<\/li>\n<li>That resultant <i>TaskMgr_MsgBox.exe<\/i> is like any other Windows (desktop) executable that can be mapped to a shortcut or added to a taskbar or menu or be mapped to a keyboard shortcut, or be called by a .bat script, or be placed in a user Startup Programs directory, or be the activated program of a <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Windows_Task_Scheduler' title='Windows Task Schedular information from Wikipedia'>Windows Task Schedular<\/a> task, or be forked by another Windows executable, for any future use.<\/li>\n<\/ol>\n<p>Here is a link for some downloadable programming AutoHotKey script source code you could rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Record\/TaskMgr_MsgBox.ahk_GETME\" title=\"TaskMgr_MsgBox.ahk\">TaskMgr_MsgBox.ahk<\/a><\/p>\n<p>Here is a <a target=_blank title='AutoHotKey MsgBox' href='http:\/\/www.autohotkey.com\/docs\/commands\/MsgBox.htm'>link<\/a> for more information regarding AutoHotKey&#8217;s MsgBox functionality &#8230; and a lead in for a lot of other AutoHotKey functionality documentation &#8230; a feast of brilliant Windows application information.<\/p>\n<p>Here is a link to the home of <a target=_blank title='AutoHotKey' href='http:\/\/www.autohotkey.com'>AutoHotKey<\/a>.<\/p>\n<hr>\n<p id='ast'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4296'>AutoHotKey StayAwake Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/StayAwake\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"AutoHotKey StayAwake Tutorial ... http:\/\/www.autohotkey.com\" src=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/StayAwake\/AutoHotKey_StayAwake-36of.jpg\" title=\"AutoHotKey StayAwake Tutorial ... http:\/\/www.autohotkey.com\"  \/><\/a><p class=\"wp-caption-text\">AutoHotKey StayAwake Tutorial ... http:\/\/www.autohotkey.com<\/p><\/div>\n<p>Have you heard of AutoHotKey?<br \/>\nIt is a Windows application (that is quite brilliant) which can record and replay mouse and keystrokes, or assign a group of actions to a HotKey.    Anybody into procedures and the operations side of I.T. will want to know about it, am sure.  <\/p>\n<p>We have introduced you to AutoHotKey with this previous AutoHotKey Primer Tutorial <a href=\"#pahkpt\">here<\/a>.<\/p>\n<p>Then we went a bit further with AutoHotKey with this previous More AutoHotKey Primer Tutorial <a href=\"#mat\">here<\/a>.<\/p>\n<p>We talked about <a target=_blank title='Terminate and Stay Resident concept explained by Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Terminate_and_Stay_Resident'>stay-resident<\/a> programs earlier with <a target=_blank title='Menu for Windows Command Prompt Via Batch File Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4196'>Menu for Windows Command Prompt Via Batch File Tutorial<\/a>.   Our tutorial today uses AutoHotKey to create one.   It uses the ToolTip functionality of Windows to keep the cursor busy.   In the tutorial we show it being run:<\/p>\n<ul>\n<li>right-click on AutoHotKey script file<\/li>\n<li>compile script into StayAwake.exe and Run As Administrator (but you could also run it as a mere mortal!)<\/li>\n<li>copy StayAwake.exe into All Users startup programs directory, logout and login for it to stay resident<\/li>\n<\/ul>\n<p>Please enjoy our tutorial with some stay-resident approaches shown <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/StayAwake\/' title='AutoHotKey StayAwake Tutorial'>here<\/a>.  <\/p>\n<p>Link to downloadable AutoHotKey programming script file <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/StayAwake\/StayAwake.ahk_GETME' title='StayAwake.ahk'>StayAwake.ahk<\/a><\/p>\n<hr \/>\n<p id=\"mat\">Previous <a target=_blank title='More AutoHotKey Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3606'>More AutoHotKey Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/More\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"More AutoHotKey Tutorial ... http:\/\/www.autohotkey.com\" src=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/More\/AutoHotKey_More-14of.jpg\" title=\"AutoHotKey Primer Tutorial ... http:\/\/www.autohotkey.com\"  \/><\/a><p class=\"wp-caption-text\">More AutoHotKey Tutorial ... http:\/\/www.autohotkey.com<\/p><\/div>\n<p>Have you heard of AutoHotKey?<br \/>\nIt is a Windows application (that is quite brilliant) which can record and replay mouse and keystrokes, or assign a group of actions to a HotKey.    Anybody into procedures and the operations side of I.T. will want to know about it, am sure.  <\/p>\n<p>We have introduced you to AutoHotKey with this previous AutoHotKey Primer Tutorial <a href=\"#pahkpt\">here<\/a>.<\/p>\n<p>On a previous tutorial Windows Command Prompt Via Batch File we introduced you to some Windows Command Prompt commands and you can see that tutorial <a target=_blank href='#pwcpvbf' title='Windows Command Prompt Via Batch File'>here<\/a>.   Our tutorial here builds on this in that the Windows Command Prompt batch file used for making that tutorial and downloadable here with rename to <a target=_blank title='Rename to xxx.bat and put into directory c:\\Users\\user\\ please' href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/More\/xxx.bat_GETME'>xxx.bat<\/a> created\/copied into c:\\Users\\user\\ please (if no good you will have to dive in and adjust redo351.ahk yourself now, and learn about the wonders of AutoHotKey!), was deliberately made so that it can be stepped through slowly by entering {ENTER} key a lot (in xxx.bat this is done by set \/p commands), and we have here the pressing of those {ENTER}s (ie. simulating answer to set \/p sleeping for 2 seconds between each one &#8230; here is your homework &#8230; make it wait for 3 seconds between each {ENTER} then compile it then rerun it) with an AutoHotKey script largely created by hand (or via leads from recordings (do you remember <a target=_blank title='Microsoft Excel VBA for CSV Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=2557'>Microsoft Excel VBA for CSV Primer Tutorial<\/a> where similar thoughts were discussed as ideas for how to &#8220;get into programming&#8221;?)) and you can also download this here and rename to <a target=_blank title='Rename to xxx.bat and put into directory c:\\Users\\user\\ please ... if no good you will have to dive in and adjust redo351.ahk yourself now, and learn about the wonders of AutoHotKey!' href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/More\/redo351.ahk_GETME'>redo351.ahk<\/a> and compile to redo351.exe using AutoHotKey&#8217;s compiler.   If, when you do all that you run it and it stands there looking at you like a dead mullet it will be because your Command Prompt window for such a scenario does not end up being called &#8220;C:\\Windows\\system32\\cmd.exe&#8221; and you will need to change this throughout redo351.ahk and then recompile (after stopping previous go (with <a target=_blank title='Windows Task Manader and Command Prompt Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1352'>Windows Task Manager<\/a> maybe)) and test again.   An AutoHotKey program called AU3_Spy.exe can help identify the names (or titles) of Windows, as required.<\/p>\n<p>Please enjoy our tutorial with some recording functionality shown as well as the little &#8220;subplot&#8221; above (where the butler actually &#8220;did it&#8221;) <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/More' title='More AutoHotKey Tutorial'>here<\/a>.   The subplot is represented by the last 6 slides of the tutorial.<\/p>\n<hr \/>\n<p id=\"pahkpt\">Previous tutorial <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=616' title='AutoHotKey Primer Tutorial'>AutoHotKey Primer Tutorial<\/a> below &#8230;<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Example\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"AutoHotKey Primer Tutorial ... http:\/\/www.autohotkey.com\" src=\"http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Example\/ahk_0of.png\" title=\"AutoHotKey Primer Tutorial ... http:\/\/www.autohotkey.com\"  \/><\/a><p class=\"wp-caption-text\">AutoHotKey Primer Tutorial ... http:\/\/www.autohotkey.com<\/p><\/div>\n<p>Have you heard of AutoHotKey?<\/p>\n<p>It is a Windows application (that is quite brilliant) which can record and replay mouse and keystrokes, or assign a group of actions to a HotKey.    Anybody into procedures and the operations side of I.T. will want to know about it, am sure.  <\/p>\n<p>Don&#8217;t want to show my age, but first got keen about AutoHotKey because I couldn&#8217;t believe the day  (was it when Windows 5 came out?) that Microsoft abandoned the cute program called Recorder, that came with Windows.  For myself, this was a moment of deep mourning, like when <a target=_blank title='Second half is not worth watching!' href='https:\/\/www.youtube.com\/watch?v=T52404rbsa0'>Collingwood lost to Carlton in the 1970 Grand Final<\/a>.<\/p>\n<p>In this primer  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey\/Example\/'>tutorial<\/a> see a brief install then a record-compile-replay cycle.<br \/>\nIn this link you can look at some of the <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/AutoHotKey' title='AutoHotKey usage'>personal usage<\/a> of AutoHotKey.\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d616' onclick='var dv=document.getElementById(\"d616\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=AutoHotKey\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d616' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3606' onclick='var dv=document.getElementById(\"d3606\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=AutoHotKey\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3606' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d4296' onclick='var dv=document.getElementById(\"d4296\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=AutoHotKey\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4296' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d7239' onclick='var dv=document.getElementById(\"d7239\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=AutoHotKey\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7239' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d16184' onclick='var dv=document.getElementById(\"d16184\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=PHP\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d16184' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d16251' onclick='var dv=document.getElementById(\"d16251\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=ASP.NET\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d16251' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d16251' onclick='var dv=document.getElementById(\"d16251\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=applescript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d16251' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What AutoHotKey is as a recording piece of functionality for Windows is, AppleScript is Mac OS X&#8217;s recording functionality equivalent. Today we shaped to want to show you the equivalent functionality AutoHotKey achieved surfing the net with Internet Explorer as &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/applescript-surfing-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,29,37],"tags":[94,151,439,652,723,725,729,932,997,1032,1319,1404,1456],"class_list":["post-16369","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-applescript","tag-blog","tag-firefox","tag-javascript","tag-mac","tag-mac-os-x","tag-mac-os-x-yosemite","tag-php","tag-programming","tag-recording","tag-tutorial","tag-web-browser","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/16369"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=16369"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/16369\/revisions"}],"predecessor-version":[{"id":16381,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/16369\/revisions\/16381"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=16369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=16369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=16369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}