Jump to content
Macro Express Forums

guli34

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by guli34

  1. Cool. I'll have to try that. So when you tell it to convert a string to an integer, it goes and finds the first string of digits and discards everything else?

     

     

    Here the code you may want to adjust the length of variable copy according to the URL I also add 2 extra variables just for debugging purpose. :rolleyes:

     

     

    <IVAR2:06:01:35><ACTIVATE2:notepad><MMW2:853,53><MSD:%N6%><LCLK><MSD:%N6%><LCLK><MSD:%N6%><CLIPC><MSD:%N6%><REM2:copy the Url><TVAR2:01:03:><TMVAR2:09:05:01:000:000:><REM2:url copy again for the second #><TMVAR2:09:02:01:000:000:><IVAR2:10:13:1:dID><NMVAR:01:10:1:0000010:2:0000003><TMVAR2:11:02:00:001:N10:><TMVAR2:10:03:02:001:015:><TMVAR2:05:03:11:000:000:><NMVAR:05:11:0:0000003:0:0000000><TMVAR2:16:03:00:000:000:><ACTIVATE2:Microsoft Word><REM2:Paste the First #><CLIPP><IVAR2:12:13:5:geID=><NMVAR:01:12:1:0000012:2:0000004><TMVAR2:11:05:00:001:N12:><TMVAR2:16:05:00:000:000:><ACTIVATE2:Microsoft Word><REM2:Paste the second #><CLIPP>

  2. Sorry, I thought you said the number of digits would always be the same.

     

    Once the string of digits is at the beginning of the T1 variable,

    Variable Modify String T1 copy about 50 characters to T2 -- copy more than the largest number of digits you expect.

    Then write a repeat loop to step through the T2 characters one at a time checking whether they are numeric or not. Keep a count of how many characters are checked, in another Nx variable. When you finally get to a non-numeric, delete that and all subsequent characters from T2. What you are left with in T2 is just the numeric digits.

     

    Repeat the above to isolate the second string of digits into T3. It's a good idea, before starting this second process, to append a space to the T1 variable, so that you will be sure of finding a non-numeric (the space) before you come to the end of the T1 variable (in case the digits are the last thing in the URL).

     

    There are other ways of extracting the digits, one at a time, into T2 and T3; but the above should work. There may be a simpler method than stepping through the digits one at a time, but I don't know what it is.

     

     

    Thank you , I will try your solution I found an other way but not as elegant! It is to convert T2 into integer witch keep only the digits, but this work for only 10 digits or 2,147,483,647 Max.

  3. Put the entire URL in T1 variable

    Variable Set Integer N1 to location of "ID=" in T1

    Variable Modify Integer N1=N1+3 (to allow for the ID=)

    Variable Modify String T1 -- delete characters 1 through N1

    At this point the first integer is at the beginning of string T1 because you deleted everything before it

    You know the number of digits in the integer (10), so

    Variable Modify String T1 -- copy 10 characters into T2

    At this point you have isolated the first integer string into T2

     

    Repeat above coding to isolate the second integer string into T3

     

     

     

    I followed your explanation, but what about if I do not know the number of digits in the first integer , in the example it is 10 but it can be between 4 and 13 same for the second integer of witch it should be easier to get since no character come after the digits.

  4. I need to extract some ID # and sub ID from an URL string ex:

     

    http://yourid.xyz.com/index.cfm?fuseaction...esubID=18974678

    (Click on the URL to see it in full)

     

    So I want to get 4317378244 and 18974678 in two separate variables knowing the length of text may vary with the #number of digits from the integer ID and the alphabetical part stay the same

    I am not sure how to achieve this . :rolleyes:

  5. Almost similar but this bring me one question with the clipboard

    How to Past CR /LF directly in the clipboard

    Example

    Variable modify sting append “ is red” to T 8%

    Variable modify sting append “ is blue” to T 12%

    Variable modify sting append T 8% to T 12%

    Variable modify sting save T 12% to clpboard

     

    I got when I paste the clipboard

    the balloon is blue the square is red

    but I want to get

    the balloon is blue

    the square is red

    Probably I have to use the clipboard append text but I’m not sure about this one?

     

    :angry:

  6. On the speed issue: does your calling macro set a playback-speed factor? I can reproduce your complaint only by:

    (1) Setting playback speed of, say, 10X faster than normal in the calling (first) macro,

    AND

    (2) Unchecking the ignore-speed-factor box in the delay commands of the called (second) macro.

    When run stand-alone, the second macro has no speed factor in effect, so timings are just as coded. When called, the second macro runs according to the speed factor set in the caller.

     

    Make sure that "ignore speed factor" is checkmarked in all the delay commands, and see if that fixes it.

     

    Well I think you got it it was exactly the issue do you have any idea about the saving problem in editor?

  7. When I do control S in editor the saved modifications are not always reflected right away I have to quit ME and restart to see the change ex add an item in a text menu

    The other bug

    I just noticed is the delays in variables are not completely applied, when you call a macro thru a run macro

    In that case the macro goes too fast but if you call the same macro by itself I’m getting the results expected

    <_<

  8. This example is good when the highlight is always at the same position

    -ex: the word Registered Name is highlight move the mouse few pixels to the right on the same line left click 3 times to copy the new name. The question is how to move the mouse few pixels to the right on the same line when the highlighted Registered Name position change randomly or at least go to some few different known positions, and we need to select the Name in relation with its new different line.

×
×
  • Create New...