Author Topic: sendkeysto - long file location and file  (Read 438 times)


  • Newbie
  • *
  • Posts: 9
sendkeysto - long file location and file
« on: May 24, 2018, 08:08:08 am »

I am using Winbatch 2013C.  When I attempt to use the SendKeysTo command to save a new PDF file to a directory on my computer, I get an error. 

The problem is that as the file location and then the name are "typed" across the "Save As" box, the first characters of the location get dropped off.  Since there is no folder on my computer by this name, an error occurs (see attached image.)

Any idea what I can do to get the entire file location AND new file name to appear in the "Save As" box?

Thank you so much!


  • Tech Support
  • *****
  • Posts: 2849
    • WinBatch
Re: sendkeysto - long file location and file
« Reply #1 on: May 24, 2018, 10:36:55 am »
Can't say that I can reproduce your problem with the latest version of WinBatch running on the latest version of Windows but I do recall it coming up before.  The "Save As" dialog is actually a Windows Explorer shell dialog hosted and owned by the Adobe process and main window.  Assuming the input focus is on the dialog's edit box your problem is likely due to some background message processing being conducted by the window.   

You could try delaying the attempt to send keys to the dialog but that is not likely to always be a repeatable solution or you could try using SendKeysTo with past keystrokes to paste the file path into the edit box.  Firing up Roboscripter and creating a Control Manager Extender abased script is another option and may be more successful.

You may also want to read the following post:
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade


  • Newbie
  • *
  • Posts: 22
Re: sendkeysto - long file location and file
« Reply #2 on: May 28, 2018, 08:17:25 am »
I would second TD's suggestion to use the RoboScripter tool in the WinBatch System folder to create a Control-Manager script that will ensure you are sending the data to the correct input field.

It is possible you are not actually sending those keystrokes into the input field until the right character is sent in the path string that jumps the focus into the input field and then the remainder of the characters appear where you want them.

If you need help using Roboscripter, please ask - but there are many examples in the Tech DB.