Launch and run a program

Launch and run a program

Anonymous
Not applicable
358 Views
2 Replies
Message 1 of 3

Launch and run a program

Anonymous
Not applicable
I would like to Run a script program called "Autoit" through VBA. At the
moment I find the script file known as a *.au3 then right click on it and
from the context menu select "run" to activate it. Can something be written
in VBA that will acitivate the file? I don't know that much about VBA - . I
know alot more about Visual LISP. help would be be appreciated!
thanks Russ
0 Likes
359 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
you could make a mnu to load the files

John
/Now using findfile to locate the dvb files
//i.e. dvb are located in the same folder as mnu file
***MENUGROUP=Marking
***POP11
[Marking]
[->&Arrows]
[Arrows Intx]^C^C(^c^c(vl-vbaload (findfile
"marking-insert-Arrow-intx.dvb"))(command "-vbarun"
"Module1.loadarrowsintx")
[<-Arrows by Number]^C^C(^c^c(vl-vbaload (findfile
"marking-insert-Arrow.dvb"))(command "-vbarun" "Module1.loadarrows")
[--]



"Kiwi Russ" wrote in message
news:5633288@discussion.autodesk.com...
I would like to Run a script program called "Autoit" through VBA. At the
moment I find the script file known as a *.au3 then right click on it and
from the context menu select "run" to activate it. Can something be written
in VBA that will acitivate the file? I don't know that much about VBA - . I
know alot more about Visual LISP. help would be be appreciated!
thanks Russ
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hi,

It's not really a good idea to use VBA to run scripts.

I've never thought of this a problem solution, so haven't looked for ways to
do it.

I'd expect VBA will be able to start the script with something like:

strCommand = "Script" & vbcr & "Autoit" & vbcr
ThisDrawing.SendCommand strCommand

However, without sophisticated programming, VBA will not know when the
script finishes, so it will continue on with its own code. This won't
matter if running the script is the last thing the VBA code does.

You may be better to code the actions of the script into the VBA program
itself, or run the VBA followed by the script from a menu command.

--

Laurie Comerford
CADApps
www.cadapps.com.au
www.civil3Dtools.com

"Kiwi Russ" wrote in message
news:5633288@discussion.autodesk.com...
I would like to Run a script program called "Autoit" through VBA. At the
moment I find the script file known as a *.au3 then right click on it and
from the context menu select "run" to activate it. Can something be written
in VBA that will acitivate the file? I don't know that much about VBA - . I
know alot more about Visual LISP. help would be be appreciated!
thanks Russ
0 Likes