Auto get explorer path
Don't working in Desktop, if someone can help to inprove this, it will be welcome
Slava Ukraine
Code: Select all
#SingleInstance Force
Exit
getRandom(){
s := (s := "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z") "," s "," s
Sort, s, Random D,
i := SubStr(StrReplace(s, ","), 1, 4)
return i
}
getPath(){
ControlGetText, var, ToolbarWindow323, A
;English windows version has to change "Endereço: " to "Adress: "
var2 := StrReplace(var, "Endereço: ")
Return var2
}
F1:: ; F1 hotkey
; new txt file random name without prompt
; fullPath := getPath()
; random := getRandom()
; FileAppend, This is a blank line`n, %fullPath%\Novo-%random%.txt
; new file with prompt filename and extension prompt
random := getRandom()
fullPath := getPath()
InputBox, fileName, Type the file name, Type filename with extension (file.txt), ,,,,,,,file-%random%.txt
FileAppend, This is a blank line`n, %fullPath%\%fileName%