Shin003 Posted October 10, 2012 Share Posted October 10, 2012 Hello all,I am trying to automate making PDF files from PDF writer. I am using a software similar to AutoCAD or any other CAD software where I need to print different views with PDF writer.I manage to write a script within the CAD software to display certain features and send the view to Adobe Writer. The save file as window pops and this is where I get stuck.1. I like to select the path to save to where I have opened the CAD file.2. I like to have the name of it specific to the view I am displaying.Run ("allegro.exe")WinActivate ("Allegro PCB Performance")WinWait ("Allegro PCB Performance")Send ("Open {ENTER}") Allows me to select and open fileWinWaitActive ("[CLASS:#32770]")WinWaitNotActive ("[CLASS:#32770]")Send ("replay tmp.scr {ENTER}") tmp.scr is CAD software script that lets me change the viewsWinWaitActive ("Save PDF File As")WinActivate ("Save PDF File As")Is all I got. As you can probably tell I have no idea what I am doing and just to get this far took me a whole day... How do I specify @workdir? How do I copy/paste some text? are some of the questions I have which seemed like it's shown on the help documentation, but I cannot figure out.I tried looking through the help documentation, but it's really hard to find what I am looking for maybe because I have no experience with any of this.If anyone can guide me into the right direction I would greatly appreciate it. Link to comment Share on other sites More sharing options...
water Posted October 10, 2012 Share Posted October 10, 2012 How do I specify @workdir?You want to save the PDF file in @workdir?How do I copy/paste some text?Have a look at ClipPut and ClipGet. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Shin003 Posted October 10, 2012 Author Share Posted October 10, 2012 You want to save the PDF file in @workdir?Yes, but when the PDF save as pops up it goes to the folder I last saved PDF at rather than where the file I open is located.Have a look at ClipPut and ClipGet.I will take a look at this. Thank you. Link to comment Share on other sites More sharing options...
Shin003 Posted October 10, 2012 Author Share Posted October 10, 2012 I guess I need to know how to clipGet the @workDIR path also. Link to comment Share on other sites More sharing options...
water Posted October 10, 2012 Share Posted October 10, 2012 What do you want to do with ClipGet/ClipPut? If you want so pass @workdir to PDF writer simply use Send. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Shin003 Posted October 10, 2012 Author Share Posted October 10, 2012 What do you want to do with ClipGet/ClipPut? If you want so pass @workdir to PDF writer simply use Send.Can I use @workingdir with Send so that if it's opened in different folder it'll change where it would save? PDF writer will only pop open on the last location it saved at right now and not in current working directory. Link to comment Share on other sites More sharing options...
water Posted October 11, 2012 Share Posted October 11, 2012 This depends on PDF writer. If you can input the path & filename then you can pass @workdir and path using Send. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Shin003 Posted October 11, 2012 Author Share Posted October 11, 2012 It does allow path and name, but the location I want to save to is different for each project. So I am assuming if I wrote in the path in with Send it would not allow me to change/select the location in the project folder. Also is there a wild card characters in AutoIt? I was trying to run Run ("allegro.exe") that would also open the file at the same time in the working folder. Naming of the file goes something like 1234GT.brd where 1234 varies by project, but GT.brd is fixed. I was wondering if I can bypass manually selecting the file using a wild card character if there is only one file that has similar naming. Link to comment Share on other sites More sharing options...
water Posted October 11, 2012 Share Posted October 11, 2012 Just create a string containing the path and filename and send it to PDF Writer. Example $sProject = "1234GT.brd" $sSaveLocation = @WorkDir & "\" & $sProject ; @WorkDir is the working directory of the AutoIt Script! Send($sSaveLocation) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now