{"id":1625,"date":"2019-01-31T00:00:00","date_gmt":"2019-01-30T23:00:00","guid":{"rendered":"https:\/\/demo.sidekick.be\/itenium\/autohotkey-use-case\/"},"modified":"2025-11-28T13:31:45","modified_gmt":"2025-11-28T12:31:45","slug":"autohotkey-use-case","status":"publish","type":"post","link":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/","title":{"rendered":"Autohotkey Use Case: Submitting a Form"},"content":{"rendered":"<h1 id=\"the-use-case\">The Use Case<\/h1>\n<h2 id=\"the-form\">The Form<\/h2>\n<p>Considering the following login form (<a href=\"\/assets\/blog-images\/autohotkey-login-form.html\">Html version<\/a>)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/itenium-be.github.io\/blog-posts-new\/assets\/blog-images\/autohotkey-login-form.png\" alt=\"desc\" \/><\/p>\n<h2 id=\"the-script\">The Script<\/h2>\n<p>The Autohotkey script:<\/p>\n<pre><code class=\"language-autohotkey\">:*:lma::admin@mega-app.com{tab}my_super_secret_pwd{tab}{space}{tab}{enter}\n<\/code><\/pre>\n<p>Type <code>lma<\/code> (Short for <code>Login Mega App<\/code>?) while the cursor is in the email input to fill in the form and submit it.<\/p>\n<p><!-- This block exists three times: autohotkey-dyna-run.md, autohotkey-use-case.md and autohotkey-login-form.html --><!-- ATTN: Some slight variations in install instructions!--><\/p>\n<h1 id=\"autohotkey-installation\">Autohotkey installation<\/h1>\n<ul>\n<li>Download and <a href=\"https:\/\/www.autohotkey.com\/download\">install Autohotkey<\/a> (Pick Autohotkey 1.1)<\/li>\n<li>Create a file with the extension <strong>ahk<\/strong><\/li>\n<li>Paste the Autohotkey code from above in the file<\/li>\n<li>Double click your newly created file to activate the hotstring<\/li>\n<li>Press <strong>lma<\/strong> while the cursor is in the email input on <a href=\"\/assets\/blog-images\/autohotkey-login-form.html\">the test page<\/a><\/li>\n<\/ul>\n<h2 id=\"to-start-with-windows\">To start with Windows<\/h2>\n<p>To start your Autohotkey script with Windows put a file shortcut in your startup folder.<\/p>\n<p>To get to this directory:<\/p>\n<ul>\n<li>Press <code>Windows + E<\/code><\/li>\n<li>Press <code>Control + L<\/code><\/li>\n<li>Type <code>shell:startup<\/code><\/li>\n<li>Press <code>Enter<\/code><\/li>\n<\/ul>\n<p>Usually something like:<\/p>\n<p><code>C:Usersyour_user_nameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup<\/code><\/p>\n<p>With <code>your_user_name<\/code>: <code>$env:USERNAME<\/code> (PS1) or <code>%USERNAME%<\/code> (CMD)<\/p>\n<h1 id=\"more-info\">More info<\/h1>\n<h2 id=\"the-script-explained\">The Script Explained<\/h2>\n<p><!-- TODO: put link here after writing Autohotkey - Hotstrings tutorial --> <\/p>\n<pre><code class=\"language-autohotkey\">; `*` means the hotstring will expand as soon as it is typed in\n; It can be omitted so the hotstring will only expand when followed by an `EndChars`\n; The part between the double :: is the key sequence that will trigger the hotstring\n::lma::\n\n; Send some text\nSendInput admin@mega-app.com\n\n; Send special characters\nSendInput {tab}{tab}{space}{tab}{enter}\nreturn\n<\/code><\/pre>\n<h2 id=\"using-a-hotkey-instead\">Using a hotkey instead<\/h2>\n<p>The same could also be triggered by pressing <code>Control + Windows + L<\/code> for example<\/p>\n<pre><code>^#l::\nSendInput admin@mega-app.com{tab}my_super_secret_pwd{tab}{space}{tab}{enter}\nreturn\n<\/code><\/pre>\n<p>See the <a href=\"\/blog\/productivity\/autohotkey-hotkeys\/\">blog post on hotkeys<\/a> for more hotkey info and possibilities.<\/p>\n<h2 id=\"context-sensitive\">Context sensitive<\/h2>\n<p>When testing an application, I tend to use a different browser for each user profile so that I do not have to logout\/login all the time. We could even check the value of <code>document.title<\/code> and use different credentials for different applications.<\/p>\n<pre><code class=\"language-autohotkey\">; Type loginAdv to activate the hotstring\n:*:loginAdv::\nWinGetTitle, title, A\n\n; These logins work only in Chrome\n#IfWinActive, ahk_class Chrome_WidgetWin\n    IfInString, title, ProjectDocumentTitle1\n        SendInput admin{tab}pwd{enter}\n    Else IfInString, title, ProjectDocumentTitle2\n        SendInput superuser{tab}pwd{enter}\n    Else\n        SendInput root{tab}pwd{enter}\n#IfWinActive\n\n; Firefox\n#IfWinActive, ahk_class MozillaWindowClass\n    IfInString, title, ProjectDocumentTitle1\n        SendInput client{tab}pwd{enter}\n    Else IfInString, title, ProjectDocumentTitle2\n        SendInput clerk{tab}pwd{enter}\n    Else\n        SendInput guest{tab}pwd{enter}\n#IfWinActive\nReturn\n<\/code><\/pre>\n<h1>Extras<\/h1>\n<p><b>Stuff that came into being during the making of this post<\/b><\/p>\n<ul>\n<li><a href=\"\/assets\/blog-images\/autohotkey-login-form.html\">Test Form Html Page<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A simple Autohotkey use case you can start using in your application right away:<br \/> Filling in an entire form with predefined values.<\/p>\n","protected":false},"author":1,"featured_media":2094,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[19],"tags":[36],"class_list":["post-1625","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-productivity","tag-autohotkey"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Autohotkey Use Case: Submitting a Form - Itenium<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Autohotkey Use Case: Submitting a Form - Itenium\" \/>\n<meta property=\"og:description\" content=\"A simple Autohotkey use case you can start using in your application right away: Filling in an entire form with predefined values.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/\" \/>\n<meta property=\"og:site_name\" content=\"Itenium\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-30T23:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-28T12:31:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"360\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Usdevelop\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Usdevelop\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/\",\"name\":\"Autohotkey Use Case: Submitting a Form - Itenium\",\"isPartOf\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg\",\"datePublished\":\"2019-01-30T23:00:00+00:00\",\"dateModified\":\"2025-11-28T12:31:45+00:00\",\"author\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022\"},\"breadcrumb\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg\",\"contentUrl\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg\",\"width\":360,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/demo.sidekick.be\/itenium\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Autohotkey Use Case: Submitting a Form\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#website\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/\",\"name\":\"Itenium\",\"description\":\"We build software. We build careers.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/demo.sidekick.be\/itenium\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022\",\"name\":\"Usdevelop\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g\",\"caption\":\"Usdevelop\"},\"sameAs\":[\"https:\/\/demo.sidekick.be\/itenium\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Autohotkey Use Case: Submitting a Form - Itenium","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Autohotkey Use Case: Submitting a Form - Itenium","og_description":"A simple Autohotkey use case you can start using in your application right away: Filling in an entire form with predefined values.","og_url":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/","og_site_name":"Itenium","article_published_time":"2019-01-30T23:00:00+00:00","article_modified_time":"2025-11-28T12:31:45+00:00","og_image":[{"width":360,"height":300,"url":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg","type":"image\/jpeg"}],"author":"Usdevelop","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Usdevelop","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/","url":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/","name":"Autohotkey Use Case: Submitting a Form - Itenium","isPartOf":{"@id":"https:\/\/demo.sidekick.be\/itenium\/#website"},"primaryImageOfPage":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage"},"image":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage"},"thumbnailUrl":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg","datePublished":"2019-01-30T23:00:00+00:00","dateModified":"2025-11-28T12:31:45+00:00","author":{"@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022"},"breadcrumb":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#primaryimage","url":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg","contentUrl":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/productivity.jpg","width":360,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/productivity\/autohotkey-use-case\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/demo.sidekick.be\/itenium\/"},{"@type":"ListItem","position":2,"name":"Autohotkey Use Case: Submitting a Form"}]},{"@type":"WebSite","@id":"https:\/\/demo.sidekick.be\/itenium\/#website","url":"https:\/\/demo.sidekick.be\/itenium\/","name":"Itenium","description":"We build software. We build careers.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/demo.sidekick.be\/itenium\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022","name":"Usdevelop","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g","caption":"Usdevelop"},"sameAs":["https:\/\/demo.sidekick.be\/itenium"]}]}},"_links":{"self":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/comments?post=1625"}],"version-history":[{"count":3,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1625\/revisions"}],"predecessor-version":[{"id":2303,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1625\/revisions\/2303"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/media\/2094"}],"wp:attachment":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/media?parent=1625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/categories?post=1625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/tags?post=1625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}