Jump to content
Macro Express Forums

randallc

Members
  • Posts

    434
  • Joined

  • Last visited

Everything posted by randallc

  1. Hi, Bernd, Here's a dual- - language Current Date attempt; What do you think/ Macro Playback Speed: Normal Speed // Alt+3 dates: Sunday, the 16th Feb. 2003 17:11 Variable Set String %T99% from Clipboard If Folder Exists "C:\Program Files" Variable Set String %T98% "th" Variable Set String %T97% "" Date/Time: Save " - dddd, MMMMpqr ddpq yyyy, t" into %T1% // use MMM if you only want 3 letters of the month Else // POSSIBLY NEEDS RE_ENTERING TO GET GERMAN MONTH NAMES? Date/Time: Save " - dddd, pqr ddpq MMM. yyyy, t" into %T1% Variable Set String %T98% "." Variable Set String %T97% " den" End If Replace "pqr" with "%T97%" in %T1% Replace "pq" with "%T98%" in %T1% Date/Time: Save "dd" into %T2% Variable Modify String: Delete Part of %T2% If Variable %T2% <> "1" Replace "1th" with "1st" in %T1% Replace "2th" with "2nd" in %T1% Replace "3th" with "3rd" in %T1% End If Text Type: %T1% Text Type: <HOME> Variable Modify String: Save %T99% to Clipboard <SPEED:00001><REM2:Alt+3 dates: Sunday, the 16th Feb. 2003 17:11><TVAR2:99:03:><IFOTH:02:1:C:\Program Files><TVAR2:98:01:th><TVAR2:97:01:><DT: - dddd, MMMMpqr ddpq yyyy, tT:01:1:><REM2:use MMM if you only want 3 letters of the month><ELSE><REM2:POSSIBLY NEEDS RE_ENTERING TO GET GERMAN MONTH NAMES?><DT: - dddd, pqr ddpq MMM. yyyy, tT:01:1:><TVAR2:98:01:.><TVAR2:97:01: den><ENDIF><TMVAR2:21:01:01:001:000:pqr%T97%><TMVAR2:21:01:01:001:000:pq%T98%><DT:ddT:02:1:><TMVAR2:11:02:00:002:001:><IFVAR2:1:02:2:1><TMVAR2:21:01:00:001:000:1th1st><TMVAR2:21:01:01:001:000:2th2nd><TMVAR2:21:01:01:001:000:3th3rd><ENDIF><TEXTTYPE:%T1%><TEXTTYPE:<HOME>><TMVAR2:16:99:00:000:000:> eg Puts English Date as; - Saturday, March 19th 2005, 1:03 AM Best, Randall
  2. hi again, Q2. If you are doing it with a Web browser, I'm definitely not experienced in it and I doubt you could use Windows controls; you could check if they have any (run "Get Control" and drag the Bull's eye/ crosshairs on to the data box) Q1 "Wait for Window" Will wait for "partial" titles, so if there is a change in the Window title, it will wait for the new text; or you can run a loop (repeat) to keep checking the Window title for a change. Best, Randall - (away from computer now - good luck)
  3. hi and Welcome! i doubt if you're dreaming, and some of the experts here may well be able to help! Iam not sure if I can. .... Q1 - Yes, if there is a new "screen" which presents with the new data, "Wait for Window Title" would do it. - - If a new file presents, "if File exists" or "wait File exists" will help - just a matter of identifying it. Q2. - I am not sure if you are trying to do this from database program, running, with input screen, or from a database file of some sort -directly? Either are probably possible..., but very different starting points. (eg use "Get Windows control text" on the one hand, or "text file process" on the other. Best, Randall
  4. Hi Bernd, I am surprised that you got the macro to work like that, as your "Get control" still has English "Address Book" in it; perhaps that is why the middle click doesn't work. I have not been using middle click for long; does it often give problems? For macros people may use on dual systems, you could put in an "if" for language; eg I presume you don't have to change the "clipboard" wording yourself? I'm not sure of the German name for the "Properties" Window? You don't need the full path of "wab.exe" as it is in the system path. You may still have to run "Get control" yourself; Open "Address Book", double click on "Get control" in this macro; set "Hide Macro Express", run "launch", pull cross hairs onto the editing box you want, "Save", "OK" Then edit "Get Control" again, and see if there is still alanguage problem (or send it to me); "Top level Window Caption" can be %T98% as only needs to be partial anyway; there may be another English/German string to make in the "if " declaration depending on "Display Control Info" data; ? in German. It may still be possible to put in a language provisional string in the "direct editor" if you have German alternatives to "%T98% - [WABBrowseView]" and "Edit"! The macro then excludes the "ESC" key which I have found wanting at times; someone only has to have put a click in the wrong place and it may not work? - You may have found it reliable enough in your situations though... Best, Randall <SPEED:00001><REM2:Alt+F10 OE eMailadresse einfügen an Cursorposition+RM Alt+F10 OE Find&Enter eMailaddress at Cursorposition+RM Fester-Namen/window names that have to be changed with Edit-Search&Replace : Adressbuch=Address Book T99=Clipboard/Zwischenablage ><TVAR2:96:06:><TVAR2:99:03:><IFOTH:02:1:C:\Program Files><TVAR2:98:01:Address Book><TVAR2:97:01:Properties><ELSE><TVAR2:98:01:Adressbuch><REM2:What is the German name of your "Properties" Window?><TVAR2:97:01:Eigentümer><ENDIF><LAUNCHNO3:0:0112%T98%<LAUNCH:wab.exe><WAITWIN2:000010:000000:%T98%><GETCONTROLP:01:WAB.EXE:002:WABBrowseView%T98%Edit><TBOX4:T:3:000572000036000427000114:000:Name ?Enter searched name. Then Right Mouse Click on the name to continue (or select with right mouse immediately) Gesuchten Namen eingeben. Weiter mit RM=Rechterer Mausklick auf dem Namen><SETFOCUS:01><WAITRM:000010000000><LCLK><MSD:10><TBCLOSE:NAME ?><MSD:10><TEXTTYPE:<ESC>><MSD:10><TEXTTYPE:<ALT><ENTER>><WAITWIN2:000010:000000:%T97%><TEXTTYPE:<TAB>><CLIPC><MSD:10><WCLS:%T97%><WCLS:%T98%><ACTIVATE2:%T96%><WAITWIN2:000010:000000:%T96%><CLIPP><MSD:10><TEXTTYPE:<HOME>><TMVAR2:16:99:00:000:000:> AltF10.mxe
  5. Hi thefluxter, Interesting to hear your thoughts for us home hobbyists! I think Kevin was elegant in text file process for this, in the same thread; on top of what I had suggested; the repeat loop is probably as efficient as Macro Express gets? Kevin's random macro Best, Randall
  6. Hi, Bernd! I haven't used Outlook or the address book much till now, but your macro is good and makes ne want to consider it! I guess you could do something more to maintain focus with a control; I imagine what works on my machine may not on yours! You would have to re-program the "Wait" windows and the controls for the German text. <SPEED:00001><REM2:Alt+F10 OE Emailadresse irgendwo einfügen/Find&Enter Email ><REM2:Alt+F10 OE Email address somewhere insert find/&Enter Email ><TVAR2:01:03:><LAUNCHYES3:1:0112Address Book<LAUNCH:wab.exe><WAITWIN2:000010:000000:Address Book><GETCONTROLP:01:WAB.EXE:002:WABBrowseViewAddress BookEdit><TBOX4:T:6:000618000063000400000137:000:NAME ?(Enter searched name.) Then Middle Mouse Click on the name to continue (or select with middle mouse immediately) (Eintragen gesucht nennt). Dann Mittleres Mausklicken auf dem Namen Fortzusetzen (oder mit mittlerer Maus sofort auszuwählen)><SETFOCUS:01><WAITMM:000010000000><LCLK><TBCLOSE:NAME ?><TEXTTYPE:<ALT>FR><WAITWIN2:000010:000000:Properties><TEXTTYPE:<TAB>><MSD:0080><CLIPC><MSD:0080><WCLS:Properties><WAITWLF2:000010:000000:Properties><WCLS:Address Book ><WAITWLF2:000010:000000:Address Book ><CLIPP><TEXTTYPE:<HOME>><TMVAR2:16:01:00:000:000:> What do you think? Best, Randall
  7. Hi again! Alternatively, Again, you can retrieve the filename without extension as one of the options in " Variable set from file" (in file commands) %T2% fromFile as part of filename OR! Get the length of your MacroName in a variable, and "variable string modify" "copy part of text", length 4 less than length of name! Best, Randall
  8. Hi, SGinn, Welcome! I am not sure which Macro Express command you are using to download - do you mean "FTP Get File"? My first thoughts would be; 1. you could accept the default save , then copy to a folder and file name you name in "File Copy" (first use Variable set eg %T1% from Current date/ time (Text,/Date command) to add it to your file name) [if you need part of the default name to be retrieved, use Variable set from file (in file commands) %T2% fromFile as part of filename] 2. Do the same in the Get file command itself? Best, Randall PS you could also prompt fora filename and folder at runtime if you wanted, but I presume that is not what you are asking?)
  9. Hi IceBox, Thanks! I always appreciate seeing how others do their coding; I always learn something! Best, Randall
  10. Hi BenJAMin, Welcome and good wishes! Depending on why you would want to do that, there may be various answers, I guess. i can think of setting it to stop if you "Alt-tab" to another topmost window, for instance. Probably no good for your situation?; Searching the site may be relevant; as may this note from Joe? - I will be interested to hear if you solve the problem. Macro Abort; change message?] (Seems to have worked OK for me once I have set it in "tweakme.mxe" as in Joe's note) Best, Randall
  11. Hi everyone, I think I have it right now! I was originally thinking that the XCOPY GUI could be used particularly for people who are using to learn the DOS XCOPY, but the other options provide for normal usage from the Windows Explorer box as well, to copy files between directories and only overwrite if the files by newer, or from certain dates (if one uses the DOS option). I am finding it useful for myself, with its interactive use with Windows Explorer to choose the directories (especially if you follow the subsequent procedures with "middle mouse button click activation"), but it will also work as a standalone macro. It allows picking files or directories or dates by clicking on buttons on the form if necessary. Usage 1. Download the playable macro to the desktop, preferably, though, your macro express directory, or somewhere on your Windows path should also work. 2. It can then be run directly from the desktop or wherever, or any shortcut. 3. Alternatively, and preferably, import it to your current macro library, and set it with "middle button click", anywhere on the screen, scope "Windows Explorer". (It will then allow the selection of your two directories with a middle button click before the form loads even - though it will remain flexible and allow you to change these in the form) 4. Once the directories are selected, or the form is loaded, you can change any directory or any option as necessary. 5. You can suppress the generation of a new macro which may be used in subsequent macros, by clicking on the appropriate checkbox. 6. You can elect not to use the DOS settings at all, and just use "copy any newer files" using XcopyME, and not using DOS at all. I have found it a useful exercise to be able to program the buttons to run small playable macro express macros, passing control completely over to the HTA form initially, and starting the macro express macro again after submission of the form. Please let me know if you wish to know any more any details about the programming Best, Randall. (PS again, I am interested to have any feedback as I can only run this on a couple of computers to check it is working appropriately) *** WOOPS -posted again as I'd not posted last file; was not running unless Explorer open, and was not initialising properly**** (if you already installed it, delete "XcopyGUI3.mxe" AND "Xcopy3.hta" from your Macro Express directory first) XcopyGUI3.mxe
  12. hi again, I have always wanted to have XCOPY where I did not have to go to the command line! This adds to my previous suggestion of using XCOPY without going to DOS at all, but without so many options. XcopyME I wonder if someone can help me out with two issues. 1. What is the format for the date (in DOS Xcopy) if one copies from a specific date.? In Australia, at least on my computers, Windows 98 requires the local regional date (d/M/yy), whereas Windows XP in DOS requires the American format with a month first! I wonder what the experience is in America for instance, and Europe?/ others in Australia? 2. I am having difficulty making the HTA form “pause". "Sleep" does not seem to work as it should in VB script. This means I have to put in an extra "Enter changes" button after one changes with the directory button. Does anyone have any ideas? Please let me know if there are any other concerns about the XCOPYs of various sorts! All the best, Randall. PS I will post an update to the form maker that will allow easier adjustment of previous forms. Do others have any ideas or plans for future HTA/ ME synthesis to add functionality? Form Maker PS This XcopyGUI3 (btw playable and works in Windows98 on)makes a playable macro which runs its own DOS bat file with the generated Xcopy options. Simply import the macro, rename it and call it . It times itself to wait till dos bat file finishes. You will need to keep the dos file in Macro Express directory or move it if you change computers! (See image next post) Now upload working - but I have put v2 as less buggy for now; email me for a copy of3 if you want XcopyDOSGUI2.mxe
  13. Hi, To explain; I could have asked it to do exactly as you say, but am not used to that, as it would tie up Macro Express perpetually (you would not be able to use it for anything else as it would always be running for "waiting"; I would rather such a process just run briefly every minute to check if it needs to act or not. ** (Also, first ; "File "/ "Import"/ "Import Playable macro" from Macro Editor) I'm disappointed if it did not even run; check the file in your "Temp" directory called "RandomTime.txt"; if you only ran it once, it will have made a time 35-45 mis ahead stored in there; if you run it again, it will probably do what I have asked; "Display Text Box"; you need only un-delete the line to get your action if that time is elapsed. After the first "Else" in about line 10, put if you want a delay and insert there. Best again, Randall (but, yes, you will need to take up the cudgel and at least get the scheduler AND editor working (easy; in "Properties" tab at top; Click schedule box, click "Set Schedule" Click "Other" Box Click "Play Macro Indefinitely" box At bottom; "every - " 1 minute, 0 secs)
  14. Hi fluxuated, Welcome to the list! I have a "Advanced Sticker" here on the list, but only cause I ask so many questions! The macro below is not guaranteed (just set to show a text box when due at present, not do your actions.) I imagine you would the macro want to check you are in the correct program/ Window (or Activate it) before sending your key commands. I don't think it is all that simple in Macro Express, as I cannot "set a timer" from a macro to schedule a macro to run. (Others may know how?.....) The macro below needs you to import it to your Macro Library/ File, then schedule it to run every minute from the scheduler. It works by setting a random due time, and saving it in file. Every minute the macro will load the text file to variable T4, to check if the due time is in the next minute. If it is, it will keep running and check every second if time's up. If you wanted less accuracy than seconds for your random time, it would not need all of this. When due, it performs your action (see above), sets a new random due time, and exits the repeat loop; it stops, ready for your schedule to run it every minute. Please let me know if the timing is wrong! Best, Randall TimeRandom.mxe
  15. Hi, TG, I had asked this question before; Xcopy emulation See Floyd and Joe have comments; Xcopy2 I think I have an ME Xcopy working well? - it copies only newer files into the destination directory, ( in folders as well, and not empty directories) (at end of file is whole macro in "Run Macro in Variable" 2 lines as well) Best, Randall (cf - XcopyGUI - on other thread for more options) XcopyGUIdos XcopyME.mxe
  16. Hi Kevin, Thanks! It still seems somehow indirect and non-intuitive using all this unreadable T1/N1 gear! I just want to use names, as for environment variables (but can't read them in script editor mode) for strings, or registry integers (acn read!) for integers! Perhaps I can write them this way for easier understanding, then convert to the "better" code! Do you use the "text process" for all this sort of "array" loop processing? -I realise it is efficient (Is the file kept open by the process command, as I realise it is fast too?) Best, Randall
  17. Hi, Iceman, Kevin, I'm still learning; I woould have to use the registry or similar for this; is there a better way? <REM2:INITIALISER><TVAR2:01:01:HKEY_CURRENT_USER\Software\Professional Grade Macros\PGM Functions\Swap\><TMVAR2:19:01:00:000:000:Reg><REM2:Get random><REP3:01:000001:000001:00080:1:02:><REP3:08:000002:000002:0001:1:01:N1><IVAR2:01:06:240><DIS:<IMSD:100><NMVAR:05:01:0:0000002:0:0000000><TVAR2:05:01:0><IFVAR2:2:01:4:99><TVAR2:05:01:><ENDIF><IFVAR2:2:01:3:10><TVAR2:05:01:00><ENDIF><TMVAR2:08:05:02:000:000:><IFVAR2:4:03:8:T5><REGWINT:1:%Reg%Random%N2%><EXITREP><DIS:<ELSE><DIS:<TBOX4:T:1:CenterCenter000278000200:000:Repeat NOT exitN1=new RandomNumber=%N1% N2= Number we're doing=%N2% N3=%N3% %T3% ><ENDIF><ENDREP><TMVAR2:07:03:00:000:000:%T5%,><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:%T3%><DIS:<TVAR2:01:01:><DIS:<TMVAR2:17:01:00:000:000:C:\WinNeeded\NewFile.txtF><DIS:<REP3:01:000001:000001:00080:1:01:><REM2:Read N1th random number from Random%N1% in Registry; ---into %N2%><DIS:<REGRINT:2:%Reg%Random%N1%><REM2:If you were processing text files, or excel sheet in csv format,><DIS:<BTFBEG:001:N00002:000001:C:\WinNeeded\fivehundred.txt><DIS:<TMVAR2:20:01:00:000:000:C:\WinNeeded\NewFile.txtT><DIS:<BTFEND><DIS:<ENDREP><DIS:<LAUNCHDEL2:0:01C:\WinNeeded\NewFile.txt> Best, Randall
  18. Hi again! See also Joe's recent comments about how to learn at this link; Joe and scripting also Floyd's introduction here HTA Forms -how to... Here is a further remedy along the way. It is not really ready for consumption, but I don't have time for making it neat, and it work sometimes! It is a full Library file to generate a new form in a playeble macro; you design the form for field and button number and names as you go. Not for Win98 or WinME though! FormMakerLibraryFile There are "Script" sites to be found on the internet too. Best, Randall
  19. Hi, again, I thought someone might want to try this ("beta test"!) utility to generate a new playable macro with an inbuilt form you have designed. A new utility as a Macro library (Set of Macros); double click on it to start it in Macro Express as a library; "CNTL- SHFT-N" to run it. It starts with an example; you change the form name or field names, say how many types of input you want, then you will be prompted for the name of fields, buttons, or whatever to be displayed. 1. Fields (10)_________________Max10______(T11-T20) or Registry entries Name1, Name2 etc to 10) 2. Radio Buttons______________Max10______(T21), only one answer 3. Multiple Choice Categries____Max4________10 available in each (all in T22, comma delimited) 4. Single Choice Drop List______Max10_______(T23), only one answer 5. Check Boxes______________Max10_______(all in T24, comma delimited) Whatever name you give your form, a new playable macro will be placed on the DeskTop of Current User, and can be imported if you "Reopen) your usual Macro Library. I hope you can re-run it to make changes (for now I think only if you have not made another one since) Feedback of interest; I realise that input is not limited appropriately etc; It does not run on Win98 or WinME Best, Randall Randall[randallc@ozemail.com.au] XCopyME1 - Shows small form with field and button input (HTA) XCopyGUI - generates macro and bat file (HTA) Newer version7; FormMaker7.mex
  20. Hi, Rob, I have just tried to print the list with no problem! Font is on 8. In "details mode" (Menu -Options/ View/ Details), I just click on "scope" column to sort, then print; I am not sure you really need to rename them? (btw, to add print to file, "Add Printer" from Control panel, select Printers, "Direct connection", "File " instead of "LPT1", then Manufacturer "generic", Printers "Generic/text only") Best, Randall
  21. Hi Bernd! My goodness! I have not yet examined all your work, but that's amazing (Will i understand it much in English) - What is your story? Best, Randall
  22. Hi, rob and Joe, Same applies, I think, to printing the macros themselves.. I imagine changing the font might help as Joe suggests. For formatting, I have previously set the printer to "Generic/ Text/ File" (ie install a printer to print to a file), then formatted the text file it produces by opening it in Word. Best, Randall
  23. Hi, Bob, Here is a first attempt at a file-picker using the HTA call; not very pretty! -perhaps you can beta-test! I have written this program in response to requests for a file picking program in Macro Express. This utility uses the HTA system in Windows as described on the macro express list recently. Obviously it is not as expert as if an appropriate call to Windows were made, but I am not sure of any other way to pick files in a multiple fashion using macro express. If anyone else knows this, could they please let me know! It has not been widely tested, but does seem to work on Windows 98 and Windows ME as well as Windows 2000 and Windows XP as one would expect. I have given an example which is deleted at the end which did work for file transfer protocol for some of my files and demonstrates the use of the results in the registers, Name1, Name2, Name3 and so on (FTP; just insert your own address details). The results are also comma-delimited in the string T22. (There's also an option in the deleted loop to save to a text file; you could loop the program up to here, change it to append each time to the file, (without FTP initially) and select programs from further directories, then "text file process" to FTP loop usingthe text file?. This program works by "writing" an HTA script in three parts. The first and last parts are simply put in by strings. The Middle part is a loop, inserting a line in the script for each file found in the selected directory. If there are any problems with this program I would be interested to hear about it, and my e-mail address is randallc@ozemail.com.au. Best Randall FilePickerTXT.mxe
  24. Hi Bob, Nice to see another member! I'll be interested in other's reply; I don't think there is an inbuilt MultiFile Picker? It would be a good request for add-on? I could write one, given time! Here's my suggestion in the meantime; copy files to an "Out" folder, then FTP using a wildcard on files in that folder. (The rest of the FTP macro would run after you shut your "OUT" directory in this case. Either manually, or try this code (copy into ME editor) <REM2:FTP File Pick - -TEMPORARY SOLUTION?><MINIDESK><DOFILE:02:NN:C:\backup\FTP_OUT_Folder>><WAITFOLDER:000010:000000:C:\backup\FTP_OUT_Folder><DOFILE:02:NN:C:\backup\FTP_Moved_Folder>><WAITFOLDER:000010:000000:C:\backup\FTP_Moved_Folder><DOFILE:07:YY:C:\backup\FTP_OUT_Folder\**>C:\backup\FTP_Moved_Folder><EXPLORE:C:\backup><WAITWIN2:000010:000000:C:\backup><IMSD:100><EXPLORE:C:\backup\FTP_OUT_Folder><WAITWIN2:000010:000000:C:\backup\FTP_OUT_Folder><IMSD:100><REM2:Manually select and copy to the FTP_OUT_Folder ! - Hey, we're only trying here!><REM2:Macro continues when you close this OUT Window in Explorer><WAITWLF2:000010:000000:FTP_OUT_Folder><REP3:08:000002:000002:0001:1:01:N1><IFOTH:12:2:FTP_OUT_Folder><EXITREP><ENDIF><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:GO ahead to FTPFTP Send Files C:\backup\FTP_OUT_Folder\*.*><MSTOP><REM2:FTP command, chdir etc as usual;.......><DIS:<FTPCHDIR:1:abc><REM2:FTP command, to SEND all files from the out Directory....><DIS:<FTPSEND:1:A:C:\backup\FTP_OUT_Folder\*.*> Best, Randall
  25. Hi Guys, I have backup set in "Options" "Preferences" other direcory, past 5 times. On picture if it works! I usually set "Always"; I think that means every time you open or shut MEx? Best, Randall
×
×
  • Create New...