Jump to content
Macro Express Forums

randallc

Members
  • Posts

    434
  • Joined

  • Last visited

Everything posted by randallc

  1. my goodness; does this mean you really can do "replace" within the control variable (T30?) and Set the text of the control back to the modified string? - Seems unlikely, but would save counting tabs! I presume you were tabbing the fields originally to get this to work? Randall
  2. hi and welcome! So do you have any comment on the current thread on the same program? screen copy for number of tabs to speed up finding text Randall
  3. Hi, Bernd! See my "Form Generator" to do this using a form which creates a button (more specifically, XcopyME1 below; Form Maker Here is some code for this; does this work for what you need? Best, Randall <REM2:Wait for window running....... equivalent><REP3:08:000002:000002:0001:1:01:N1><IFOTH:04:2:Reminder><EXITREP><ENDIF><ENDREP> XcopyME1.mxe
  4. Hi! post it too for interest? Good news! Randall
  5. Hi, Depends how desperate you are! Each Office app may need its own (Word97 easier - you don't need to create a Word macro. If I knew Office better, one would hope there's an easier way! <REM2:Word2003 paste blue><REM2:You need to assign macro to "ALT-B" in WOrd which sets the colour blue you want><TEXTTYPE:<ALT><ALT>ik><WAITWIN2:000010:000000:Bookmark><TEXTTYPE:StartColour<ALT>a><WAITWIN2:000010:000000:Microsoft Word><CLIPP><TEXTTYPE:<F8><CONTROL>g><WAITWIN2:000010:000000:Find and Replace><TEXTTYPE:<ALT>ob<ALT>eStartColour<ENTER>><IMSD:100><TEXTTYPE:<ALT>t<ESC>><WAITWIN2:000010:000000:Microsoft Word><TEXTTYPE:<ALT>b><TEXTTYPE:<END>><TEXTTYPE:<ESC><ALT><ALT>of><WAITWIN2:000010:000000:Font><TEXTTYPE:<ALT>c<ARROW UP><ARROW DOWN><ENTER><ALT>h<ALT>h<ENTER>> <REM2:Word97 paste blue><TEXTTYPE:<ALT><ALT>ik><WAITWIN2:000010:000000:Bookmark><TEXTTYPE:StartColour<ALT>a><WAITWIN2:000010:000000:Microsoft Word><CLIPP><TEXTTYPE:<F8><CONTROL>g><WAITWIN2:000010:000000:Find and Replace><TEXTTYPE:<ALT>ob<ALT>eStartColour<ENTER>><IMSD:100><TEXTTYPE:<ALT>t<ESC>><WAITWIN2:000010:000000:Microsoft Word><TEXTTYPE:<ESC><ALT><ALT>of><WAITWIN2:000010:000000:Font><TEXTTYPE:<ALT>c<HOME>bb<ENTER><ENTER>><WAITWIN2:000010:000000:Microsoft Word><TEXTTYPE:<END>><TEXTTYPE:<ESC><ALT><ALT>of><WAITWIN2:000010:000000:Font><TEXTTYPE:<ALT>c<HOME>b<ENTER><ENTER>> What do you think?! Randall
  6. Hi, Rob, I think you would need to "bookmark" the spot you were going to paste, then pste, then edit/ select back to bookmark, then change font colour to what you wanted. Best, Randall
  7. Hi Guys; Lots of thoughts; I hope someone inPGMacros has done this, and can help WORK-AROUND?????============== To follow logically; it seems hard to import individual macros. A work-around would be to keep a separate Macro Library file on the server and keep a list of macros which should be deleted/ re-imported fresh each day; that seems to me to be achievable? 3. import the new version from the group-directory ?works if "Select All" (individual ones do not select easily unless the first few letters of the macro name do not clash with any other?) What do you think? Randall Would this work? - Seems to work OK so far as below? updater.mxe
  8. Sorry, in a rush, There are tabs , if you do this in excel, just to see it working; I don't know if you have tabs?; you may need to paste, to Notepad, recopy to Word, and look at what you had using the "Show'Hide" tabs , paragraph markers etc?; If you have tabs or other marker; set them as per Floyd (needs you to modify); If you look up Floyd's "{Single Dimension Sort}, he counts things in variables after finding sometrhing; Hope this starts you! Best, Randall
  9. Hi Cyberchief!, It doesn't sound very hopeful! Does the "Getcontrol" get any text? - usually only the Window title (when control is just a frame), as far as I know. Can you select all the fields at once? (Control-All, or edit select all, or drag mouse over screen to select, right click, copy to clipboard?) - if you can, then you can copy to clipboard, then to a variable, then count tabs between text found in your variable for use in your macro . Good luck - btw, I think Floyd had your program, so he may be able to help more. Randall
  10. The answer is bit late; from the old newsgroups; using the date format comparison again!: Same as setting the date from the string; Convert STANDARD Date String to any Date Format integers derived from afile Delete files older than a certain date I need to use the “Direct Editor” (or run it in a macro as I prefer) Apart from these 3 uses, and arrays, Floyd, “Increment variables” does anyone know of other commands in Macro Express which require the direct editor like this? Interested, Randall
  11. Again, shows File Dates by integers”immediately” converted to a “comparison date sting value”; direct editor/ “RMIV” command; I have thought it would be easiest to use a sort program for this; first creates a list of files in the directory, sorted by date, then shows in a text file those that would be deleted if you chose to keep the last “x” files . The “Sort” is a .vbs derivative of Floyd’s vbs sort; runs in 2 lines as “Run Macro in variable” Let me know; Randall ListDirectorySorted_maybeDeletd.mxe
  12. I know that there was an answer from Joe Wienpert about this on the old Newsgroups; The date format function with Direct Editor gives a shorter, way, and I thought some might be interested; using... The attached macro shows this in more detail, though only makes a file showing those which would be deleted until you would activate it! Randall EDIT - PS If you want exactly 24 hours, use original version here, else if you want "more than one Date" ago; use "yyyyMMMdd" as in the link below. Delete All Folders older than 1 day (date) You can make it recursive through subfolders too, if you change the "Repeat with Folder" line appropriately. Let me know if problems. Best, Randall DeleteByFileDate.mxe
  13. Hi Hilton, Yes, you should be able to open your "Open" Dialog, "Wait for..", "Home" key etc; run your action macro in a loop as in my "Print Macros to file" macro; Will this help? I imagine you are nearly there anyway. Best, Randall MacroPrinter.mxe
  14. Maybe someone else knows! - Can you tell if the "Control Details" are different if you capture them on the different prompts? - if, so, ME is waiting for the control, so the Window title might not matter; if the converse, ? still a problem? Is it only working now because you use "ALT-y" anyway, rather than anything to do with the capture? Best, Randall
  15. HiNiall, I have found in Word 2000 on that i need <Alt>y for this quite often, but I have not conquered it in a reproducible way. this works in word when it wants to open an Excel Link; I am not sure in Excel? (re-program window Name and Control.....?) And ? overkill; hey, it works! <GETCONTROL:01:WINWORD.EXE:002:#32770Microsoft Office WordButton&Yes><WAITWIN2:000010:000000:Microsoft Office Word><OR><WAITCONTROL:000010:000000:01:03><SETFOCUS:01><TEXTTYPE:<ALT>y> Not very logical; Let me know if you win! Randall
  16. Macro menus; I have not used these; but is this what most people do? - isn't it a bit bothersome? Shortcut keys for me are used so often and so few in day to day work that I don't easily forget them? Randall PS - I missed kevin's note in this thread; I would have to re-organise everything to do that, but sounds worthwhile? kevin's note
  17. Yes, fantastic! Only 2 days - well done, Randall
  18. Hi Bernd, I am fascinated with the "OR" between "WAIT FOR..", and did not know about it before. Was this a commonly known option, and there any sample macros in the help files or tutorials which demonstrate this? I think it would make quite a difference to a number of my macros in terms of making them less complicated. Many thanks in anticipation, Randall
  19. Hi again! For my 2 penneth... I agree there are many ways; this is shorter, but perhaps not so easy to read or change? What do you think, Floyd? Randall
  20. Hi, Good fun! 0305 0205 <REM2:Set Current date by MMYY to Var %T1%><DT:MMYYT:01:1:><TBOX4:T:1:CenterCenter000278000200:000:Current MonthT1=%T1%><REM2:Set %N1% months back; date by MMYY to Var %T1%><IVAR2:01:01:1><DT:MMYYT:01:3:{P00000}{P0%N1%}{P00000}{P00000}><TBOX4:T:1:CenterCenter000278000200:000:Back by %N1% MonthsT1=%T1%> <REM2:Set %N1% months back; date by MMYY to Var %T1%><REP3:01:000000:000001:00003:1:01:><DT:MMYYT:01:3:{P00000}{P0%N1%}{P00000}{P00000}><TBOX4:T:1:CenterCenter000278000200:000:Back by %N1% MonthsT1=%T1%><ENDREP> See my note on dates and the help files; Date Formats [PS - Do you search this Forum as well? - on top right of Web Site? -I have some difficulty with it, as it seems to me to miss some things, and I enter my queries a number of different ways before giving up! - There is also the old newsgroup archive of answers somewhere.... I think at PGM site?] Best, Randall EDIT1; added code which shows the repeat
  21. Hi Nicholas! Fantastic! - If you take the text file part out of Kevin's, he produces 3000/5000 random numbers in 2 seconds; yours about 0.5 secs by my reckoning. They both use large strings, though, and I guess string and environment constaints would affect things; yours 8 secs for 30,000/50,000 (his longer ? 60secs?) , but I did not bother waiting for 300,00/500,000 on yours! What would it be like to do it with a text file instead of a string, so its unlimited? (Can you change your "pause" to Text Box Display so we can see more (and enlarge it "manual"?) Best, Randall PS where did you learn to do that!?
  22. Hi I would agree that the drop down box needs the integer, most likely, though it still may be simpler if you have the month. Here is the conversion from “04/05/67” DOB to month of year, without needing “Case” or “Switch” or “If”; [Really only 3 lines if you already have the date in the string, and wu uppercase or display] (Returns “MAY” in Australia, but probably “APR” in USA, so watch format;) Best, Randall <TVAR2:95:01:4/5/67><TMVAR2:07:95:00:000:000:\s00:00:00><TVAR2:34:01:<DT:MMM\sT:12:2:%T95%>><RUNMACVAR:34><TMVAR2:12:12:00:000:000:><TBOX4:T:1:CenterCenter000278000200:000:T12T12=%T12%> Or set Date as you wish it in T96; Produces; Australian Date Format: T12=Thursday, May 04, 1967 [4/05/1967] <TVAR2:95:01:04/05/67><TVAR2:96:01:dddd, MMMM dd, yyyy [c]><TMVAR2:07:95:00:000:000:\s00:00:00><TVAR2:34:01:<DT:%T96%\sT:12:2:%T95%>><RUNMACVAR:34><TBOX4:T:1:CenterCenter000278000200:000:T12Australian Date Format: T12=%T12%>
  23. Hi, Good Luck! I am just saying that may may wish to start your search loop at a constant spot; and even just grabbing the control of your frame may help; eg in the above example (did you try to go to the "My Control" page from the link at the top of this page?), even using (quote comes from selecting lines in editor, "Edit", "Copy Command Text") (Codecomes from selecting lines in editor, "Edit", "Copy")! <GETCONTROL2:01:IEXPLORE.EXE:IEFrameWelcome to your control panel - Microsoft Internet Explorer000:><TEXTTYPE:<TAB>><REP3:01:000001:000001:00008:0:01:><TEXTTYPE:<SHIFT><TAB>><ENDREP> may help. Do you understand you can paste this Code (But not the Quote!) into your editor in a new macro and you can read it? You are right; once you are in a field, you may need <CONTROL><<END><CONTROL><SHIFT><HOME> or similar to grab text? Copy to clipboard for comparing; Then easier to copy to a variable if you are going to manipulate and change text; save back the changes later Once you get to string manipulation, there are all sorts of "Edit Replace" options etc within string variables Best, Randall
  24. Yes cyberchief, I think you mis-understand if you are concerned already! Finding the text in the text field is easy once you have found the field; it is just hard to say how to find the field without knowing what terminal you are using (Does your program have a name?), and whether "Get Control" works! Did you try it? Otherwise, you may need to set your cursor somewhere (there will be one control or other available to "Set Focus to control"), and repeatedly tab through all the fields, copy text to the clipboard, check if it contains the text you are looking for? -You will still need some identifier that the data has chnged from the last check; is there something you can check for or change yourself in a particular field (or even in any field) that would identify it as "the old screen"? Kevin's comment is in the hope you wouldn't have to even start doing this till you knew something had changed on the screen in a certain spot (but that may not be the case) Best, Randall Try this in "My Control" screen on this Web - Page; If you find the field you want accepts focus, set that field and you don't need to tab You will have to give this macro a hotkey (eg CTRL_SHFT_X), and hover the mouse over the explorer address field to run (Write in the "Quote" or copy in the "Code" to Scripting editor) <REM2:If you find the field you want accepts focus, set that field and you don't need to tab><REM2:You will have to give this macro a hotkey (eg CTRL_SHFT_X), and hover the mouse over the explorer address field to run><CAPCONTROL:F:1:1:><REP3:08:000002:000002:0001:1:01:N1><CLIPE><SETFOCUS:01><WAITCONTROL:000010:000000:01:01><TEXTTYPE:<TAB>><IMSD:100><REP3:01:000001:000001:00008:0:01:><TEXTTYPE:<SHIFT><TAB>><IMSD:100><ENDREP><TEXTTYPE:<CONTROL><SHIFT><HOME>><CLIPC><TVAR2:01:03:><IMSD:200><IFOTH2:08:1:snippets><EXITREP><ENDIF><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:Text I have changed...IS changed (if you change "snippets" to what you likee, then check for it) ======= %T1%> It's messy using the mouse hover (replace it with "Get Control" or Capture with mouse coordinates if they are stable) ; it may not work if you are using a different browser anyway, or if you have different numbers of tabs due to extra toolbars etc), and you may have to abort yourself -But just to give you an idea of "looking for text in fields" as you say) - Yu may want to adjust it to copy every tab to the clipboard and examine it to see where you are;?
  25. Hi, everyone, ** ** "Date differences" calculator was probably OK unless you found a way to make it look ahead in time; now corrected in "Basic ME" ****) **) I want to make a case that the Helpand Tutorial files would benefit from some extra instruction on the Date format command, as it can be so useful; Since Robert brought my attention to the usefulness for comparing dates; Robert's Note I have made use of this in a number of other ways which might not have been apparent from the instruction in Help Files and Tutorials; Eg 1. To help make a backup file with yesterday’s date in correct format Yesterday's Date 2. It helped to make “XcopyME” which copies or synchronizes folders, only copying new or newer file versions XcopyME Newer Files 3. It helped also to make a macro which can calculate Date and Time differences without resorting to VBscript or external programs; Date Time Differences or Date Time Differences HTA or compare accuracy with VbScript (minutes only), attached below DateDifferencesVBS 4. It may help to put Date formats in simply, or elegantly; Date Format Letters 5. It may help with naming a file, as in Floyd’s temporary name; Identifying Date File Name 6. To help work out when time is up, waiting for a time difference or time ahead; **PROBABLY NO GOOD AS LOOKS AHEAD IN TIME?***Set time ahead for action 7. To convert dates in one format, to extract month or change format (eg to comparison string as below further) Extract Month name from Date or Convert STANDARD Date String to any Date Format 8. Cycle through Dates by months back; in loop; Cycle back through months in Date Format String 9. Set system date in variable; using “Direct Editor” syntax. Set system date 10. Delete files older than a certain date (or certain number of files); use integers form File attributes to “immediately” format date as comparison; Delete files older than a certain date AND DeleteByFileDate2.mxe ANDMake A List Of Directory By DateANDList Directory may be renamed Other examples: 11. - dddd, MMMMpqr ddpq yyyy, t - Saturday, March 19 2005, 1:06 AM 12. c 19/03/2005 1:07:06 AM 13. dddd, MMMMpqr ddpq yyyy, hh:nn:ss:z Saturday, March 19 2005, 01:07:23:796 14. dddd, MMMM dd, yyyy, hh:mm:ss Saturday, March 19, 2005, 01:07:47 15. yyyyMMddhhnnsszzz (for comparing dates) 20050319010948718 What do you think? Best, Randall
×
×
  • Create New...