I'm using software that need to manually link hundreds of files into excel-like-grid, and I figured out some script that can do this in very basic and rough way:
1. From windowTitle I get customer and order number
2. from row I get part of file name
3. In open dialog i'm placing (pasting) parts of path form drive to file, each time with windows autocomplete and automatch, so it looks like this:
Code: Select all
rfolder := "p:\briwork\january\"
Sleep, 150
Send, %rfolder%%firm%%nrz% ;
Sleep, 100
Send, {Enter}
Sleep, 100
Send, %gr%
Sleep, 50
Send, {Enter}
Sleep, 50
Send, %npg2%
Sleep, 150
Send, {Down}
Send, {Enter}
Sleep, 150
MouseClick, Left
Horrible but efficient.
Now I want to boost this process looping whole function. But problem happens when file doesn't exist - script is sending and pressing Enter's in wrong places
So i figured out that I need to check in the background if file is there - what a problem - I got all the information... do I?
Writing to check if path is right:
Code: Select all
fd := "\"
napv := %rfolder%%firm%%fd%%nrz%%fd%%gr%%fd%%npg2%
MsgBox, %napv%
Why!? What happened? I haven't used "*.dxf" yet... ??? Is this comma?? Separately and combined in windows dialog it works... but here doesn't..