Jump to content
Macro Express Forums

Failure to launch


Recommended Posts

Acantor - my apologies for the mistakes in my previous thread; there was worse which I have not reported upon. The success I reported was an illusion.

So I want to start from scratch with a new title.

When I run a shortcut called SendLeap, it opens a Chrome window. Manually, I can then TAB four times, then press ENTER and the SendLeap App opens in Chrome. I want a macro to do that for me, then I will get a batch file to call that macro and automate the launching of SendLeap at Windows StartUp.

When I 'open file location' for the shortcut, I get "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe"; When I enter that path in the Program tab of 'Launch program and Activate Window' and save the macro and run it, nothing happens.

How can I fix this first step ?

 

 

MacExp.JPG

Link to comment
Share on other sites

I reverted to your original suggestion of using SendLeap.lnk - that launched the required Chrome window. It so turns out that it is a matter of having sufficient delay between the following steps to achieve success. I am now in the process of reducing delays to make it less unwieldy - but the end result I have already achieved. Thank you.

Link to comment
Share on other sites

It looks like your script is using a "Text Type" instruction as a comment. If you are, then your script may be sending keystrokes that might gum up the works.

 

In Macro Express, you can sprinkle a script with comments, you can include comments for individual instructions, or you can do both. If you include a comment with an instruction, make sure the instruction is doing what you want it to do.

 

// This is a comment
Text Type (Simulate Keystrokes): Hello // This is a comment for a "Text Type" instruction
Mouse Move: 5, 5 Relative to Last Position // This is a comment for a "Mouse Move" instruction
Delay: 100 milliseconds // This is a comment for a "Delay" instruction
// This is another comment
	

 

 

Link to comment
Share on other sites

10 hours ago, Sebastian42 said:

if/when you reply, you'll tell me where to find the 'comments command' again.

"Script" tab

"Macro Control"

"Comment"

 

image.png.e91df7043bf45b5c35383b8959613e70.png

 

 

It would be helpful to see your entire script. Instead of a screen shot of the Script Editor, select the code in the Script Editor, copy it, and paste it into the forum.

 

Link to comment
Share on other sites

Thank you for that instruction - so easy - explains why I found it originally, but it's a mystery why it evaded me now.

 

Code :

<COMMENT Value="Launches first preliminary window of SendLeap as a Chrome App"/>
<PROGRAM LAUNCH Path="C:\\sendleap.lnk" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<COMMENT Value="That got 'Learn more' selected"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<COMMENT Value="That got 'Turn on enhanced protection' selected "/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<COMMENT Value="That got 'Back to Safety' selected"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<COMMENT Value="That got 'Advanced' selected"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<COMMENT Value="That got 'Hide Advanced' displayed"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<COMMENT Value="That got 'Proceed to SendLeap' selected"/>
<DELAY Flags="\x01" Time="1"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<COMMENT Value="That achieved the opening of SendLeap app"/>

 

 

 

 

Link to comment
Share on other sites

The code looks fine. Your comments are clear.

 

The only change I would suggest is increase the delay on Line 3 to four or five seconds. Some applications need a lot more than a second to fully load. You may need a longer delay on Line 18, as well.

 

Once you find the delay that reliably opens the window, you may be able to shorten other delays. Typically I don't add delays when tabbing around.

Link to comment
Share on other sites

A macro that interacts with an application's user interface cannot be 100% reliable. There are endless ways things can go wrong: a program might fail to launch, a screen might not appear in time, another application might steal focus, and so on.

 

So if your macro ALMOST always works, consider it a success!

Link to comment
Share on other sites

On 8/21/2021 at 6:57 PM, Sebastian42 said:

The macro by itself seemed faultless, but when called by a batchfile at Windows StartUp, it became quite unreliable.

 

This might be an important clue. Please describe how you call the macro from a batch file.

 

Is the only time you need to run this macro when you start your computer?

Link to comment
Share on other sites

It's been a very long time since I last wrote or used a batch file!

 

Is it possible that the failure is due to the batch file running before Macro Express is ready?

 

To troubleshoot, temporarily remove the batch file from the start up group. Manually run the batch file AFTER you are certain Macro Express is loaded. Ensure Macro Express in the startup group. When Macro Express is fully loaded, its icon will be in the System Tray.

 

Also, assuming your macro is hotkey activated, check whether it runs reliably and consistently when you press the hotkey.

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...
 Share

×
×
  • Create New...