Jump to content
Macro Express Forums

Can not get a program to be launched by a macro


Recommended Posts

I want to automate the export of Data from Active Desktop Calendar.
Manually I would start by launching the program and selecting the DATA menu - which has an Export Option.
I cannot get my macro to even open the program.

 

To build the macro :
I launch the desired window of ADC so that Macro Express would be able to see it as a 'Running Process',
then select from 'Windows/Programs' :
 
Activate or Launch
Launch Program and Activate Window
or
Program Launch

 

but none of those three will even open the ADC window, so I can make no progress.
The Debug error says "The file could not be located".

 

There is a related problem that the ADC window has title starting with the invariant part
'Active Desktop Calendar' followed by detail highly specific to the day.
Obviously only the invariant part should be coded into the macro.
I feel that 'variables' might deal with eliminating that part of the problem, but cannot begin to think how.

ADCMacro.JPG

Link to comment
Share on other sites

Use Windows Explorer (aka File Explorer) to drill through the user interface to find the location of the executable.

 

Let's assume you find it here... note that I am inventing the path!

 

C:\Program Files (x86)\ADC\binary\adc.exe

Activate or Launch: Window "Active Desktop Calendar -", Program "adc.exe", Parameters ""


<ACTIVATE OR LAUNCH Title="Active Desktop Calendar -" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\Program Files (x86)\\ADC\\binary\\adc.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/>

 

 

Specify the path to the executable, and the partial window title to...

 

to "Active Desktop Calendar -" 

Note the hyphen. There appears to be a hyphen before the date and time in the window title, and I bet it's always there. Make sure to specify "partial match" rather than "exact match."

Link to comment
Share on other sites

Maybe it's only capturing the executable name. Try adding the path. 

Open that "Activate or Launch" command and copy the program part. Type Win+r and paste it into the run dialog box. If it doesn't work there, it's not going to work in MEP. 

I'm unsure of this as I usually manually specify the path and name of the executable. 

 

On another note, check to see what the command line parameters are for your program. You might be able to command an export from there. 

Link to comment
Share on other sites

Acantor - I could not quite understand why you reproduced those two very similar lines, but I gathered enough from your post to delete everything after the hyphen you mentioned, and instead of selecting from RUNNING PROGRAMS, to actually put in the full path in - that produced the required result. For your info I'll include a snip of the code that worked.

ADC macro.JPG

Link to comment
Share on other sites

I'm glad it worked. My message contained two versions of the same line code:

 

1. What you see in the Script Editor (which is easy to read, but may be missing details); and

 

2. What you see in the Direct Editor (which is harder to read, but contains all of the details).

 

You can copy the second version and paste it into the Script Editor. But you can't copy the first version and paste it in the Script Editor.

Link to comment
Share on other sites

Instead of graphics you can copy the text of the commands and paste them into a code box here. There's an option for the display text and the actual code. Then people can paste the code into their macros.

Also creating a macro that demonstrates your problem with a common program like Notepad will get you more answers quickly. Don't include your whole macro, just distill down the problem into a simple demonstration. As few lines of code as possible. BTW, half the time I would do this I would figure out my problem before posting. Usually find out the problem was something else. 

Link to comment
Share on other sites

Sebastian I find your multiple posts for the same issue confusing. We're trying to help, but splitting one topic into 3 things gets confusing.

I have responded to your other threads. It seems you don't appreciate the time I'm putting into helping you.

Link to comment
Share on other sites

I made multiple posts but for NOT the same issue - and deliberately started new threads because in other forums i have been reprimanded for bringing new issues into a thread.

I do appreciate the help i have been given - and have stated so, but as twice before - can not find mention of that in the thread. The macro I was trying to construct now works well, thanks to the various hints I've been given in the forum.

Link to comment
Share on other sites

11 minutes ago, Sebastian42 said:

in other forums i have been reprimanded

 

I participate in one forum that has a "Flame Suit" section -- only enter if you have a tough skin (asbestos recommended) and are willing to hear what people really think -- better believe I have been reprimanded there. 

 

I glad your macro is working now. 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...