In my version of trail files for WF3 with educational license, a close window looks like this:
~ Select `main_dlg_cur` `MenuBar1` \
1 `File`
~ Close `main_dlg_cur` `MenuBar1`
~ Activate `main_dlg_cur` `File.psh_close_win`
Though if you are writing the trail file yourself (to run in no graphics mode) you can lose those menu commands and just close the active window like this:
~ Activate `main_dlg_cur` `File.psh_close_win`
Similarly, a "Close ProE"/Exit looks like this:
~ Select `main_dlg_cur` `MenuBar1` \
1 `File`
~ Close `main_dlg_cur` `MenuBar1`
~ Activate `main_dlg_cur` `File.psh_exit`
~ FocusIn `UI Message Dialog` `yes`
~ Activate `UI Message Dialog` `yes`
But I believe it will work with just the following two lines:
~ Activate `main_dlg_cur` `File.psh_exit`
~ Activate `UI Message Dialog` `yes`
Don't forget to let ProE know when it's the end of the trail file:
!End of Trail File
Most lines with "!" at the start are comments but I think it's best to leave the end oftrail filecomment there and THE TRAIL FILE WILL NOT RUN without the first line which on mine is:
!trail file version No. 1350
But the "!" are good ways of leaving comment in the trail file if you are using for automation.
< 0 1.127111 1445 0 0 951 1920 0 0 1200 13
Are possibly mouse movements, but the trail files work just as well without them. (Usually, keep a back up just in case you delete too much!)
When things are continued on seperate lines, the first line has a \
at the end of it, to tell proE it's continued, e.g.
~ Input `new` `InputPanel1` \
`0001_STA`
Where it's slowly typing a dialogue box with a name in it. You can get rid of most of them too.
e.g.:~ Input `new` `InputPanel1` \
`0001_S`
~ Input `new` `InputPanel1` \
`0001_ST`
~ Input `new` `InputPanel1` \
`0001_STA`
~ Input `new` `InputPanel1` \
`0001_STAI`
can be replaced with just the final two lines:
~ Input `new` `InputPanel1` \
`0001_STAI`
Wheel and button clicks are also recorded, but are generally just scrolling or zooming so can also go:
~ Wheel `main_dlg_cur` `proe_win` \
9 265 373 458752 0 1529 947 1920 1200 302375
Same with:
~ LButtonArm `main_dlg_cur` `proe_win` \
9 367 44 0 1 1529 947 1920 1200 312063
~ Move `main_dlg_cur` `proe_win` \
9 367 44 0 1 1529 947 1920 1200 312078
~ LButtonDisarm `main_dlg_cur` `proe_win` \
9 367 44 0 0 1529 947 1920 1200 312172
Here's a final automation trail file I did for uploading new parameters for a design varient that a sales rep can email in. It works in conjunction with a config.pro file to maintain the paths whilst in ProE, a set of pre-existing models (with relationships programmed in), a Microsoft Outlook Macro, which saves the body of an email as a text file in the required path then changes a string of charactors in the trail file to a specific set from the email and finally calls ProE in the nographics mode to run the trail file before waiting for the PDF file to be written and then emailing it back to the sales rep.
All pretty simple stuff. Don't include the "=====" in the text file if you are running anything based on this.
-AS
========================
!trail file version No. 1350
!(c)2007 id2m, University of Liverpool written by Andy Southern
!mem_use INCREASE Blocks 14491, AppSize 93577864, SysSize 93734096
#DRAWING
#RETRIEVE
C:\ProE_filrs\generic_stll_ga.drw
~ Select `main_dlg_cur` `PHTLeft.AssyTree` \
1 `node0`
~ RButtonArm `main_dlg_cur` `PHTLeft.AssyTree` \
`node0`
~ Activate `main_dlg_cur` `OpenModel`
~ Activate `main_dlg_cur` `Utilities.psh_rels`
~ Activate `relation_dlg` `PBRead`
~ Activate `file_open` `Ph_list.Filelist` \
1 `1002_stll_param.txt`
~ Activate `relation_dlg` `TBVerify`
~ Activate `UI Message Dialog` `ok`
~ Activate `relation_dlg` `PBRead`
~ Activate `file_open` `Ph_list.Filelist` \
1 `stll_rel.txt`
~ Activate `relation_dlg` `PB_OK`
~ Activate `main_dlg_cur` `ProCmdRegenAuto.edit_t`
~ Select `main_dlg_cur` `PHTLeft.AssyTree` \
1 `node2`
~ Activate `main_dlg_cur` `OpenModel`
~ Activate `main_dlg_cur` `File.psh_rename`
~ Select `rename` `RadioGroup1` \
1 `session_only`
~ Activate `rename` `rename`
~ Update `rename` `InputPanel2` \
`1002_STS`
~ Activate `rename` `OK`
~ Activate `UI Message Dialog` `ok`
~ Activate `main_dlg_cur` `File.psh_close_win`
~ Select `main_dlg_cur` `PHTLeft.AssyTree` \
1 `node1`
~ Activate `main_dlg_cur` `OpenModel`
~ Activate `main_dlg_cur` `File.psh_rename`
~ Update `rename` `InputPanel2` \
`1002_RS`
~ Select `rename` `RadioGroup1` \
1 `session_only`
~ Activate `rename` `OK`
~ Activate `UI Message Dialog` `ok`
~ Activate `main_dlg_cur` `File.psh_close_win`
~ Activate `main_dlg_cur` `File.psh_rename`
~ Update `rename` `InputPanel2` \
`1002_STLL`
~ Select `rename` `RadioGroup1` \
1 `session_only`
~ Activate `rename` `OK`
~ Activate `UI Message Dialog` `ok`
~ Activate `main_dlg_cur` `ProCmdModelSave.file`
~ Activate `file_saveas` `OK`
~ Activate `main_dlg_cur` `File.psh_close_win`
~ Activate `main_dlg_cur` `File.psh_rename`
~ Select `rename` `RadioGroup1` \
1 `session_only`
~ Update `rename` `InputPanel2` \
`1002_STLL_GA`
~ Activate `rename` `OK`
~ FocusIn `UI Message Dialog` `ok`
~ Activate `UI Message Dialog` `ok`
~ Activate `main_dlg_cur` `ProCmdModelSave.file`
~ Activate `file_saveas` `OK`
~ Activate `main_dlg_cur` `ProCmdModelMkPdf.file`
~ Select `intf_pdf` `PDFMainTab` \
1 `PDFDescription`
~ Update `intf_pdf` `pdf_desc_title` \
`AUTOGEN STLL GA`
~ Update `intf_pdf` `pdf_desc_author` \
`AUTOGEN by AS`
~ Update `intf_pdf` `pdf_desc_subject` \
`DEMONSTRATION OF ProE AUTOMATION`
~ Update `intf_pdf` `pdf_desc_keywords` \
`Just a quick PDF to show what you can achieve with ProE (c)2007 id2m for quotation only`
~ Activate `intf_pdf` `pdf_btn_ok`
~ Activate `main_dlg_cur` `main_dlg_cur`
~ Activate `main_dlg_cur` `File.psh_close_win`
~ Activate `main_dlg_cur` `psh_erase_not_disp`
~ Activate `file_erase_nd` `ok_pb`
~ Activate `main_dlg_cur` `File.psh_exit`
~ FocusIn `UI Message Dialog` `yes`
~ Activate `UI Message Dialog` `yes`
!End of Trail File
========================