I am not sure if this may be the solution you are looking for, but you can use a variable in the attachment section of your script. The variable can be global to the file or local to the script (difference between $$ and $), though if you do use a global variable, be careful when using it with other scripts.
As an example of what the script may look like :
Set Variable [$attachment; Value: Get (DesktopPath) & "attachment.pdf"]
Send Mail [Send via E-mail Client; To : Email::Recipient; Subject : "Attachment"; Message : Email::Body; "$attachment"]
A custom dialog can be used to set the variable instead, though you may need to use some other method if you're looking for something like File -> Open in terms of a UI interface such as in conjunction with a plugin.
I hope this helps.
You could just clear the "no dialog" option in the send mail script. Then you can attach the file before sending the email and continuing your script.
Gosh guys... you are all making me feel bad for being so stupid... I didn't try clearing the dialog checkbox... good idea... and the custom dialog... yup...
Ok off to feel more stupid! Thanks!