Jump to content
Macro Express Forums

blopib

Members
  • Posts

    98
  • Joined

  • Last visited

Posts posted by blopib

  1. I've noticed that some of the posts gets very wide. For instance Corys and my own, why is that? I can't see that i'm doing something that could cause that.

     

    I sometimes printout some of the exellent tips from this forum and the trouble is that with this wide post i don't get all the text or code.

     

    Can anyone please present a solution to this problem and i'll have a nice weekend. :-)

  2. In you're macro you decremented N1 after the repeat loop and you showed the result of N1 (DISPATCH). You wrote the code like this:

     

    <TVAR2:01:04:c:\test.txt><REP3:08:000001:000002:0001:0:01:0><NMVAR:08:02:0:0000001:0:0000000><IVAR2:01:13:1:DISPATCH><TMVAR2:21:01:00:000:000:DISPATCH><ENDREP><NMVAR:09:01:0:0000001:0:0000000><TBOX4:T:1:CenterCenter000278000200:000:ResultDISPATCH appears %N1% times>

     

    Instead would'nt it be decremented N2 after the repeat loop and the result of N2 (Number of DISPATCH). The code like at this:

     

    <TVAR2:01:04:c:\test.txt><REP3:08:000001:000002:0001:0:01:0><NMVAR:08:02:0:0000001:0:0000000><IVAR2:01:13:1:DISPATCH><TMVAR2:21:01:00:000:000:DISPATCH><ENDREP><NMVAR:09:02:0:0000001:0:0000000><TBOX4:T:1:CenterCenter000278000200:000:ResultDISPATCH appears %N2% times>

     

    Just from my simple point of view. Friday and the sun is shining.

  3. Thanks for you're quick answer Kevin.

    I'm sorry to say that we still don't understand how it works.

    We're getting the bit were you define %N1% to space then we're lost at the bit were you define the number of character to copy and delete becuse the length of the names are different every time. We're stuck on this and we would really get this to work since it would be very useful in handling information from another prog. that we use.

     

    Perhaps you could make the script and post it as a Direct Editor script. We then could implement this in the macro to better understand how it work.

     

    Thanks in advance.

  4. Try something like this:

    CODE 

    // Input string is in T1

    // 

    // Copy string to T4

    Variable Modify String: Copy %T1% to %T4%

    // 

    // Put the position of the first space in T4 into N1

    Variable Set Integer %N1% from Position of Text in Variable %T4%

    // Decrement to skip the space

    Variable Modify Integer: Dec (%N1%)

    // Copy everything to T2

    Variable Modify String: Copy Part of %T4% to %T2%

     

    // Increment to include the space

    Variable Modify Integer: Inc (%N1%)

    // Delete the first word, including the space

    Variable Modify String: Delete Part of %T4%

     

    // REPEAT to get the second word, except place result into T3

     

    // Put the position of the first space in T4 into N1

    Variable Set Integer %N1% from Position of Text in Variable %T4%

    // Decrement to skip the space

    Variable Modify Integer: Dec (%N1%)

    // Copy everything to T3

    Variable Modify String: Copy Part of %T4% to %T3%

     

    // Increment to include the space

    Variable Modify Integer: Inc (%N1%)

    // Delete the first word, including the space

    Variable Modify String: Delete Part of %T4%

     

     

    // Here:

    //    T1 contains the original string

    //    T3 contains the first word

    //    T4 contains the second word

    //    T2 contains the third word

     

     

    Make sure that you put a space in the Search Text field inside the Variable Set Integer %N1% from Position of Text in Variable %T4% commands.

     

     

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

     

    Kevin Heaton

    Insight Software Solutions, Inc.

     

    I've tried this and i can get it to work with the "John Adams Micheals" example, but what if i have a list of different names with different length. As i understand you have to define stating position and characters to delete in for instance

    Variable Modify String: Delete Part of %T4%
    and thats the trouble when it varys.

     

    Is there something that i've missed?

    It could be very useful if this would work regardless of the length of the names.

    Thanx in advance.

  5. I think you could do a sleazy word wrap.

    I have to agree.

     

    I have to agree that it would be nice if the actual window would be al little bit wider

    If you create a couple of macros for "seldom-users" and they could choose which macro to run from the multiple choice meny. It would be nice to write a hole sentence (not an essay) to guide the person to choose the right macro.

    The window that shows the multiple choice are too small for this.

    That was my purpose.

  6. I have to agree that it would be nice if the actual window would be al little bit wider. Especially when it doesn't seem to have any limitations to put data in the menu list. I understand that perhaps it it's not realistic to put too long text strings in the menu list but as it's possible to do just that, you'll get surpriced when it doesn't show all text. Not so much off a big problem but...

  7. I just want to add to Corys post. It's possble to paste or write

    Tom

    Dick

    Harry

    etc.

     

    Into [Text Type] and choose [use Clipboard to Paste Text].

    Then open [Variable Set String] and choose [set Value from Clipboard] and [Choose Variable Name] T1.

    Last [Clipboard Empty].

     

    Then the following as Cory discribed:

    "Now read that text file into a text variable like T1. Now in the multiple choice menu simply write %T1% on the first line. I know it seem odd but your multiple choice menu will now display all three choices! This way you only need one text variable."

     

    Still the problem is that you only could use 37 alternatives in the Menu list in Multiple Choice Menu. The possibility for more alternatives then 37 is something i wish for. Does anyone know if this has been brought up before?

  8. Hi Koden

    Try this

     

    //Hit Enter when error window occurs

    If Window Title "" is running

    Text Type: <ENTER>

    End If

     

    If you don't know the exact name for the error window, wait for it to occur then open the macro and use select for the right window title.

    This offcourse just works if the ok button is "highlighted" if it's not perhaps you just can add up Text Type: <ARROW LEFT> before the Text Type: <ENTER>

  9. Hi gnathon

    We've had similar problem at times. In our case we've this kinds of trouble when we work with different applications over the network. Try to separate the tabs with a delay of 1 millisecond or more between each tab, just to see if it helps. If you just put the delays between the tabs you dont have to slow down with Macro Playback Speed. A tip:Sometimes it could be verry useful to wait for mouse arrow to be sure it has finished of as it should.

  10. Hi koden

     

    I dont have a sollution for the lower or uppercase i ME but perhaps this could help you instead. If you have a list of the citynames, maybe you could import this to excel and use the function INITIAL, then use you're (T7) macro to text type it from excel into the other program. Just don't forget to copy the result in excel from the B-column and paste it into the C-column, use paste special and value, this is just to get rid off the formula in the B-column.

     

    I hope this can help.

  11. Ok, if i understand you correctly, you have a number of keystrokes you want to launch, for that i recomend Multipel Choice Meny and a number If Variable for each type of keystrokes you want to execute. For the problem with restarting the macro, try to use Properties/Activation/Mouse Click and chose a position to reactivate the macro.

     

    I hope this will help you.

    Good luck.

×
×
  • Create New...