Jump to content
Macro Express Forums

koden

Members
  • Posts

    248
  • Joined

  • Last visited

Everything posted by koden

  1. Thanks..will use ZIP next time. Funny not working on my pc but working on your.... Hmm.. What do you mean with: "You mention “If Not” in your post but this statement is an “If’ not an “If Not”. Are you sure you got this straight?" My english understanding sometimes sucks ... :-) I will drop clear variables.... What is BTW meaning? Soon this will be a course in english writing,speaking and understanding :-))))
  2. Every time I run this macro it comes up with the prompt box in line 8. This prompt should only apear when an error window is running. Any idea why the if case is true in this macro? test1.mxe
  3. Denmark.... I have been in California. Have some familly in San Francisco. Great country or state :-)) And one more time...thanks for all the times you have helped me.
  4. Thanks... I will check it all again and what you have written.. one problem I have, is that i'm not english. So sometimes I don't get the meaning even if it's simple.. But for my "defence" I think it's better to get the understanding than just copy code :-)) I'm very happy for your time spending with helping me....... And it's okay for me to say if you don't have the time...
  5. Maybe it's better if you have time to comment the places with //? and check if the one I think I have understand is right :-) Variable Set String %T8% from Clipboard //paste clipboard into T8 (first,middlenames,lastname and spaces). Variable Modify String: Trim %T8% // remove all spaces a.s.o. (so left is firstnamemiddlenameslastname) Variable Set Integer %N4% from Position of Text in Variable %T8% //find first space? Variable Modify Integer: Dec (%N4%) //? If Variable %N4% < 0 Text Box Display: Error: Macro Stop End If Variable Modify String: Copy Part of %T8% to %T4% //copy firstname into T4 Variable Modify String: Delete Part of %T8% //delete firstname so middlename1 is first in line Variable Modify String: Trim %T4% //Trimming what?
  6. Hey Cory: I'm still not sure. Ypu wrote that you removes all spaces with TRIM. But how can the macro then find spaces after this Trim? Tha macro starts like this (i have changed var numbers in my macro): variable set string T8 from clipboard variable modify string trim T8 // now there are no spaces??? variable set integer N4 from position of text in T8 that are = (the search text box is empty and therefore it looks after space). // but how find spaces that we have trimmed away before??? AND decrement of N4 is doing what??? removing 1 character i can read in help.. But which one?
  7. SORRY SORRY.... I have tryed strathos script again and it's working. I must have done something wrong first time but I still don't understand how spaces are reconized... And again how the names are seperated from each other. It maybe does'nt matter but I would like to understand :-)) THANKS A LOT....
  8. I'm not sure I understand. I try.... This ex. has a name with first,2xmiddle and lastname Variable Set String %T1% from Clipboard //copy firstname middlename1 middlename2 lastname into T1 Variable Modify String: Trim %T1% // trim the T1 so there is no spaces (but why that?) Variable Modify String: Strip CR/LF from %T1% // get rid of line feeds a.s.o. // I don't quite understand what happens after here? Variable Set Integer %N1% from Length of Variable %T1% // set N1 from T1 ?? firstnamemiddlenamemiddlenamelastname ??? Repeat Start (Repeat %N1% times) Variable Modify String: Copy Part of %T1% to %T2% If Variable %T2% = " " Variable Modify Integer: Inc (%N3%) End If Repeat End I can't see how you can find out how many middlename there is and always get them into the middle name field in the other program. When you trim T1 and remove spaces there is nothing to seperate firt,middle and lastname??? In my other program there is field for firstname, middlename and lastname. If a person has 5 middlename (not seen yet :-) then all 5 has to be in the middlename field. Do you understand what I meen ??
  9. The problem is, that I don't know where in the macro run, that the error comes. I think it can be about 10 dif. places. Off course I can put the if command in 10 times....if there is no general command that can see any error while the macro runs...
  10. My macro sometimes stops because of a error window. This error window appears diff. places in my program. When I click ok to the window the macro goes on. Is it possible to make a IF like this in start of macro? IF any error window appears while macro runs, then text type ok ?
  11. Replace All Instances was the problem....thanks..
  12. I will try mouse click.. BUT mouse click not a perfect way. because there are severel people running the macro and what happens when windows are moved..?
  13. I use this Replace "0" with "" in %T1% Replace "1" with "" in %T1% Replace "2" with "" in %T1% Replace "3" with "" in %T1% Replace "4" with "" in %T1% Replace "5" with "" in %T1% Replace "6" with "" in %T1% Replace "7" with "" in %T1% Replace "8" with "" in %T1% Replace "9" with "" in %T1% And it works... But today I have this line: 20120 city he macro remove 201 but 20 is back.... So when T1 is typed there is standing 20city :-) It looks like the macro only remove 1,2,3 a.s.o. one time??? How do i get it to replace ALL numbers, also thoose that are there twice? If i put in one more Replace "2" with "" in %T1% and Replace "0" with "" in %T1% Then it works... :-) But it would be bether if it deleted all numbers...
  14. thanks...have not had the time yet to look at it. But as soon as possible I will do it.
  15. Don't think you know the program. It's made in my company. Picture should be window :-) It's only text to copy <CTRLD>a<CTRLU> does not work. Right click and select all works :-) I will use that. Don't spend more time on this... Thanks..
  16. I have an error window that sometimes come up when opening a file. "My IF error window is running command" then click OK to the error and press arrow down and open next file. Error window again and ok a.s.o. But somewhere there is no error window an the macro should go on. But can i in the command "Repeat until" tell the repeat that, when no error window is coming, then stop the repeat function???
  17. My macro opens a window in a program In that window I have to mark all text and copy it. Normally i use text command: <control>A But this is not working in this window. The only way I can mark all is to hold shift and press arrow up so many times as there is text. This is ok. But the text size can be all from 2 to 1000 words Is there a way to get the arrow up to start when the computer gives the sound for end of key press???
  18. I have 2 diff. programs that has the same window name. I can't rename the window name. I use the launch and activate command every time i jump between the 2 programs. I launch the program file from C drive for each program. C:\program1 or C:\program2 But it's slow.... It can sometimes take up to a minute. Is there a bether way to jump between to programs with the same window name???
  19. Sorry to bring this up again, but it's not working for me. maybe there is a simpler solution (cant tell if strathos is simple, because I don't understand whats happening :-) Is it possible to copy the whole line with first,last and all middle name into a varibale. Then check for how many spaces. If there is 5 spaces then it must be this : firstname,middlename1,middlename2,middlename3,middlename4,lastname (nomally no one have 4 middle names, but for the ex. :-) Then the macro has to take firstname into variable 1 lastname into variable 2 And all ather names into variable 3 with spaces between each middlename. names with - between has to be one name. In my case they sometimes look like this george-schmidt. george-schmidt is one name. maybe that is what strathos is doing?
  20. so simple... I did it this way: I have a macro thats sets T21,T22 for each code SDN,OPC or what ever.... Every time i set T25 to 1 IN my main macro i have an if that checks if T25 is 1 If not it stops, so that i can fix it. Thanks...
  21. I have this macro: IF T20 contains SDN Variable set T21: A Variable set T22: B End if IF T20 contains OPC Variable set T21: C Variable set T22: D End IF A.s.o……. 20 times with diff. T20 contains. But if none of the conditions in T20 are true, I would like it to do this: Variable set T21: 1 Variable set T22: 2 But where do I put the ELSE command… My Brain is empty at the moment :
  22. It looks like that it does work....using launch program and activate window C:\program1 or program2 But i'm not sure if it's a good way to do it. any better ideas or comments to my way to do it.
  23. I have 2 programs with the same windw name. My macro has to someone activate the 1 window and sometimes the 2 window. But how do i get the right window, when they have the same name? The windows are specially programs where I have to login. If I manually go to the C:\program1 or program2 and dubbel click then the window activates (take some seconds, but it's working). the exe files have diff. names for the 2 windows The window name is the same and can't be renamed But when i use launch command and write C:\program1 or program2 it does not come up?? Any ideas or bether ways to handle 2 windows with same name?
  24. aha... 999 because there is only space for 1000 in the program i have to paste in. Thanks...
×
×
  • Create New...