{"id":6652,"date":"2021-01-19T09:30:24","date_gmt":"2021-01-19T09:30:24","guid":{"rendered":"https:\/\/max-drake.cc\/?p=6652"},"modified":"2021-01-25T15:34:06","modified_gmt":"2021-01-25T15:34:06","slug":"ahk-tools-general-useful-items","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=6652","title":{"rendered":"AHK tools, general useful items"},"content":{"rendered":"\n<p>I&#8217;ve been exploring AHK a bit further, specifically in the area of using GUI&#8217;s to use an interface to help access information and do things. After looking at a few tutorials on YT I think I&#8217;ll need to get my head around some functions.  As you need to action some sort of action to a GUI item. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">AHK GUI interface tools<\/h3>\n\n\n\n<p>There are some good video courses out there and a couple of tools for creating the actual GUI interface. The first is <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/sourceforge.net\/projects\/autogui\/\" target=\"_blank\">AutoGUI<\/a>, <\/strong>but that would not run on my Surface Book as the resolution was too high and just shut down. Also you download it from Sourceforge and it&#8217;s a .7z zip file that I had to unzip online. <\/p>\n\n\n\n<p>The other tool is <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.mediafire.com\/file\/57jtw0zsfa7h2i0\/smartgui.zip\/file\" target=\"_blank\">SmartGui Creator<\/a><\/strong>.  Another Drag\/drop and size interface then you cut\/paste the GUI code into your script and start linking to it with your code. <\/p>\n\n\n\n<p>Another I found on pastebin <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/pastebin.com\/C24jqbtX\" target=\"_blank\">AHK GUI Creator<\/a><\/strong> is also quite nice, very simple. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"579\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-1024x579.jpg\" alt=\"\" class=\"wp-image-6653 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-1024x579.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-300x170.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-768x434.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-50x28.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-88x50.jpg 88w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-100x57.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-177x100.jpg 177w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-1133x640.jpg 1133w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_-640x362.jpg 640w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-15_58_54-GuiCreate.ahk_.jpg 1322w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/579;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">AHK Link creator<\/h3>\n\n\n\n<p>I saw someone in a video use a pop up box to create a link. There is <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.howtogeek.com\/howto\/23884\/create-your-own-insert-hyperlink-feature-in-any-app-with-autohotkey\/\" target=\"_blank\">this article<\/a><\/strong> on the topic, but I wanted a pop-up box so that I could add the URL in and then another box to put the text I wanted to be the link so created the Alt+1 code that adapted the code from the article above which is sort of Alt+2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>!1::  ;Alt+1\n  Sleep, 100\n  InputBox, UrlLink, \"New Link\", \"Put a new URL in box \"\"\n  InputBox, Texty, \"New Text\", \"Put a Word\/String for what you want to read\"\n  ;nTab:= \"\"target=\"_blank\"\"\"\n  Sleep, 50\n  clipurl := \"&lt;a href=\"\"\" UrlLink \"\"\" &gt;&lt;strong &gt;\" Texty \"&lt;\/strong&gt;&lt;\/a&gt;\"\n  SendInput {Raw}%clipurl%\nReturn\n; First copy URL, it goes to clipboard\n; Next Select text you want to make the link to\n!2:: ;Alt+2\n  Sleep, 100\n  clipurl := clipboard ; This takes URL from clipbd and assigns to var\n  Send, ^c ; This copies the selected\/highlighted text in the doc, again to clipboard (so overwrites the URL)\n  Sleep, 50\n  ;clipurla := \"&lt;a href=\"\"\" . clipurl . \"\"\"&gt;\" . clipboard . \"&lt;\/a&gt;\"\n  clipurla := \"&lt;a href=\"\"\" clipurl \"\"\"&gt;&lt;strong &gt;\" clipboard \"&lt;\/strong&gt;&lt;\/a&gt;\"\n  SendInput {Raw}%clipurla%\n  clipboard := clipurl\n  clipurl =;\nReturn<\/code><\/pre>\n\n\n\n<p>It only works in my Emails when I&#8217;m in HTML tab. In Notepad, if I save as .html it will work there too. So, you have to be in programme where you want the text to be written, then hit Alt+1 (my Hotkey, popup box for link, then after OK another popup box for Title, then on Ok for that box it creates the string you can paste into HTML for it to work. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"596\" height=\"315\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1.jpg\" alt=\"\" class=\"wp-image-6669 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1.jpg 596w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1-300x159.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1-50x26.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1-95x50.jpg 95w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1-100x53.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_12_57-_new-1-Notepad-1-189x100.jpg 189w\" data-sizes=\"(max-width: 596px) 100vw, 596px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 596px; --smush-placeholder-aspect-ratio: 596\/315;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"578\" height=\"299\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_.jpg\" alt=\"\" class=\"wp-image-6670 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_.jpg 578w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_-300x155.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_-50x26.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_-97x50.jpg 97w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_-100x52.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-12_13_13-_New-Text_-193x100.jpg 193w\" data-sizes=\"(max-width: 578px) 100vw, 578px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 578px; --smush-placeholder-aspect-ratio: 578\/299;\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;a href=\"C:\\Users\\drake\\Downloads\\______Screenshots\\2021-01-20 12_13_13-_New Text_.jpg\" &gt;&lt;strong &gt;The big wahoony&lt;\/strong&gt;&lt;\/a&gt;<\/code><\/pre>\n\n\n\n<p>  There is also a button in HTML to use instead, I&#8217;m thinking of trying this out with signature for emails, with buttons instead of links: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> &lt;button onclick=\"document.location='https:\/\/www.w3schools.com\/html\/html_links.asp'\"&gt;HTML Tutorial&lt;\/button&gt; <\/code><\/pre>\n\n\n\n<p>An elaboration on this is to create a Button for people to click to go to: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"392\" height=\"345\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg\" alt=\"\" class=\"wp-image-6671 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg 392w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-300x264.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-50x44.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-57x50.jpg 57w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-100x88.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_46_17-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-114x100.jpg 114w\" data-sizes=\"(max-width: 392px) 100vw, 392px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 392px; --smush-placeholder-aspect-ratio: 392\/345;\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>!3:: ;Be in Text area Put a new URL in box (OK) Put a Word\/String for what you want to read (OK)\n  { Sleep, 100\n    InputBox, UrlLink, \"New Link\", \"Put a new URL in box \"\"\n    InputBox, Texty, \"New Text\", \"Put a Word\/String for what you want to read\"\n    Sleep, 50\n    clipurl := \"&lt;a href=\"\"\" UrlLink \"\"\" \"\n    Sleep, 50\n    SendInput {Raw}%clipurl%\n    sleep 100\n    SendRaw, style=\"background-color:#5a19ae;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:20px;text-align:center;text-decoration:none;width:150px;-webkit-text-size-adjust:none;\"  \n    sleep 100\n    SendRaw, &gt; %Texty% &lt;\/a&gt; \n    Return\n  }<\/code><\/pre>\n\n\n\n<p>That took a while to sort out, raw coding in VS Code didn&#8217;t work when I transferred to Email, but I found this handy<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/buttons.cm\/\" target=\"_blank\"> page to make Buttons<\/a><\/strong>. It works like a charm. <\/p>\n\n\n\n<p>I also used the <strong>#include<\/strong> to link my URL script to my main key page. That&#8217;s handy as I can Comment it out and use it when I want. <\/p>\n\n\n\n<p>I&#8217;ve now got it set up as a Full Signature in CopyTexy &amp; also a HtoKey for pasting it into emails. The HotKey paste is quite slow, CopyPasty is a lot faster. You do have to remember to jump back out of HTML tab in Thunderbird before you can send, so I&#8217;m wondering if I can add that to the AHK script to make it more robust. This tripped me up when I was testing the email as I had the buttons adjacent to reach other, but on the mobile it looked really untidy, so I rearranged them  down the LH side so they look great on a mobile, nice and simple. I put spaces between so easy to click on individual buttons. <\/p>\n\n\n\n<p>Also have the phone number that you press button on mobile and it rings the number, cool<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"604\" height=\"540\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg\" alt=\"\" class=\"wp-image-6672 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird.jpg 604w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-300x268.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-50x45.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-56x50.jpg 56w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-100x89.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-18_55_11-Inbox-max.s.drake@gmail.com-Mozilla-Thunderbird-112x100.jpg 112w\" data-sizes=\"(max-width: 604px) 100vw, 604px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 604px; --smush-placeholder-aspect-ratio: 604\/540;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">AHK AutoCorrect<\/h3>\n\n\n\n<p><strong><a rel=\"noreferrer noopener\" href=\"https:\/\/gist.githubusercontent.com\/endolith\/876629\/raw\/8e237cf3ed79f33e85af21b4823ffe3d6685161f\/AutoCorrect.ahk\" target=\"_blank\">AutoCorrect<\/a><\/strong> is a cool tool that I&#8217;m starting to play with. It corrects mis-spellings, so you select text and hit (currently Shift+1) and it shows you the mis-spelt word and then you can put in the record. Only thing is it doesn&#8217;t seem to automatically correct after doing it. So I need to delve into it a bit more. (<em>It seems double tap on spacebar works, but that&#8217;s not logical<\/em>)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1005\" height=\"410\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox.jpg\" alt=\"\" class=\"wp-image-6654 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox.jpg 1005w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-300x122.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-768x313.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-50x20.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-123x50.jpg 123w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-100x41.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-245x100.jpg 245w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-640x261.jpg 640w\" data-sizes=\"(max-width: 1005px) 100vw, 1005px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1005px; --smush-placeholder-aspect-ratio: 1005\/410;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Some useful Calls with &#8220;A_&#8221; variables <\/h3>\n\n\n\n<p>There was a YouTube Video that showed a cyclin f a proramme such as Explorer with a hotkey, so that <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>; This is a script that will always go to The last explorer window you had open.\n; If explorer is already active, it will go to the NEXT last Explorer window you had open.\n; CTRL Numpad2 is pressed with a single button stoke from my logitech G15 keyboard -- Macro key 17. \n; from vid https:\/\/www.youtube.com\/watch?v=OqyQABySV8k\n+1:: \n  IfWinNotExist, ahk_class CabinetWClass\n    Run, explorer.exe\n  GroupAdd, taranexplorers, ahk_class CabinetWClass\n  if WinActive(\"ahk_exe explorer.exe\")\n    GroupActivate, taranexplorers, r\n  else\n    WinActivate ahk_class CabinetWClass ;you have to use WinActivatebottom if you didn't create a window group.\nReturn<\/code><\/pre>\n\n\n\n<p>based on this video:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"My greatest, easiest AHK script ever - Instant application switching\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/OqyQABySV8k?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Some more cool things I&#8217;ve been playing with is calling system variables such as Computer name &amp; time, and structuring time\/date to suit requirements. This is a good video:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"AutoHotkey - AHK - My fav scripts\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/l4wm4dObhF4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Some code I&#8217;ve been playing with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>::zid::\n  ; a group of Built-in variables of AHK  https:\/\/www.autohotkey.com\/docs\/Variables.htm#Intro\n  ; vid for good AHK  current time format  https:\/\/www.youtube.com\/watch?v=l4wm4dObhF4\n  SendInput, %A_UserName% `n ; username on pc\n  ;SendInput, %A_IPAddress% `n\n  SendInput, %A_IPAddress1% `n ; IP address 1\n  SendInput, %A_IPAddress2% `n\n  SendInput, %A_IPAddress3% `n\n  SendInput, %A_IPAddress4% `n\n  SendInput, %A_AppData% `n ; path to app data\n  SendInput, %A_StartMenu% `n ; path to start menu folder\n  sendraw, \"Does user have Admin rights? 1 if admin rights else 0\"`n\n  SendInput, %A_IsAdmin% `n ; 1 if admin rigts else 0\n  sendraw, \"primary screen width\"`n\n  SendInput, %A_ScreenWidth% `n ; screen width\n  sendraw, \"primary screen height\"`n\n  SendInput, %A_ScreenHeight% `n ;screen ht\n  SendInput, %A_ComputerName% `n`n ; comp name\n  SendInput, %A_AhkPath% `n ; path to programme\n  SendInput, %A_NowUTC% `n ; UTC Now\n  SendInput, %A_Now% `n ; Now\n  FormatTime, CurrentDateTime,,yyy-MM-dd \n  SendInput, %CurrentDateTime% `n ; current date formats yyy-mm-dd\n  FormatTime, CurrentDateTime,,yyy-MM-dd hh:mm:ss\n  SendInput, %CurrentDateTime% `n ; current date\/time formats yyy-mm-dd &amp; Time\n  FormatTime, CurrentDateTime,,yyy-MM-dd h:mm tt\n  SendInput, %CurrentDateTime% `n ; current date\/time formats yyy-mm-dd &amp; Time in AM\/PM\n  FormatTime, CurrentDateTime,,dddd,MMMM d, yyyy\n  SendInput, %CurrentDateTime% `n `n ; current date\/time formats long format\n  sendraw, \"caret x location\"`n\n  SendInput, %A_CaretX% `n ; ceret in text file - where x is \n  sendraw, \"caret y location\"`n\n  SendInput, %A_CaretY% `n ; ceret in text file - where y is \nReturn\n::&#91;dl::\n  FormatTime, CurrentDateTime,,dddd,MMMM d, yyyy\n  SendInput, %CurrentDateTime% `n `n ; current date formats long format\nReturn\n::&#91;dt::\n  FormatTime, CurrentDateTime,,yyy-MM-dd h:mm tt\n  SendInput, %CurrentDateTime% `n ; current date\/time formats yyy-mm-dd &amp; Time in AM\/PM\nReturn\n::&#91;dy::\n  FormatTime, CurrentDateTime,,yyy-MM-dd \n  SendInput, %CurrentDateTime% `n ; current date formats yyy-mm-dd\nReturn<\/code><\/pre>\n\n\n\n<p>Some useful stuff, not sure yet where I&#8217;d use some of them, but date is good for ReadMe files so you know when you&#8217;ve written a note. Also good for file named where I add Date to file name.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Organising AHK files<\/h3>\n\n\n\n<p>I though this gentleman&#8217;s video&#8217;s on organising AHK files is pretty good. I&#8217;m going to start structuring my files that way as it makes them far easier to scan and read.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"How to Organize AutoHotKey Scripts\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/aIlssnAwK3M?list=PLwTteA6Ihcx2gFS-YDCN94l9HRLg2jzCO\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Also another videos on Keyboard &amp; mouse combo hotkeys:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Mouse Key Combination Hotkeys\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/3w6qg6Iam4I?list=PLwTteA6Ihcx2gFS-YDCN94l9HRLg2jzCO\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Help files<\/h3>\n\n\n\n<p>I want to create a dedicated hotkey for a help file message box for each Script, just saying what keys are used and what they do. Something Like Ctrl + F1 say, so you can check what codes are running. Maybe conflict between running files so maybe ^F2,^F3 etc. <\/p>\n\n\n\n<p>As I&#8217;m using  #Include in my main AHK script I have added a help button at Ctrl+8 with reference to hotkeys in the main file and also to the linked file, so I can use them whilst only running this one.  Handy when you can&#8217;t remember Hotkeys. Also just use Ctrl+7 to refresh the file, even if I&#8217;m only updating the linked file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"588\" height=\"1024\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-588x1024.jpg\" alt=\"\" class=\"wp-image-6681 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-588x1024.jpg 588w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-172x300.jpg 172w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-50x87.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-29x50.jpg 29w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-100x174.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-57x100.jpg 57w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-367x640.jpg 367w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-441x768.jpg 441w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1-620x1080.jpg 620w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-19_10_53-Mkeys.ahk-AHK-Visual-Studio-Code-1.jpg 631w\" data-sizes=\"(max-width: 588px) 100vw, 588px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 588px; --smush-placeholder-aspect-ratio: 588\/1024;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">AHK Access, Pause, Suspend &amp; refresh\/Reload<\/h3>\n\n\n\n<p><strong>Access<\/strong>. I have AHK pinned to my task bar, clicking on it opens browser to doc page, but right clicking on it allows me to pin some AHK scripts to the top, so they are easy to find to start if I&#8217;ve shut them down and want to restart them, I don&#8217;t have to go looking to the directory to double click on them. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"414\" height=\"929\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1.jpg\" alt=\"\" class=\"wp-image-6659 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1.jpg 414w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-134x300.jpg 134w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-50x112.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-22x50.jpg 22w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-100x224.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-45x100.jpg 45w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-285x640.jpg 285w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_13_17-1-1-342x768.jpg 342w\" data-sizes=\"(max-width: 414px) 100vw, 414px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 414px; --smush-placeholder-aspect-ratio: 414\/929;\" \/><\/figure>\n\n\n\n<p><strong>Pause &amp; Suspend Hotkeys<\/strong>. In the Taskbar Tray you can <strong>pause<\/strong> or <strong>suspend hotkeys<\/strong> of a particular script by right clicking on them and selecting choice and the Icon changes to denote its new status. <\/p>\n\n\n\n<p>This is particularly handy if you have a buggy script and you&#8217;ve utilsed a key , say Shift +R so that Capital R does not work in a Text doc, you can suspend hotkeys in different scripts to identify where the bug is originating from. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"428\" height=\"357\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48-.jpg\" alt=\"\" class=\"wp-image-6660 lazyload\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48-.jpg 428w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48--300x250.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48--50x42.jpg 50w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48--60x50.jpg 60w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48--100x83.jpg 100w, https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-20-10_14_48--120x100.jpg 120w\" data-sizes=\"(max-width: 428px) 100vw, 428px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 428px; --smush-placeholder-aspect-ratio: 428\/357;\" \/><\/figure>\n\n\n\n<p><strong>Reload Script<\/strong>. This is something that I want on a HotKey so that I can refresh the script when it gets buggy.  A handy way to reload without delving into the Taskbar Tray. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">#Include,  functions() &amp; Excel<\/h3>\n\n\n\n<p>These are something I want to get used to using.<\/p>\n\n\n\n<p><strong>#include<\/strong>, for pulling in files to use them in other files<\/p>\n\n\n\n<p><strong>Functions()<\/strong> for bunching up processes into one item that can be called. You can send user variables to functions and get them to return manipulated data. <\/p>\n\n\n\n<p><strong>Excel<\/strong>. Just for linking data to an Excel file. Actually, I wonder if my 3DPDF CSV download could go into a AHK script to do the processing for the data instead of VBA. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">End comment<\/h3>\n\n\n\n<p>There are some great tools out there to help you code some macro&#8217;s. Now I need some idea&#8217;s of things I want to create macro&#8217;s for. <\/p>\n\n\n\n<p>The few simple ones I use all work, but I need to start developing some more tools to increase productivity, and also get familiar with the new ones I&#8217;ve found. <\/p>\n\n\n\n<p>I think the structuring of the files so that they are more organized is a good start, a style &amp; structure that is easy to read and access. It will definitely be good for cross-referencing different files, especially with HotKeys and Abbreviation keys<\/p>\n\n\n\n<p>Thank you for your interest &amp; attention.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been exploring AHK a bit further, specifically in the area of using GUI&#8217;s to use an interface to help access information and do things. After looking at a few tutorials on YT I think I&#8217;ll need to get my head around some functions. As you need to action some sort of action to a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6654,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,462,42],"tags":[],"class_list":["post-6652","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-macros-ahk-autoit","category-productivity"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-600x400.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2021\/01\/2021-01-19-18_53_51-Add-New-Post-\u2039-Vast-\u2014-WordPress-\u2014-Mozilla-Firefox-600x600.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6652"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/6652\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/6654"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}