Jump to content
Macro Express Forums

Baffling conflicts


Recommended Posts

This is a bit obscure but if I describe the behaviour it may ring a bell with someone who can suggest possible causes or methods to isolate. I've been trying in vain to pin it down for hours now.

 

I have a macro that when run goes haywire, aparently trying to run part or parts of one or more of 4 totally unrelated macros that have worked OK for many months. I isolated those 4 'unrelated' macros by trial/error. IOW, if any one of them is still enabled, I get the erratic behaviour (varying depending on which of the 4 are enabled). If all 4 are disabled, my new macro works OK. In case it offers any clues I'll list their names and activation hot keys:

 

Nickname						Activations   Scope
------------------------------- ------------  ------
Disable (a+num0)				Alt+Keypad 0  Global
Enable (Resume) (a+num1)		Alt+Keypad 1  Global
Next (a+num6)				   Alt+Keypad 6  Global
Open containing folder (a+num7) Alt+Keypad 7  Global

 

All of these are performing various operations concerned with my destop wallpaper changer, WallPaper SlideShow Pro.

 

Turning to the new macro, it's scoped to a specific program, Microsoft Flight Simulator (FSX). The problem occurs however I activate it. The command line that triggers the misbehaviour is:

 

Text Type (Simulate Keystrokes): %LocationName%: %FSX_Lat%, %FSX_Long% // Paste Name, Lat, Long.

 

and its code is

 

<TEXT TYPE Action="0" Text="%LocationName%: %FSX_Lat%, %FSX_Long%" _COMMENT="Paste Name, Lat, Long."/>

 

If anyone has any ideas I'd appreciate them please. Perhaps I've blinded myself to some obvious cause?

 

One practical approach, of course, would be to avoid giving the WSS Pro macros a Global scope. But as discussed in a recent thread, I see no way to achieve that. Effectively it means scoping to 'the Desktop' and no method of doing that has emerged.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Well, I fixed it a short while later, but I still don't understand the underlying cause.

 

On a hunch, I changed the activations of those 4 unrelated macros by adding Ctl. So they are now all 3-finger hotkeys:

 

Ctl+Alt+Keypad 0

Ctl+Alt+Keypad 1

Ctl+Alt+Keypad 6

Ctl+Alt+Keypad 7

 

But why would that eliminate the problem? There were no other macros using Alt+Keypad 0 etc. The problem arose whether NumLock was on or off. The macro was scoped exclusively to FSX...

 

Beats me!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

As a further test I wrote 4 more trivial macros simply displaying a message that they're running. They use the original hotkeys:

 

Alt+Keypad 0

Alt+Keypad 1

Alt+Keypad 6

Alt+Keypad 7

 

When I ran the FSX macro, once again it failed. But this time, with WSS Pro not involved, it was clearer what was happening. Three messages were displayed, for macros 0, 1 and 6. Somehow, each of those macros were activated by the command

Text Type (Simulate Keystrokes): %LocationName%: %FSX_Lat%, %FSX_Long%

 

Looks to me like a fundamental conflict concerning the use of Alt with the Numeric Keypad, or another ME Pro bug. Can anyone reproduce please?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

It looks like you are going to have to get out your virtual sextant and star charts for FSX! I tried your hotkeys and Text Type command with no effect. No surprise. It may require typing over your apps to get the conflict.

 

No star charts needed! After more tests I think it's an obscure bug, that you'll be able to reproduce.

 

Fill the three variables with values lke these:

 

FSX_Lat = N51° 45.78'

FSX_Long = W0° 3.20'

LocationName = Location name

 

Any macro using Text Type to place those into Notepad then runs the unrelated macros.

 

--------------------

More detail

 

I wrote 10 trivial macros activated by Alt+N (N=0 to 9). Just like the one line Text Display example I gave earlier, to limit the chaos. Then I (hastily) wrote a simple macro typing those values into Notepad. It uses a pre-prepared file c:\Testmacro.txt which contains those 3 lines above.

 

If you want to use mine, here it is:

 

<ACTIVATE OR LAUNCH Title="Notepad" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\WINDOWS\\NOTEPAD.EXE" Mode="\x00" Parameters="c:\\Testmacro.txt" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/>
<TEXT TYPE Action="0" Text="<CONTROL><HOME>" _COMMENT="Text cursor to start."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<SHIFT><END>" _COMMENT="Select line 1."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<CONTROL>c" _COMMENT="Copy to clipboard."/>
<DELAY Flags="\x02" Time="100"/>
<VARIABLE SET STRING Option="\x02" Destination="FSX_Lat"/>
<TEXT TYPE Action="0" Text="<HOME><ARROW DOWN>" _COMMENT="Move to next line."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<SHIFT><END>" _COMMENT="Select line 1."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<CONTROL>c" _COMMENT="Copy to clipboard."/>
<DELAY Flags="\x02" Time="100"/>
<VARIABLE SET STRING Option="\x02" Destination="FSX_Long"/>
<TEXT TYPE Action="0" Text="<HOME><ARROW DOWN>" _COMMENT="Move to next line."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<SHIFT><END>" _COMMENT="Select line 1."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="<CONTROL>c" _COMMENT="Copy to clipboard."/>
<DELAY Flags="\x02" Time="100"/>
<VARIABLE SET STRING Option="\x02" Destination="LocationName"/>
<TEXT TYPE Action="0" Text="<HOME><ARROW DOWN>" _COMMENT="Move to next line."/>
<DELAY Flags="\x02" Time="100"/>
<TEXT TYPE Action="0" Text="%LocationName%: %FSX_Lat%, %FSX_Long%" _COMMENT="Paste the three variables."/>
<DELAY Flags="\x02" Time="100"/>

 

