Can AHk guess a file directory using the first characters?
Posted: 14 May 2019, 18:21
Hi everyone. I built a script that can access me into the web directory. We have lots of folders and files, this makes it easy.
And it works!!
but sometimes, people make a typo in the datasheets where I'm pulling the information from, so there is a mismatch in directory path, soo it fails. Obviously.
My question is:
1. Could I get Ahk, to guess the folder based on the first 10-15 characters? (in case there's a typo in the middle)
2. could I add a custom error box, if the directory is off, instead of the normal really long error box that comes up when AHK script isn't working. Something like (Please change the directory to match, and watch for typos) would be a lot more intuitive
for my co-workers instead of the regular error box that has too much technical information.
This is my Script
And Here's an example of what a file looks like
TX07 - 52410 - Orange County Department of Paperclips - SAB North University - 15022 Regular Street Name Ave
Any help would be much appreciated.
And it works!!
but sometimes, people make a typo in the datasheets where I'm pulling the information from, so there is a mismatch in directory path, soo it fails. Obviously.
My question is:
1. Could I get Ahk, to guess the folder based on the first 10-15 characters? (in case there's a typo in the middle)
2. could I add a custom error box, if the directory is off, instead of the normal really long error box that comes up when AHK script isn't working. Something like (Please change the directory to match, and watch for typos) would be a lot more intuitive
for my co-workers instead of the regular error box that has too much technical information.
This is my Script
Code: Select all
!x::
inputbox, userinput, Enter Full Project ID, , ,300 ,100
clipboard = %userinput%
No := SubStr(userinput, 1, 4)
run, B:\Webcam - Projects\%no%\%clipboard%\
return
TX07 - 52410 - Orange County Department of Paperclips - SAB North University - 15022 Regular Street Name Ave
Any help would be much appreciated.