I have been trying to figure out have to automate an output file from PCB. I have got the the point of the IPC output but want to change the name and browse for the correct location. I was trying to use o sendkey commands.
I doubt this is the best way to do this but I am new at this and haven't worked with vbscripting that much. Here is the code I am usng. And for some reason the script I am calling this from doen't like the wscript.sleep command so i left that commented out. I have the rest working by looking at scripts from the AATK stuff but unsure how to get the IPC D 356 Generation popmenu (This menu can not be minimized, don't know if that means anything.) to do what I want. As you can see i don't know much about scripting but am trying to learn.
Option Explicit
Dim oWShell
Set oWShell = createobject("WScript.shell")
oWShell.AppActivate "vbreport.exe"
' WScript.Sleep(100)
oWShell.SendKeys "%T"
' WScript.Sleep(100)
oWShell.SendKeys "L"
' WScript.Sleep(100)
oWShell.SendKeys "I"
' WScript.Sleep(100)
oWShell.SendKeys "%R"
' WScript.Sleep(100)
' This part I am not sure how to do as tab doesn't seem to tab it up to the next location and
' then am not sure If I just over write the ipc356.ipc text and browse for the specified location.
'For some reason it skips over this part and just closes the vbreport.exe file.
oWShell.AppActivate "ipc356.exe"
' WScript.Sleep(100)
oWShell.SendKeys "{TAB}"
' WScript.Sleep(100)
oWShell.SendKeys "%O"
' WScript.Sleep(100)
oWShell.AppActivate "vbreport.exe"
' WScript.Sleep(100)
oWShell.SendKeys "%F"
' WScript.Sleep(100)
oWShell.SendKeys "x"
Thanks
Wes