 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] Re: Scripting question
| [mathcad] Re: Scripting question |
|
Author: Samir Khan
Posted: Fri, 26 Aug 2005 09:51:28 +0100
|
Mike,
This code I use in a Mathsoft PushButton to run an external DOS program
from within Mathcad.
Sub PushButn_Click()
Set WShell = CreateObject("WScript.Shell")
WShell.run "DOS commands go here",0,True
End Sub
Samir
"Austin, Mike"
<mike.austin@airb
us.com> To
Mathcad Discussion List
25/08/2005 14:57 "mathcad"
cc
Please respond to Subject
"mathcad" [mathcad] Scripting question
ptscience.com
I would like to be able to write an input file, run it with a Dos-based
program and read the output file - preferably as one process from within
Mathcad if possible. I can do the file input and output, but I am not
familiar with object scripting to run an external program. Does anyone have
an example script to run a Dos-based program on the command line and
return? Any Mathcad version will do.
STRESSWORK
Mike AUSTIN
on behalf of AIRBUS-UK
for Department - ESASU
NTC D2 09J
Phone: +44 (0)117 936 2688
Fax: +44 (0)117 936 5474
Mailto: "Mike.Austin"
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
|
| [mathcad] RE: Scripting question |
|
Author: Leslie Bondaryk
Posted: Mon, 29 Aug 2005 14:54:59 -0400
|
Mike, and everyone else,
If you're a registered Mathcad 12 user, you can download the Programming
Ebook from the Mathcad.com downloads section - it's free, and will show
you how to do many common tasks of this sort using scripts. It's also
got many useful Mathcad programs in it. I recommend it as a desktop
resource.
Leslie Bondaryk
~************************************************~
Leslie Bondaryk
Technical Project Manager
Mathsoft Engineering and Education, Inc.
101 Main Street Cambridge, MA 02142
"lbondaryk"
TEL: 617-444-8176 FAX: 617-444-8177
www.mathcad.com
> From: Austin, Mike "mailto:mike.austin"
> Sent: Thursday, August 25, 2005 9:57 AM
> To: Mathcad Discussion List
> Subject: [mathcad] Scripting question
>
>
>
> I would like to be able to write an input file, run it with a
> Dos-based program and read the output file - preferably as
> one process from within Mathcad if possible. I can do the
> file input and output, but I am not familiar with object
> scripting to run an external program. Does anyone have an
> example script to run a Dos-based program on the command line
> and return? Any Mathcad version will do.
>
>
|
| [mathcad] Re: Scripting question |
|
Author: Oakley, Philip SELEX UK
Posted: Mon, 29 Aug 2005 10:03:38 +0100
|
Here is an example file of the scripted buttons in Version 11.
I have done Notepad, Calculator, and a batch file. Plus a trimmed down file reading script.
Philip
The documentation for VBscript is at http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
|
|
Attachments:
Dos Script_V11.mcd
|
| [mathcad] RE: Scripting question |
|
Author: Austin, Mike
Posted: Wed, 31 Aug 2005 14:21:39 +0100
|
Thanks Leslie.
I had downloaded the solve, ode and program handbooks in March but never installed them!
Having installed them, I found problems. I copied the files into the "C:\Program Files\Mathsoft\Mathcad 12\Handbook" directory. This allows them to appear on the Ebook list under Help. SolveOpt.hbk, ODEblock.hbk were no problem - but Program.hbk was. Whenever I tried to open a file, Mathcad 12 crashed. I renamed Program.hbk to Program2.hbk and the problem cleared. Weird, eh?
STRESSWORK
Mike AUSTIN
on behalf of AIRBUS-UK
for Department - ESASU
NTC D2 09J
Phone: +44 (0)117 936 2688
Fax: +44 (0)117 936 5474
Mailto: "Mike.Austin"
From: Leslie Bondaryk "mailto:lbondaryk"
Sent: 29 August 2005 19:55
To: Mathcad Discussion List
Subject: [mathcad] RE: Scripting question
Mike, and everyone else,
If you're a registered Mathcad 12 user, you can download the Programming
Ebook from the Mathcad.com downloads section - it's free, and will show
you how to do many common tasks of this sort using scripts. It's also
got many useful Mathcad programs in it. I recommend it as a desktop
resource.
Leslie Bondaryk
~************************************************~
Leslie Bondaryk
Technical Project Manager
Mathsoft Engineering and Education, Inc.
101 Main Street Cambridge, MA 02142
"lbondaryk"
TEL: 617-444-8176 FAX: 617-444-8177
www.mathcad.com
This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message.
|
| [mathcad] RE: Scripting question |
|
Author: Pergande, Albert N
Posted: Wed, 31 Aug 2005 09:34:47 -0400
|
Yeah, I down loaded it last night and when I executed it, everything
went into the temp directory. Then I put it under mathsoft, but the hbk
wouldn't do anything. I could open individual sheets.
Al Pergande
Senior Radar Engineer
Lockheed Martin Missiles and Fire Control
MP 200
5600 Sandlake Road
Orlando, Fl 32819
Voice 407-356-5169
Fax 407-356-0933
"albert.n.pergande"
for personal mail - "al"
From: Austin, Mike "mailto:Mike.Austin"
Sent: Wednesday, August 31, 2005 9:22 AM
To: Mathcad Discussion List
Subject: [mathcad] RE: Scripting question
Thanks Leslie.
I had downloaded the solve, ode and program handbooks in March but never
installed them!
Having installed them, I found problems. I copied the files into the
"C:\Program Files\Mathsoft\Mathcad 12\Handbook" directory. This allows
them to appear on the Ebook list under Help. SolveOpt.hbk, ODEblock.hbk
were no problem - but Program.hbk was. Whenever I tried to open a file,
Mathcad 12 crashed. I renamed Program.hbk to Program2.hbk and the
problem cleared. Weird, eh?
STRESSWORK
Mike AUSTIN
on behalf of AIRBUS-UK
for Department - ESASU
NTC D2 09J
Phone: +44 (0)117 936 2688
Fax: +44 (0)117 936 5474
Mailto: "Mike.Austin"
From: Leslie Bondaryk "mailto:lbondaryk"
Sent: 29 August 2005 19:55
To: Mathcad Discussion List
Subject: [mathcad] RE: Scripting question
Mike, and everyone else,
If you're a registered Mathcad 12 user, you can download the Programming
Ebook from the Mathcad.com downloads section - it's free, and will show
you how to do many common tasks of this sort using scripts. It's also
got many useful Mathcad programs in it. I recommend it as a desktop
resource.
Leslie Bondaryk
~************************************************~
Leslie Bondaryk
Technical Project Manager
Mathsoft Engineering and Education, Inc.
101 Main Street Cambridge, MA 02142
"lbondaryk"
TEL: 617-444-8176 FAX: 617-444-8177
www.mathcad.com
This mail has originated outside your organization, either from an
external partner or the Global Internet. Keep this in mind if you answer
this message.
|
| [mathcad] Re: Scripting question |
|
Author: Mike Austin
Posted: Thu, 1 Sep 2005 01:46:40 +0100
|
In message
<LIST*MANAGER-372271-695491-2005.08.30-11.03.10--mike#gistar.co.uk@lists.
adeptscience.co.uk>, "Oakley, Philip (SELEX) (UK)"
"philip.oakley" writes
>Here is an example file of the scripted buttons in Version 11.
>I have done Notepad, Calculator, and a batch file. Plus a trimmed down
>file reading script.
Thanks Philip.
This runs in Mathcad 11, but I am having problems running any scripts at
all in Mathcad 12. When I load this into Mathcad 12.1, I get "Failed to
launch server application. I cannot even insert scripting controls, even
after a reinstall of Mathcad 12 and SP1. The programming e-book, when it
gets to a scripted object, produces the same error message.
I have unloaded fire walls, anti virus and pest scanners. Maybe somebody
here knows what is wrong? I don't see anything on the collaboratory.
--
Mike Austin
Gistar Ltd
|
Previous by date: [mathcad] Scripting question, Austin, Mike
Next by date: [mathcad] RE: Scripting question, Leslie Bondaryk
Previous thread: [mathcad] RE: AMD platform, Tong, Guang
Next thread: [mathcad] Re: Scripting question, Samir Khan
|
|
|