(Yes, I realise now that I could have written that much more elegantly by simply defining the 3 values in Variable Set String commands!)

 

My conclusion is that this is another bug: ME Pro variables can't handle the Degree symbol.

 

And I think I've worked out why those unrelated macros get run. The degree symbol can be entered by holding the Alt key and typing 0176. If you do that with those macros disabled, you correctly get your degree symbol in Note pad or wherever. But if they are enabled, they run!

 

As soon as I get a confirmation from another user, I'll report it.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I don't have time right now to run your test. Will try later. For typing out any ANSI characters, don't you have to use the keypad numerals (rather than keyboard) with Alt? Quick lookup: my MSDOS manual says exactly that.

 

It's the Keypad ('Numeric Keypad' if you like) that I've been discussing throughout. Alt0176 means "Hold the Alt key and successively press 0, 1, 7 and 6 on the Keypad". I didn't mention the keyboard.

 

From Post #3: "Looks to me like a fundamental conflict concerning the use of Alt with the Numeric Keypad."

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I realize you were using keypad. I mentioned about the ANSI characters needing numbers from the keypad rather than the keyboard because they are a very fundamental shortcut of Windows. DOS in fact. The degree symbol is actually Alt+keypad 248

 

I got the same behaviour as you did. I extended to other characters:

Alt+keypad248 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6, Alt+keypad7 macros

Alt+keypad241 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad156 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6 macros

Alt+keypad168 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad128 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad122(z) character started: Nothing

 

Many of the in-betweens were Unicode.

Link to comment
Share on other sites

I realize you were using keypad. I mentioned about the ANSI characters needing numbers from the keypad rather than the keyboard because they are a very fundamental shortcut of Windows. DOS in fact. The degree symbol is actually Alt+keypad 248

 

OK, understood. This gets confusing, for me anyway, because you can display these special characters in different ways. For example, the degree symbol can be entered by typing either Alt+keypad 0176 or Alt+keypad248, as you've found.

 

I got the same behaviour as you did. I extended to other characters:

Alt+keypad248 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6, Alt+keypad7 macros

Alt+keypad241 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad156 character started: Alt+keypad0, Alt+keypad1, Alt+keypad6 macros

Alt+keypad168 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad128 character started: Alt+keypad0, Alt+keypad1 macros

Alt+keypad122(z) character started: Nothing

 

Many of the in-betweens were Unicode.

 

Thanks. I've reported it formally as follows:

 

Suppose you have an ME Pro text variable in Macro X which contains any of a wide range of special characters. And suppose you also happen to have one or more macros which have global scope and activation hotkeys of the form Alt+keypad N (where N is 0 to 9). Then running Macro X could also unexpectedly run up to four of the other macros with unpredictable results.

 

This is because if that variable is at any stage used in a Text Type command (and possibly other commands), the character will be expanded to Alt+ keypad 0ABC, triggering up to 4 unwanted macros. For example, if the variable contains the degree symbol, four unrelated macros would be run, those with hotkeys of Alt+keypad0, Alt+keypad1, Alt+keypad7 and Alt+keypad6.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Strictly speaking the shortcuts I used are part of the Extended ASCII character set. I always use those shortcuts because I have a Post-It bookmark in my DOS manual - way quicker than finding my list of ANSI shortcuts. Sometimes the printed page is mightier than the mouse; no scrolling and absolutely no typing required! The ones you used are the Windows Character Set which is the ANSI preceded by 0, or something like that.

Link to comment
Share on other sites

Strictly speaking the shortcuts I used are part of the Extended ASCII character set. I always use those shortcuts because I have a Post-It bookmark in my DOS manual - way quicker than finding my list of ANSI shortcuts. Sometimes the printed page is mightier than the mouse; no scrolling and absolutely no typing required! The ones you used are the Windows Character Set which is the ANSI preceded by 0, or something like that.

What's wrong with \Windows\System32\Charmap(.exe)?

Link to comment
Share on other sites

What's wrong with \Windows\System32\Charmap(.exe)?

 

Haven't used that for a while. I see it shows my ° symbol with the keystrokes I used:

 

post-1217-1267866463_thumb.jpg

 

I'd replace your Post-It bookmark with one to the pages listing these 'official' Windows codes, John! ;)

 

--

Terry, East Grinstead, UK

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