Jump to content
Macro Express Forums

Recommended Posts

When I manually open Casper and press ENTER, it presents a dialog window allowing further progress.

That dialog window does NOT open when I run a macro with the code as in the uploaded image

where I have coded for action that replicates what I do manually.

How can I get the macro to produce the same result as my manual process ?

 

 

CasperMacro.JPG

Share this post


Link to post
Share on other sites

How do you manually launch Casper?

 

If it's a desktop shortcut, check its properties. Is there a parameter after casper.exe in the "Target" field? If yes, use the same parameter when you launch the program via Macro Express.

Share this post


Link to post
Share on other sites

Does Casper run with elevated (admin) privileges? If so you will need to run Macro Express with elevated privileges.

Share this post


Link to post
Share on other sites

Is 1 second long enough to allow a complex app like CASPER to open and stabilise?

 

Try adding a Wait for Window Title.

 

Share this post


Link to post
Share on other sites

If you use the Windows Run dialog, do you see the same problem.

Win+r

Share this post


Link to post
Share on other sites

Yes, I launch it from a shortcut, the Properties of which are in the 'attached' image.

 

I can't detect any parameters.

 

I just run it, so there is no reason to think it needs administrative privileges.

 

Adding 'Wait for window title' does not improve things.

 

Casper opens, which is all I could expect from a RUN command - it's the progress after that which is lacking, and I would not know how to code that into RUN.

 

The delay before i responded was  because I did not get the expected alert about replies.

CasperProps.JPG

Share this post


Link to post
Share on other sites

If you can start Casper as you expect it to open) by double-clicking on the desktop shortcut, here is a "hack" that might help:


1. Open the "Properties" of the desktop shortcut.


2. In the "Shortcut key" field, press a key combination such as:


Ctrl+Alt+C

Shift + Alt + F3

Ctrl + Shift + Numpad 3


(Normally you need two modifier keys)


Note that you cannot type into the field. You must actually press the key combination that you want.


3. Click "OK."


4. Test your shortcut key to make sure it works. You do not need to be able to see the desktop to use the shortcut key. The key combination should work in (virtually) any program or context.


5. At this point, you can use this hotkey to start Casper, and call it a day. Or if you like, you can create a Macro Express script activated in whatever way you want. For example, perhaps you want your script to be activated with a short key, by middle clicking on a scrollbar, by the presence of certain text in the clipboard, on a schedule, etc. Your Macro Express script simply outputs the key combination that you set, above, e.g.,


Text Type (Simulate Keystrokes): <CONTROL><ALT>c

Share this post


Link to post
Share on other sites

Is the program definitely active when the macro ends?

 

Try adding a Window Activate before the Enter.

 

What is the longest delay you tried instead of 1s?

 

Try a 0.1s after the Enter.


Are you sure another operation is not needed before the Enter? Possibly a selection that Casper normally performs by default?

 

Leaving the macro (or its experimental variations) unchanged,  replace Casper.exe with another program that you know always responds to Enter directly after launch. Confirm that it works.


Try a second Enter.

 

You didn’t answer Samrae’s question, so we and you are still unsure whether Casper runs elevated. Try his suggestion anyway, just to eliminate that as a cause.
————

 

See the recent thread about email notifications. Bottom line: check back frequently.

 

 

Share this post


Link to post
Share on other sites

None of

Ctrl+Alt+C

Shift + Alt + F3

Ctrl + Shift + Numpad 3

have any effect after Casper has launched

 

"Is the program definitely active when the macro ends?" at this point I have only 'test run' the macro, so I am not sure that it ends.

But in that test, a Casper window gets launched and is susceptible to manual mouse clicks.

 

"Try adding a Window Activate before the Enter. " I had done that, but the window stays 'unmoved'. There is an option to specify VARIABLES, but I can not begin to understand what is required there.

2s is the longest delay i have tried.

Adding a 0.1s delay after ENTER effects NO improvement.

"Are you sure another operation is not needed before the Enter?" I am NOT sure. After Casper launches, a selection must be made. I tried to do that with (the right) number of TABs, but that failed to achieve the desired result. 

 

"replace Casper.exe with another program that you know always responds to Enter directly after launch" That is a challenge that will take time to work out.

 

a second ENTER improves nothing

 

"I just run it, so there is no reason to think it needs administrative privileges." is my answer to Samrae’s question.

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
Quote

"Is the program definitely active when the macro ends?" at this point I have only 'test run' the macro, so I am not sure that it ends.

But in that test, a Casper window gets launched and is susceptible to manual mouse clicks.

 

I was referring to the three line macro you displayed in your opening post. At the end of that.

 

Quote

"Try adding a Window Activate before the Enter. " I had done that, but the window stays 'unmoved'. There is an option to specify VARIABLES, but I can not begin to understand what is required there.

 

Please provide details, including the macro code and a screenshot clarifying what you mean by that mention about variables.

 

Quote

"Are you sure another operation is not needed before the Enter?" I am NOT sure. After Casper launches, a selection must be made. I tried to do that with (the right) number of TABs, but that failed to achieve the desired result.

 

We're looking for  some distinction between the result of your opening 3-line macro (perhaps with the respective additions I've suggested) versus the status after opening Casper manually. You seem to be confirming that an extra step is taken by the latter but not the former.

 

Quote

"replace Casper.exe with another program that you know always responds to Enter directly after launch" That is a challenge that will take time to work out.

 

It's straightforward enough. A simple example would be to use Notepad. (At C:\Windows\System32\notepad.exe or C:\Windows\notepad.exe). After the Enter command, has the macro launched Notepad and then started a new line? That should at least confirm that your macro has no obvious error.

 

Quote

"I just run it, so there is no reason to think it needs administrative privileges." is my answer to Samrae’s question.

 

It's not normally visibly evident that a program is running in elevated mode. Use Task Manager, select the Details tab, ensure the Elevated column is enabled, and check. Or, to repeat, just run in it elevated mode; you can't break anything!

Share this post


Link to post
Share on other sites

The program is active after my three-line macro.

 

I have highlit the variables

 

"I tried to do that with the right number of TABs" when that did not work I replaced the tabs with ENTER, that works MANUALLY.

I'm not confirming anything - I repeat 'I am not sure'

 

I entered Notepad as shown in the second screen shot. The macro launches notepad and the insert marker is in Notepad ready to enter text.

 

"It's not normally visibly evident that a program is running in elevated mode" but something must trigger the elevation of that mode. It is not needed, but if it happens, I have no idea what triggers the elevation.

 

 

 

 

 

 

 

 

activate.JPG

Notepad.JPG

Share this post


Link to post
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...