AutoHotkey - AHK - My fav scripts

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ก.ค. 2024
  • #AHK #AutoHotkey #Automation #Favorite
    Some of my favorite AutoHotkey scripts. Automate anything with AutoHotkey.
    All scripts are located on GitHub Wiki Page:
    github.com/how-to-work-from-h...
    00:00 - Introduction
    00:14 - Keyboard shortcut Matrix
    00:53 - Reload the .ahk script file
    01:53 - Text replacement for most used keywords
    04:00 - Print User ID, IP address, and Computer name
    04:33 - Print dash lines
    04:58 - Microsoft Office AutoCorrect Entries in lowercase
    05:33 - Microsoft Office AutoCorrect Entries in uppercase
    05:50 - SQL Shortcuts
    06:41 - Date/Time Stamps
    09:55 - Msgbox Greeting - Current Date and Time
    10:37 - Print Days of Week
    11:24 - Print Months of Year
    11:57 - Print alphabet a-z | A-Z
    12:19 - Print numbers
    12:50 - Launch applications
    13:45 - Open multiple webpages in Firefox
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 123

  • @robimegu3712
    @robimegu3712 3 ปีที่แล้ว +9

    This is a nice video! I love the concept that you start with ] character. There is no confuses when you write a plain text or an „ .ahk command ”.
    Great job! I want to see more content from you!

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +3

      Hi @Robi Megu, thanks for the kind words, I really appreciate it! Yeah, the concept of using the ] character makes it easy for me to know that it is tied to a .ahk command 😎. I will add more content down the road, stay tuned, and thanks for your support!

  • @sameerasw
    @sameerasw ปีที่แล้ว +3

    Never knew I had such power with using AHK!!!!!!!!!!! thank you.

  • @polymyxa8233
    @polymyxa8233 ปีที่แล้ว +3

    The best tutorial for autohotkey on youtube. Thank you!!!

  • @stephen7185
    @stephen7185 2 ปีที่แล้ว +4

    The concept that drove your sql hotkey saves my life. I have hundreds of lines of code from multiple languages that can all be accessed instantly using hotsrings. Id hate to image where I'd be without it.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      Yeah, I would be lost without AHK. It sure saves me a lot of time 😎

    • @JoeGlines-Automator
      @JoeGlines-Automator 2 ปีที่แล้ว +2

      I"ve always said "HotStrings are the hidden gems in AutoHotkey". They're a total live saver!

  • @wehaveablameonworld
    @wehaveablameonworld 4 หลายเดือนก่อน +2

    your channel is impresive!

  • @prashantkumarkatariya1646
    @prashantkumarkatariya1646 3 ปีที่แล้ว +3

    great work man you have done great job brother thank you

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      I am happy you like the video, and thank you for the kind comment! 😎

  • @3d_pablo
    @3d_pablo 2 ปีที่แล้ว +3

    thx for this, learned a couple of neat tricks!

  • @haydar_kir
    @haydar_kir 2 ปีที่แล้ว +1

    Thanks. Date time will be very useful for me at work.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      You are welcome! I use the date/time function everyday at work. It’s so much easier to type few letters and get the date/time stamp. Saves me a lot of time.

  • @TABNationAutomation
    @TABNationAutomation 2 ปีที่แล้ว +1

    Love making these videos myself with ahk on my channel. keep it up great stuff.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Thanks and AHK is fun once you start playing with it 😎

  • @saguoranx
    @saguoranx ปีที่แล้ว +1

    Good introduction for new AutoHotKey player like myself.

  • @AdrianR.Cabornay
    @AdrianR.Cabornay ปีที่แล้ว +1

    Very very useful, thank you👍.

  • @MohammadTawaha
    @MohammadTawaha 2 ปีที่แล้ว +1

    Nice, really Thanks

  • @wayarberry
    @wayarberry 3 ปีที่แล้ว +2

    Thanks much. Very practical and clear presentation.

  • @kenmosholder1935
    @kenmosholder1935 6 หลายเดือนก่อน +1

    Thank You!

  • @JoeGlines-Automator
    @JoeGlines-Automator ปีที่แล้ว +1

    AutoHotkey is crazy powerful!

  • @Ginematic
    @Ginematic 6 หลายเดือนก่อน +1

    In AutoHotkey v2 you can use Reload function binded to any key, in order to reload a script.

  • @Gusrikh1
    @Gusrikh1 3 ปีที่แล้ว +2

    Very helpful. Thank you.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว

      You’re welcome. Glad you found it helpful 😄

    • @Ar-cn9eo
      @Ar-cn9eo 3 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA hi

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว

      Hey there @Ar7 Gaming!

    • @Ar-cn9eo
      @Ar-cn9eo 3 ปีที่แล้ว

      @@HowToWorkFromHomeUSA Hi
      very helpful video!!!!!!!!!

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว

      Awesome! I’m happy you found it helpful 🥳

  • @veejayforever06
    @veejayforever06 3 ปีที่แล้ว +1

    Excellent

  • @_.........................._
    @_.........................._ ปีที่แล้ว +2

    ⭐This method can be easily managed with a software called Beeftext. In addition, you can embed shortcut keys in the text and specify the final position of the mouse cursor, such as when adding parentheses. In addition, the clipboard returns to the one before sending properly.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว

      Thanks for your comment 😎

    • @makscilic5624
      @makscilic5624 ปีที่แล้ว

      GREAT I needed smith to make a recoil control in CSGO n valorabt

  • @johnv3788
    @johnv3788 ปีที่แล้ว +1

    Can you have a separate document that you can call to input a large amount of text? Like say I have a bunch of 10 - 15 line text documents I use for documentation, could I have AHK output them without making my ahk file a mile long?

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว +1

      Hi! You can call any document or other AHK script from within a AHK script. You just have to point to it. Let me know if that helps! 😎

  • @justsurfin5013
    @justsurfin5013 2 ปีที่แล้ว +1

    Like the date time stuff. Great for my job as I use dates a lot in document names and folder names. Now I tried to come up with a way to autoinclude subscript in the dates (example: substitute 'May 01' with 'May 1st', 02 with 2nd, etc). Other than a long series of IF statements could not come up with anything.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      Awesome! Glad it helps your work. As far as appending the 1st, 2nd, 3rd the only thing that comes to mind is using If/Else statements haha

  • @bobotube76
    @bobotube76 ปีที่แล้ว +1

    Hello! I want to change my writing language from English to Bulgarian with AHK. How can I do this and change the color of the taskbar at the same time? I found a script that changes the typing language using CapsLock. But his keyboard light won't turn on.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว +1

      Hi! I don’t think you can change the function names to a different language. But I may be wrong. I am not sure what you mean by changing the color of the taskbar? Usually changing the appearance of the taskbar is done through the Settings in Windows. Thanks for your comment 😎

  • @thepragmatic6383
    @thepragmatic6383 2 ปีที่แล้ว +1

    What application are you using to display the keys on the screen?
    Is it a standalone application or is it incorporated into your editing software?
    Do you have to add them manually when editing the video, or is it automatic?
    Thank you very much, your video is done in a very professional way.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Hi there! I am using Camtasia for editing and recording, and it has the capability to insert the keys. Also, I have to manually add the keys while editing the video. Thanks for your support and kind words!

  • @CarlosMartinez-ps1je
    @CarlosMartinez-ps1je 2 ปีที่แล้ว +1

    Can you help me create a script to "reload" the script after I've made changes? Thanks.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Hi Carlos, if I understood your question correctly, then there are multiple ways of accomplish this.
      Say you have a master.ahk file, and you make changes in that file, you can create a reload function within the file and assign a Shortcut key. For example:
      F10::
      Run, “%A_ScriptFullPath%”
      Return
      The script above will reload the file when pressing the F10 key.
      Hope this helps 😎

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Hi Carlos, I thought of something else you can try. You can create a AutoHotkey file called something like ReloadAll.ahk and in that file you can list all the .ahk files you would like to reload. For example:
      Run, "C:\Users\UserName\Documents\AutoHotKeyFile1.ahk"
      Sleep, 10
      Run, "C:\Users\UserName\Documents\AutoHotKeyFile2.ahk"
      Return
      The above script will reload AutoHotkeyFile1.ahk and AutoHotKeyFile2.ahk.
      Then if you have some kind of Master.ahk file that you use on a regular basis, you can assign a shortcut to call the ReloadAll.ahk file like this:
      ^F10::
      Run, "C:\Users\UserName\Documents\ReloadAll.ahk"
      Now, say your Master.ahk file is running in the background, you can press CTRL + F10 keys, and that would call the ReloadAll.ahk file, which in turn would reload the two other .ahk files.
      Hope this makes sense. Thanks :)

  • @abhisheksrivastava3787
    @abhisheksrivastava3787 2 ปีที่แล้ว +1

    Please share the code to open specific websites, by opening and grouping those tabs in edge/chrome.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      Hi Abhishek, try this:
      For Chrome:
      Run, chrome.exe msn.com/ www.cnn.com/ www.nytimes.com/
      Return
      For Edge:
      Run, msedge.exe msn.com/ www.cnn.com/ www.nytimes.com/
      Return

    • @abhisheksrivastava3787
      @abhisheksrivastava3787 2 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA Hi, thanks. This will open multilple in tabs, that I know.
      I want to open those websites and group those tabs automatically, in an organized manner.
      E.g personal group-TH-cam/social media etc
      Work tab- trading terminals, charting websites
      Mailing tab- Gmail/Outlook etc
      Like Opening selected collections in Edge to launch automatically.

  • @squirtlesmells8174
    @squirtlesmells8174 3 ปีที่แล้ว +1

    How would I create a hotkey that would automatically scroll on my 2nd monitor when I press a hotkey? (Ex. I press L 2 times and the page on my second monitor scrolls down)
    I tried making my own hotkey, but it would only scroll down when I was focused on the window, but I want it to work even when I'm not focused on my 2nd monitor
    :*:LL:: WheelDown

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      Hi there! I can take a look at your request and get back to you once I figure out the script. Thanks for watching!

    • @squirtlesmells8174
      @squirtlesmells8174 3 ปีที่แล้ว

      @@HowToWorkFromHomeUSA Any luck?

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      No, I’ve been busy lately, but I’ll keep it on my to to list.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      Are you wanting to scroll a specific application on your second monitor? If so, that approach may be easier because there’s a function in autohotkey to focus on the application/window and then it can send the WheelDown command. If you’re wanting to scroll any app/window on the second monitor, then that may be more challenging. Let me know. Thanks!

    • @squirtlesmells8174
      @squirtlesmells8174 3 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA Yea when I'm playing a game or doing some work on my main monitor, I like reading on my 2nd monitor. I use the brave browser which is basically just google chrome, but better.

  • @iamwakeen
    @iamwakeen ปีที่แล้ว +1

    Hello, complete newbie to AHK here. I was wondering if there was a script that can be used to control individual application volume via knobs (e.g. one knob control main volume, another controls Spotify etc.)

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว +1

      Hello there! Thanks for your comment. I will look into your question and get back to you when I find out more. Thanks 😎

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว +2

      Hi there, I couldn’t find anything that would do what you asked. I am not sure if that’s possible using AHK. You can try QMK/VIA software to try to remap the keys/knobs functions of your keyboard. Not all keyboards are QMK programmable. Thanks 😎

    • @100Bucks
      @100Bucks ปีที่แล้ว +2

      I can try to help you. I'll try my best. For normal button change to make a volume button. Example if you wanted Left arrow to do volume down. You would write the script like this.
      left::
      sendinput {volume_down}
      return
      The way you want is individual apps. You would have to use this.
      #If WinActive , your app goes here
      Look on TH-cam for a more clear explanation. You get the app name by hovering the mouse over the app with windows spy.
      So whatever script you wrote with the (#If) it will only be affective on that specific app.
      This is what I use the most for everything.
      #if getkeystate ("shift", "P")
      w::
      send have a nice day{!}
      #if
      return
      The hotkey "w" will only work if "shift " is held down.
      Hoped this help you.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  ปีที่แล้ว +2

      Here's an idea to control the volume based on application Play around with it. Hope it helps!
      ; Define your preferred volume increment
      VolumeIncrement := 5
      ; Define the keyboard shortcut for volume control
      ^Up::
      {
      ; Check if Spotify is the active window
      IfWinActive, ahk_exe Spotify.exe
      {
      ; Send volume up command to Spotify
      Send {Volume_Up}
      }
      else
      {
      ; Send volume up command to main volume
      Send {Volume_Up}
      }
      return
      }
      ^Down::
      {
      ; Check if Spotify is the active window
      IfWinActive, ahk_exe Spotify.exe
      {
      ; Send volume down command to Spotify
      Send {Volume_Down}
      }
      else
      {
      ; Send volume down command to main volume
      Send {Volume_Down}
      }
      return
      }
      ; You can modify the above code to customize the volume control behavior
      ; based on your preferences or specific requirements.

    • @iamwakeen
      @iamwakeen ปีที่แล้ว

      Thank you guys for your responses, really appreciate them! I'll try them out once I begin building my first macropad :)

  • @justforyou9271
    @justforyou9271 3 ปีที่แล้ว +1

    Kindly share as soon as possible 🙆

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      Here are the scripts: github.com/how-to-work-from-home/autohotkey/wiki/AutoHotkey-AHK-My-fav-scripts

  • @user-pl9yq3fc8u
    @user-pl9yq3fc8u 3 ปีที่แล้ว +1

    could you help me out pls, i cant seem to get this script to work, this is my first doing any type of coding
    x := 1
    while (x > 0)
    {
    t::7
    e::5
    v::e
    }
    return
    F4::
    x := x*-1
    return

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +2

      Hi there! What are you trying to accomplish with the script?

  • @Gmovies699
    @Gmovies699 3 ปีที่แล้ว +1

    Hello, may you help me for a autohotkey script?
    I am trying to make a autohotkey for excel for jump in excel sheets tabs. If you can plz send me yes. Or send idea.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว

      Hi there, what exactly are you trying to do in Excel with AutoHotkey? I need a better idea of what you are trying to accomplish. Thanks! 😎

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      You can jump between different Excel Tabs by using the CTRL + Page Up or CTRL + Page Down keys.

  • @Russels_Viper
    @Russels_Viper 7 หลายเดือนก่อน +1

    Hello there,
    I am trying to use a simple script to replace '

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  7 หลายเดือนก่อน +1

      Hi @Russels_Viper, try this option. ::

    • @Russels_Viper
      @Russels_Viper 7 หลายเดือนก่อน +1

      @@HowToWorkFromHomeUSA can you tell why mine is not working.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  7 หลายเดือนก่อน +1

      Maybe because you’re missing :: infront of the < sign.

    • @Russels_Viper
      @Russels_Viper 7 หลายเดือนก่อน +1

      @@HowToWorkFromHomeUSA Thank you

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  7 หลายเดือนก่อน

      You’re welcome. I just tested this on my computer and this script worked. ::

  • @Kiwin412
    @Kiwin412 3 ปีที่แล้ว +1

    I have a question Sir, where are the settings to have a color scheme on Notepad for .ahk files ?

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +2

      Hi Kiwin, in Notepad++ you can go to Language at top menu bar, then A -> then select AutoIt and it will set the color syntax. Or you can checkout this link on how to download the .xml syntax highlighting: stackoverflow.com/questions/45466733/autohotkey-syntax-highlighting-in-notepad

    • @Kiwin412
      @Kiwin412 3 ปีที่แล้ว +1

      Thanks! I just started to write my own scripts and this is very helpful for debugging

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +2

      Yeah for sure! It’s helpful when you have the color scheme. Take care and thanks for watching!

  • @yuvi-choudhary
    @yuvi-choudhary 2 ปีที่แล้ว +1

    Can u tell me how to fill form using autohotkey in web!!

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      It depends on what browser you use. I played around Internet Explorer a bit but don’t have too much knowledge on that subject

    • @yuvi-choudhary
      @yuvi-choudhary 2 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA ok thnx dude for ur reply !!

    • @yuvi-choudhary
      @yuvi-choudhary 2 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA ok can u help me out .....how to go to particular element on web page .....do I need to use library for it ?

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Right click on the particular form/box, then select Inspect Element, and from there you can figure out what element to use. As I mentioned, I played with it a little bit but don’t have working knowledge on how to use it. 😎

    • @yuvi-choudhary
      @yuvi-choudhary 2 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA ok thnx a lot !!

  • @zvit
    @zvit 2 ปีที่แล้ว +2

    Not sure why you have such long code. For example, if you want to type numbers from 1-100 with enters, you can just write a loop in a line or two.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว +1

      Yeah, I realize it’s not the most efficient way of printing 1-100. When I was learning AHK at that time, I didn’t know you could loop. Since then, I built a better way of printing numbers 1-n, which n is set as a variable 😎 but yeah I can see why you pointed out the long code haha. Take care!

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      In case you or anyone else wanted the short AHK script to print 1-100, here it is:
      ::]1-100::
      Loop, 100
      {
      Send %A_Index%{,}
      }
      Return

  • @MrHhs006
    @MrHhs006 5 หลายเดือนก่อน +1

    Is this AutoHotkey ver.2 ?

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  5 หลายเดือนก่อน +2

      I use AutoHotkey Version 1.1.

    • @RungeCarl
      @RungeCarl 2 หลายเดือนก่อน +2

      Good question - please let us know when you update to Vs2

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 หลายเดือนก่อน +1

      Looks like v1.1 is deprecated per www.autohotkey.com page. They have v2.0 to download but I haven’t installed it yet

  • @thethinker6837
    @thethinker6837 3 ปีที่แล้ว +2

    Great Video For productivity👍
    Please share this .ahk file link also.

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +1

      Thank you! I am working on a script sharing repository and will share my .ahk files there. Stay tuned!

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  3 ปีที่แล้ว +6

      Here are the scripts: github.com/how-to-work-from-home/autohotkey/wiki/AutoHotkey-AHK-My-fav-scripts

    • @thethinker6837
      @thethinker6837 3 ปีที่แล้ว +1

      @@HowToWorkFromHomeUSA WOW!! thanks 👍

  • @jerric7267774
    @jerric7267774 3 ปีที่แล้ว +1

    where can i download AHK?

  • @forkuserman_ap
    @forkuserman_ap 2 ปีที่แล้ว +1

    I need the best delay...

    • @HowToWorkFromHomeUSA
      @HowToWorkFromHomeUSA  2 ปีที่แล้ว

      Hey there, not sure what kind of delay you need? Can you please explain?

  • @theo328d
    @theo328d ปีที่แล้ว +4

    3:52 doxxed