Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Posts posted by paul

  1. But to be polite please understand that Paul’s ‘solution’ is one that that is based on opening and closing, not using the update command. To be honest I didn’t see ant TBU commands in his script...

    I believe that is what I said when, in the message accompanying the code, I wrote

    "I wrote myself a DisplayPausing macro in ME3, before we had the ability to update an existing textbox. You'll see that it does indeed "change" the header, and I have never observed any performance problems with it."

  2. but the Logitech SetPoint software wouldn't have the same level of macro features that ME has. so i was wondering if my question was possible.

    There are 2 possibilities:

    - have the mouse button generate a keystroke (preceded by Ctrl or similar), where the keystroke, e.g. Ctrl-X, fires your macro

    - have the mouse button run Meproc.exe

     

    You'll need to read the SetPoint documentation to see which of these is possible for your device (yes, I'm sorry, I know that reading documentation of any sort is sheer anathema to you, but it can't be helped).

  3. Is it possible to use Logitech G keys to trigger Macro Express macros? Logitech has these extra programmable keys for their hardcore mouses and keyboards. For example, I'm interested in the Logitech G700 mouse. Is there a way to get those G keys to DIRECTLY trigger Macro Express macros? [Directly--as in not needing to substitute in normal hotkeys as a bridge.]

     

    Logitech G700 mouse...

    http://www.logitech.com/en-us/gaming/mice-keyboard-combos/devices/7244#section=features

    I imagine that you need to configure the device using the standard Logitech software SetPoint.

  4. Actually that will not work, I tried it in a slightly different way. I did a repeat 10 times with 1 second delays. It's a bootstrapping problem. You can't vary the header before updating because the command will not find the text box!

     

     

     

    My goal here was to use the taskbar icon as a progress indicator. EG display the percentage of completion of a large invisible job where it would need to be updated 100 times

     

    But thanks for the suggestion!

    I wrote myself a DisplayPausing macro in ME3, before we had the ability to update an existing textbox. You'll see that it does indeed "change" the header, and I have never observed any performance problems with it.

    // Timeout number of seconds
    If Variable %N[91]% Equals "0"
     Variable Set Integer %N[91]% to 10
    End If
    
    // Display Pause dialog box for N91 seconds
    If Variable %T[99]% Equals ""
     Variable Set String %T[99]% to "the job in hand."
    End If
    Repeat Until %N[91]% Equals "0"
     Sound File: Windows XP Battery Low.wav
     Text Box Display: Pausing (closes and continues after %N[91]% seconds)
     Delay: 1 seconds
     If Window "Pausing (closes and continues after %N[92]% seconds)" is running
       Text Box Close: Pausing (closes and continues after %N[92]% seconds)
     End If
     If Not Window "Pausing (closes and continues after %N[91]% seconds)" is running
       Clear Variables
       Variable Save: Save All Variables
       Macro Stop
     Else
       Variable Modify Integer set %N[92]% to the contents of %N[91]%
       Variable Modify Integer %N[91]%: Decrement
     End If
    End Repeat

    <COMMENT Value="Timeout number of seconds"/>
    <IF VARIABLE Variable="%N[91]%" Condition="\x00" Value="0" IgnoreCase="FALSE"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%N[91]%" Value="10"/>
    <END IF/>
    <COMMENT/>
    <COMMENT Value="Display Pause dialog box for N91 seconds"/>
    <IF VARIABLE Variable="%T[99]%" Condition="\x00" IgnoreCase="FALSE"/>
    <VARIABLE SET STRING Option="\x00" Destination="%T[99]%" Value="the job in hand." NoEmbeddedVars="FALSE"/>
    <END IF/>
    <REPEAT UNTIL Variable="%N[91]%" Condition="\x00" Value="0"/>
    <SOUND FILE File="C:\\WINDOWS\\Media\\Windows XP Battery Low.wav" Wait="FALSE" _IGNORE="0x0007"/>
    <TEXT BOX DISPLAY Title="Pausing (closes and continues after %N[91]% seconds)" Content="Close this dialogue box to abort all further processing for %T[99]%" Left="1760" Top="467" Width="320" Height="84" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x02" Delay="2"/>
    <DELAY Flags="\x01" Time="1"/>
    <IF WINDOW Option="\x01" Title="Pausing (closes and continues after %N[92]% seconds)" Partial="TRUE" Wildcards="FALSE"/>
    <TEXT BOX CLOSE Header="Pausing (closes and continues after %N[92]% seconds)"/>
    <END IF/>
    <IF NOT WINDOW Option="\x01" Title="Pausing (closes and continues after %N[91]% seconds)" Partial="TRUE" Wildcards="FALSE"/>
    <CLEAR VARIABLES Type="Text Variables" Option="\x02"/>
    <VARIABLE SAVE Option="\x00"/>
    <MACRO STOP/>
    <ELSE/>
    <VARIABLE MODIFY INTEGER Option="\x06" Destination="%N[92]%" Variable="%N[91]%"/>
    <VARIABLE MODIFY INTEGER Option="\x08" Destination="%N[91]%"/>
    <END IF/>
    <END REPEAT/>

  5. I'm running 3 monitors at 1280x1024.

    M1 is on the left, M2 is is the middle, M3 is on the right; M2 is my main display.

     

    So here are my numbers:
     Monitor      Coordinates              Macro Displays
     M1           -1280, 0: -1  , 1023     x=-1284, y=-4, WW=1288, WH=979
     M2           0    , 0: 1279, 1023     x=-4   , y=-4, WW=1288, WH=980
     M3           1280 , 0: 2559, 1023     x=1276 , y=-4, WW=1288, WH=979

     

    The WH discrepancy for M2 is because M2 has the real taskbar, whereas M1 and M3 use Actual Windows Manager's taskbar, which is obviously 1 pixel too short.

     

    I believe MEP's window width is wrong - it's 8 pixels too large, though this also goes with the top left x value which always seems 4 pixels too low.

  6. The errors were not getting progressively better as the delay was increased from 1 mS to 10 mS. But apart from that, with total displacement of up to 960 + 600 = 1560 pixels, with a delay of 1 second the macro would take up to 26 minutes, and at 10 seconds over 4 hours!

    All irrelevant! We're trying to locate the cause of a problem, which is why you need to follow my suggestion. I'm not suggesting the increasing delays as a solution to solving the problem, but as a solution to diagnosing the problem. And in your tests with these longer delays, there's no need to run the "total displacement", but merely some smallish subset simply to determine if the problem goes away or not.

    If the timing turns out to be, say, 3 seconds, then increasing the delays from 1 ms to 10 ms is surely irrelevant!

  7. Some disappointing news! A bug I've not seen for quite some time has made a re-appearance.

     

    With Macro Express (v4.2.2.1) dormant on my Windows 7 x64 system, I was running SUPER © to convert a single .mkv fi;le to .avi. Suddenly the conversion went into super slow mode, and the keyboard became very unresponsive. Yes, that old bug is back. I opened Task Manager (which took around 3 minutes to open), then I had to open a second copy of Task Manager; I then killed the process MacExp.exe *32 (this took another 3 minutes or so), and this made no difference; finally, after another 3 minutes, I managed to kill MEProx64.exe, at which the problem went away. This is exactly the behaviour I have always seen (I've always had to open Task Manager twice, and the elapse times are similar). What is different is that killing MacExp.exe did not solve the problem until I'd also killed MEProx64.exe.

  8. I largely agree with you Paul. But most of the users here are not programmers and have never even heard the term "floating point". And I ran into the problem doing a date comparison using whole days once! I'm just saying it's going to frustrate a lot of ISS's target market. No good solution really I suppose. But I wonder if it wouldn't be too difficult to identify the greatest number of significant digits in certain operations and automatically do some rounding based on that. Yeah, maybe not huh? I suppose you’re right.

    I suspect that any kind of "solution" is going to produce the wrong answer one day, thus simply replacing one, perceived, "wrong" answer with another, real, wrong answer!

  9. There is a new free utility that has recently been written which I believe may be of great interest to long-time Macro Expressers. It allows you to access any context-menu item directly from the command-line.

     

    Here's a simple example:

    Open Explorer, navigate to some Acrobat document and right-click to see the Acrobat context menu. This menu includes the command Print. Suppose you need to run this menu item from within a macro.

     

    At present, you simulate a right mouse click, then move down the menu as many lines as is needed until you reach Print, then left-click the mouse. And you have to write the ME code to do this.

     

    With this utility, you'd open a command prompt and run it with the name of your Acrobat document (you do this only once). This shows you the context menu, from which you select Print. The output from this utility now displays a command plus parameters to allow you, straight from the command line, to Print your Acrobat document, thereby avoiding the need for clicking and moving the mouse up or down from within your macro. You can now copy and paste this commanbd plus parameters into your macro.

     

    Take a look (it's the 17th utility listed) - Cautomaton.

  10. My two cents is that I think it's a short coming of MEP and there should be a smarter routine to deal with this. If you’re a computer math geek it’s all understood but to the layman it’s not only mysterious it can cause serious problems. Especially when making logical comparison like “Is equal to”. Hopefully one day they will have some time to address this.

    But surely the kind of problem described here is common among [almost?] all languages? I am entirely unsurprised by the difficulties perhaps most ME users have when dealing with FP numbers (and I certainly don't exclude myself from their number) precisely because ME allows laymen users to do various things that some people would prefer restricted to the kingdom of the "computer geek"! :rolleyes: When doing FP stuff with computers, rounding is a real problem, and cannot be swept under the carpet simply to protect the innocents.

  11. As I said, Delphi and other development environments round up. Java rounds up.

    I don't understand what you are saying. An hour on Google has yielded the statement that "Delphi uses Banker's rounding", which means that an exact half value causes a rounding to an even number. Please see this URL for some examples: My link

     

    Open office's calc rounds up.

    Spend some time with an Internet search and you will see all kinds of differing opinions. At any rate, Macro Express rounds negative numbers up.

    The very first example given in this example exactly demonstrates my point!

    -0.5 -0.6 -0.7 -0.8 -0.9 -1.0 -1.1 -1.2 -1.3 -1.4 will all round to -1

    implying that, say, -1.5 will round to -2 (with which I entirely concur).

  12. While we might think that the method of rounding a number is a simple decision there are actually many definitions of how to round a number (as illustrated by spending some time searching the Internet). Macro Express supports two rounding methods, Asymetric Arithmetic Rounding and Bankers Rounding. By default, Asymetric Arithmetic rounding is used. You may set Macro Express to use Bankers Rounding with a Registry entry.

     

    In either case, Macro Express always rounds up. That is, it rounds to a higher number. In the case of -9.600001, the value -9.5 is the next higher number. Rounding to -9.6 would be rounding to a smaller number.

    I'd be very interested to see any authority where rounding -9.600001 could ever produce -9.5!

  13. I think the problem is that, even when the remote session has focus, Win 7 is acting on the Win-L keystroke itself. That behavior is different than XP.

    I'm surprised to read this. For a while I was using RDP extensively inder XP since my development machine was remote, and pressing Win-L always locked the local workstation (and I don't know whether the remote one was locked or not).

  14. When I have a remote session active (I use Remote Administrator, www.famatech.com) and press Win-L to lock the remote workstation, MEP locks the local workstation at the same time. But this only occurs under Windows 7. Under XP, MEP catches the keystroke and passes it onto the remote session as expected (e.g. the local workstation does not act on the "lock" keystroke).

     

    I've tried "Restore Keyboard and Mouse Hooks", but the local PC is still acting on the Win-L keystroke.

    DIsable/Enable Lock Workstation

  15. So, I have a script that works no problem. I would like to hide its activity though. Is there any way to pause screen updating until the macro has completed? Either with another program, or macro express pro itself?

    You'll need to use AutoIt or VbScript to get the handle of Macro Express, or the application you wish to control, e.g. Excel, then use the Windows API to invoke LockWindowUpdate twice, once to lock and once to release.

×
×
  • Create New...