Jump to content

Automating PDF writer save file as


Shin003
 Share

Recommended Posts

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 file

WinWaitActive ("[CLASS:#32770]")

WinWaitNotActive ("[CLASS:#32770]")

Send ("replay tmp.scr {ENTER}") tmp.scr is CAD software script that lets me change the views

WinWaitActive ("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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...