Jump to content
Macro Express Forums

PotterHarry

Members
  • Posts

    76
  • Joined

  • Last visited

Posts posted by PotterHarry

  1. Hi again..

    I can't understand what's happening here. I'm using ME Pro Portable. A selection of my macros write to the registry. On one PC with which I do most of my work, everything works fine. I created all the necessary registry keys on another PC in order to be able to work on that PC. However I'm seeing a lot of errors Eg. Line 7: Debug error: Could not access the specified registry value. With one macro, by elimination, I determined that this error would happen when there was no value set in the registry key. I wrote values to all the keys referenced in that macro and it now works fine. Now I have another macro with the same issue. This time there is a value in there "B" so I'm stumped. I'm running in administrator mode. If I disable just that one line then all the other values load correctly. The variable is correctly defined. Wonder what's going on? Thanks.

  2. I have had a go at this using my two columns of data saved as a .csv.

    I am seemingly getting the correct pairs of values (giving me hope!) apart from at the very first iteration I'm getting this odd symbol ... ï»¿0

    I placed a text box between Ascii file begin process and ascii file end process

    %T[1]%
    %T[2]%
    %T[3]%
    %T[4]%
    %T[5]%
    %T[6]%
    %T[7]%
    %T[8]%

    On running it I'm seeing

    0
    1

    -1
    0

    0
    1

    -1
    1

    They are all the correct values for the start of the series. I guess I just need to trim that first value back to a 0 assuming the garbled stuff will be the same with different .csv files?

  3. Hi again! I have been experimenting with VBA in Excel. I have succeeded in creating two columns of values ( representing mouse coordinates) which I have stored in an array variable. What is the best method of getting that variable over to ME Pro? I assume registry write is an option. Will the format of the array be compatible? Excel is very good at doing what I'm trying to achieve (relative position of pixels) but I always fear that solutions that would be obvious to an experienced programmer would be lost on me! Thanks...

  4. Text File End Process
    Variable Save: Save All Variables
    Mouse Move: 705, 641 Relative to Screen
    Mouse Left Button Down
      Variable Set Integer %REPCOUNTER[1]% to 750
      Repeat Start (Repeat %REPCOUNTER[1]% times)
        Mouse Move: %XCOORD[%REPCOUNTER%]%, %YCOORD[%REPCOUNTER%]% Relative to Screen
        Delay: 0.1 seconds
      End Repeat
    Mouse Left Button Up
    Text Box Display: 
     

    My mouse coordinates are now recording successfully. In the above code I'm seeing variable is the wrong type error on this line: Mouse Move: %XCOORD[%REPCOUNTER%]%, %YCOORD[%REPCOUNTER%]% Relative to Screen. They are all integer variables and they are defined.  Is my syntax incorrect? XCOORD and YCOORD are array variables with 750 elements. Thanks.

  5. Hi... below is a script section copied from Notepad.

    What do I have to do to extract the values of X and Y into integer array variables? 

     

    **Script version 2.0.2.0**
    5    864
    1    X:1701 Y:580
    1    X:1700 Y:580
    1    X:1692 Y:574
    1    X:1687 Y:572
    5    32
    1    X:1678 Y:568
    1    X:1664 Y:563
    1    X:1648 Y:559
    1    X:1636 Y:555
    5    32
    1    X:1621 Y:549
    1    X:1603 Y:539
    1    X:1555 Y:515
    1    X:1523 Y:496
    5    32
    1    X:1484 Y:477
    1    X:1440 Y:462
    1    X:1391 Y:446
    1    X:1286 Y:421

     

    I will only waste hours if not days if I don't ask :)

  6. Hi all

    I have sampled a range of screen positions to an array variable %incr[1]%, %incr[2]%. These are integer variables. 

    Currently I am writing all these many variables to individual registry keys.

    How would it be possible (if indeed it is) to store this list of values in a single key? Join variable seems to be Text based, and these values are integer.

    I'd appreciate a steer in the right direction.

    Thank you !!

     

  7. I've got it now..

    Line 5: should read If registry: key etc.

    and lines 23 & 24 were missing a backslash after drawingmacro1 and drawingmacro2. Works flawlessly now.

    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\drawingmacro1\\" Destination="%DRAWINGMACRO[1]%"/>
     

    Thanks for your invaluable help. Simple things do throw me!!

  8. Hi Cory 

    Thanks your reply. I like the pizza delivery guy analogy..

    I have attached a sample macro, and a jpeg of my registry keys and the textbox display output (the last one).

    At runtime lines 5-7 do not cause the textbox to display as if drawingmacro variable does not exist. Clearly from my image of regedit it does.

    This macro that I have included here refuses to read the last two variables as if they don't exist. The values are text strings stored in the registry at an earlier run-time. The odd thing is, if i copy and paste that same code to a later part of my main macro, then it works ?!? It's as if those two variables are not accessible UNLESS they are stored and retrieved within the same macro activation. Is this normal windows behaviour?

    Thanks

    PH

     

     

    ME_250417.jpg

    ME2_250417.jpg

    REGISTRYTEST.mex

  9. Hi I'm writing both numeric and text string values to the registry.

    ALL these values are there because I can see them using Regedit. (Ignore READ as this is copied from another section of the code)

    The last two values which are in fact text strings are not shown if i try to use a text box to list them. They are not "0" they are simply absent.

    If I duplicate the same section of code later in the program everything is fine and all the values get displayed.

    I put this line at the very start to test if the registry entry was visible: 

    <IF REGISTRY Key="FALSE" Exists="TRUE" Path="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\drawingmacro1"/> 

    Result: It's invisible.(It's a text string)

    I then used <IF REGISTRY Key="FALSE" Exists="TRUE" Path="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor1"/> 

    This time it displays (Within a text box) This is a numeric value.

    I'm running the macro from a portable version with admin privileges. Does anyone have an idea what could be happening?

    Thanks!!

     

    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\p" Destination="%P%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor1" Destination="%PIXCOR[1]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor2" Destination="%PIXCOR[2]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor3" Destination="%PIXCOR[3]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor4" Destination="%PIXCOR[4]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor5" Destination="%PIXCOR[5]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor6" Destination="%PIXCOR[6]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor7" Destination="%PIXCOR[7]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\pixcor8" Destination="%PIXCOR[8]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\avoid1" Destination="%AVOID[1]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\avoid2" Destination="%AVOID[2]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\avoid3" Destination="%AVOID[3]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\avoid4" Destination="%AVOID[4]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\drawingmacro1" Destination="%DRAWINGMACRO[1]%"/>
    <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\SOFTWARE\\macroexpress\\drawingmacro2" Destination="%DRAWINGMACRO[2]%"/>

    <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %PIXCOR[1]%\r\n\\par %PIXCOR[2]%\r\n\\par %PIXCOR[3]%\r\n\\par %PIXCOR[4]%\r\n\\par %PIXCOR[5]%\r\n\\par %PIXCOR[6]%\r\n\\par %PIXCOR[7]%\r\n\\par %PIXCOR[8]%\r\n\\par %AVOID[1]%\r\n\\par %AVOID[2]%\r\n\\par %AVOID[3]%\r\n\\par %AVOID[4]%\r\n\\par %DRAWINGMACRO[1]%\r\n\\par %DRAWINGMACRO[2]%\r\n\\par \r\n\\par \\f1 \r\n\\par }\r\n" Left="821" Top="420" Width="280" Height="354" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
     


     

×
×
  • Create New...