Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active April 26, 2021 15:47
Show Gist options
  • Save JoeGlines/0e0b5279d2daaebfb815d1fe6b6482fd to your computer and use it in GitHub Desktop.
Save JoeGlines/0e0b5279d2daaebfb815d1fe6b6482fd to your computer and use it in GitHub Desktop.
Simplify and clean-up the name from the file path
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
#Include <default_Settings>
;**************************************
SplitPath, Clipboard,,,,name
RegExMatch(name,"(.*\d)_(.*)",myname)
string:=myname1 A_Space StrReplace(myname2,"_"," ")
Sleep, 50
Send %string% ;Send cleaned text
;~ msgbox % SubStr(Clipboard,Instr(Clipboard,"a",,0)+1) ;strip everything from the last \ to the right
;~ msgbox % SubStr(Clipboard,Instr(Clipboard,"\",,0)+7,-4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment