Calling Script:
Code: Select all
Record_Number := 155
DatabaseFilename := "C:\My databases\The Folder that I Want\The File That I want.xlxs"
AppendRecord := True ; Set to false to create a new record if it exists already
FileToParseForRecord := "X:\Network Folder 1\File Folder 103\Record Set.dat"
;A)
RunWait, C:\AutoHotKey Scripts\My Parsing Script.ahk %Record_Number% %DatabaseFilename% %AppendRecord% %FileToParseForRecord%
;B)
RunWait, C:\AutoHotKey Scripts\My Parsing Script.ahk %1% %2% %3% %4% %Record_Number% %DatabaseFilename% %AppendRecord% %FileToParseForRecord%
;C)
RunWait, C:\AutoHotKey Scripts\My Parsing Script.ahk %Record_Number% %DatabaseFilename% %AppendRecord% %FileToParseForRecord% 155 "C:\My databases\The Folder that I Want\The File That I want.xlxs" True "X:\Network Folder 1\File Folder 103\Record Set.dat"
Called Script:
Code: Select all
global
Record_Number := A_Args[1]
dFilename := A_Args[2]
aRecord := A_Args[3]
rFileName := A_Args[4]
MsgBox % "Database is supposed to be " dFilename
If !FileExist(dFilename)
{
MsgBox % dFilename " wasn't found."
}
I've read through this and found:
which makes me scratch my head if this even applies since I can get the parameters to pass using C) above.Known limitation: dragging files onto a .ahk script may fail to work properly if 8-dot-3 (short) names have been turned off in an NTFS file system. One work-around is to compile the script then drag the files onto the resulting EXE.
Just for giggles and grins, I've tried changing DatabaseFilename to an arbitrary filename that also has spaces, but when MsgBox displays that variable, I'm getting garbage characters preceding the "C:\" .
As for C) above, If I needed this to be more dynamic, how would I go about setting it up so that spaces work?