Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra Basic $Include Question

Status
Not open for further replies.

RPEN

Programmer
Aug 23, 2007
33
CA
Here's my problem:

I am creating a drop down list by searching through several folders for any macros that are stored there. The macros are stored in an array and then presented via a dropdown list. The user then picks one of the macros from the list.

I then take the name of the macro that was selected and use the Shell command to run the macro:


Code:
macroname = "ebrun.exe " + Filenames(FileChosen)
rc& = Shell (macroname,4)

The problem is that I can't use $Include in the macros that are run via the Shell command. I want to include a header file that contains global variables. If I add the Include, the macro doesn't run. Without the Include, it works fine.

Anyone know why this is, or how I can run the macro without using the Shell command?
 
What do your $include's look like? Are you using the full path? If not, is ebrun.exe in the same location as those includes? If not, that's probably the problem. Your scripts are looking for an include in the ebrun.exe folder, rather than their own folder.
 
Are you creating a stand alone app? You may be better off passing a reference to the Extra.object and calling macros that way.
 
Skie, I think you're right, that was probably it. I ended up using global variables to pass the info to the called macro.

CompuDork, do you have an example of running a macro the way you're suggesting?

btw, I ended up posting this question in the "Home>Forums>MIS/IT>Inter-Connectivity Gateways>Attachmate Solutions" forum, seems to be more activity there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top