Can I run a program and interfere with its interface using VBS? Possibly with sendkey/click?

56 Views Asked by At

Im NOT a programmers or engineer whatsoever but im trying to automate some parts of my work. I tried some very basic vbs and it helped me creating some folders and copying files to it. Now im looking a bit further and dont know how to search google for my solution.

So for work i have about 10-15 projects per week. Per project i need to get a few standard PDF's in a folder and create a few specific ones. When all PDF's are gathered i then merge them in PDFsam.exe (because every PDF has the same form but with different information) and then i have one pdf which i can send to my client.

The VBS i am using now creates a new folder "yyyymmdd project A" and moves all single pgae pdf's in there. Now i would really like it if i could make a vbscript that automates the pdfsam portion.

So either something like:

dim wsh
set wsh = Wscript.createobject("Wscript.shell")
wsh.Run """C:\Program Files (x86)\PDFsam Basic\pdfsam.exe"""

wsh.copy.files "all files", pdfsam.exe

'somehow merge all

done!

Or :

dim wsh
set wsh = Wscript.createobject("Wscript.shell")
wsh.Run """C:\Program Files (x86)\PDFsam Basic\pdfsam.exe"""

SendClick 400,500
SendClick 1400,800

'etc.

Is this possible at all, or would this require software to be written? As ive said, im not even a beginner. I just know how to copy something from internet and paste my own path into it...

I am asking for vbs solutions since thats the coding language i "know". If there are other ways that are similar to vbs or that not to advanced, theyre welcome too.

0

There are 0 best solutions below