Jump to content
Macro Express Forums

randallc

Members
  • Posts

    434
  • Joined

  • Last visited

Everything posted by randallc

  1. Hi, Here a 2 things; 1. improve the way you are doing it (wait for windows etc) 2. Use the file and add to it without opening notepad; see below <LAUNCHNO3:0:0112Notepad<LAUNCH:C:\WINdows\system32\notepad.exe><TEXTTYPE:<ALT>fa><WAITWIN2:000010:000000:Save As><IFOTH:10:1:c:\AutoImports><DOFILE:02:NN:C:\AutoImports\>><ENDIF><TEXTTYPE:C:\AutoImports\><DT:MMMM dd yyyy(hh-mmAMPM)F:00:1:><TEXTTYPE:<END>><TEXTTYPE:.csv<CONTROL><SHIFT><HOME>><CLIPC><TVAR2:80:03:><TEXTTYPE:<ENTER>><TBOX4:T:1:CenterCenter000278000200:000:%T80%><LAUNCHNO3:0:0112Notepad<LAUNCH:%T80%><TEXTTYPE:<ALT>fo><WAITWIN2:000010:000000:Open><TEXTTYPE:%T80%<ENTER>><MRETURN><REM2:Better might be... ?><TVAR2:01:01:><TVAR2:02:01:c:\AutoImports\><DT:dddd d MMMM yyyyT:03:1:><DT:(h mm AMPM)T:04:1:><TVAR2:01:01:.csv><TMVAR2:17:01:00:000:000:%T2%%T3%%T4%%T5%F><REM2:Then later add to file or open if needed as originally><TMVAR2:20:10:00:000:000:%T2%%T3%%T4%%T5%T> What do you think? Best, Randall (Not a programmer here, just interested in the forum and learning...
  2. Hi Floyd! I like the Quicksort! I had to add 2 lines after the vbs program launch, else the program wscript would only appear to run once on some computers (had already finished before the check if running!); Best, Randall
  3. I have tried the registry write and read option; even easier to read? eg read a dual- layered array Case: B // Set Array String Number to Display; Example ,ArrayCurrent, number0, 47 Read Registry String: "%ArrayCurrent%(0,47)" Text Box Display: End Case Best, Randall ArraySetterReg.mxe
  4. Hi, I am also interested in using arrays in ME. I note Floyd has written about “RuninMacro” for this, and now .vbs script for sorting arrays. I am finding it difficult to set up simple arrays so far. Joe also comments on The multiple choice menu attached really only needs to use cases "C" and "D" in the macro to use your own arrays. Has anyone a simpler way? Array name stored in %ArrayCurrent% as environment variable. Array item (eg) 10 can be retreived from environment variable named from "%ArrayCurrent%(10)" (using modify string command) I am not sure of capacity, but have run the example in case "A" with 10,000 small strings; it could be adapted for integers, etc. Clearly not the speed required in the other examples in this thread? - but avoids the more complex "RunInMacro"? The macro really only needs cases "C" and "D" to run,; have others developed anything simpler? Best, Randall Case: C // Set Array String Number to %T2% Variable Set Integer %N1% from Prompt Variable Modify Integer: Convert %N1% to text string %T2% Variable Modify String: Trim %T2% Variable Set String %T10% from Environment Variable // Set Array String %T3% to Env Variable "%ArrayCurrent%(%T2%)" Variable Set String %T3% from Prompt Variable Modify String: Save %T3% to Environment Variable Variable Set String %T20% from Environment Variable Text Box Display: End Case Case: D // Set New Array Name to Environment Variable "ArrayCurrent" Variable Set String %T1% from Prompt Variable Modify String: Save %T1% to Environment Variable End Case ArraySetter.mxe
  5. Hi, Floyd, I have added an option to save the text field names instead; perhaps that makes my undocumented changes easier - sorry, I don't understand the HTA thing well enough; i presume you were expecting there to be problems with firefox etc, from what you have said? Randall Macro_Express3.zip
  6. Hi, Floyd. yes; Sorry I have not been clear. Once you would run that macro and name the buttons, the field text file will be generated as well as the button text file; Then use only the appropriate HTA %T1% . In "VarMultipleField " macro, I have set up the field form to run only if "hi" in firstname field; but you could then just use that in your own macro as a text input form, using that hta script; Variable Set String %T1% from Environment Variable If Variable %T1% = "hi" Macro Run: inputFieldChangeMulti // radioscript8 Variable Set String %T1% "<html>PGMCRLF<head>PGMCRLF <meta http-equiv= // radioscript7 Variable Set String %T1% "<html>PGMCRLF<head>PGMCRLF <meta http-equiv= Else // ScriptButtons2 - still allows option to bring up renaming form Variable Set String %T1% "<html>PGMCRLF<head>PGMCRLF <meta http-equiv= // ScriptButtons3 - scrip to use once stable, renamed Variable Set String %T1% "<html>PGMCRLF<head>PGMCRLF <meta http-equiv= End If Variable Set %T2% to ASCII Char of 10 Variable Set %T3% to ASCII Char of 13 So "Macro Run: inputFieldChangeMulti" imports the field names for the text field input form, then you can run "radioscript7" %T1% by itself as your new form for text entry (change the field names for text entry using the text file first). I know I have confused things by giving an example to re-name the buttons,; especially as Icould be using multiple check boxes using the macroExpress input for this! Yes; even setting Firefox as default does not start HTA with a firefox window, that I can see? Best, Randall
  7. Here is my update for people who would like to be able to use multiple field input from MacEx; It is not done by a programmer! Anyway, the zip now has 4 macros to import. 1. VarMultipleFieldForm 2. inputFieldChangeMulti 3. InputChangeMulti 4. Copy of Copy of ChangeMulti After running “Varmultiplefield” once, cancel. Then run again. Write “hi” in the top field. Re-run, re-name your buttons if you wish (by inserting field entries) By then, 2 text files will be in your “c:\program files\macro Express3” directory; 1. One for the form with 10 button names “Buttonsform1.txt” (edit these directly, and/or save them with various text file names for later use if you wish) You need never do this if you only wish to develop the one form. 2. One for the form with 10 field input names “fieldsform1.txt” I guess it will be a while before Floyd evolves his fully fledged macro for specifying what fields are needed. If anyone makes any forms to use by using his other buttons, could you please post them? If anyone finds this is not working as expected, please let me know! Best, Randall (PS Floyd – Opera and Firefox work for the “Halogens” etc; but do not re-size or “submit” MacroMultis.zip
  8. Hi, Paul, You may see 9multiple field input) that I have asked Floyd about calling VBA Word macros from his .vbs script access. I DO have the PGM macro library as well as the ME book.(library not yet used in any of my regular macros!) Will your addition allow calling previously written VBA Word macros? I don't look forward to having to write them all again in vbs? Thanks, Randall
  9. Hi, Floyd, Win98 with IE5.0 does not show the subcategory names ("Halogen" etc), and nor does Win 95 (as I can't update IE 5.5 in Win 95?) If anyone wants the single playable macro (hard to read), please let me know; it now also makes the text files to load whichever form you have previously made) Can we call VBA Word macros directly like this too? Thanks, Randall
  10. Woops, if you have bothered to look, I had intended to make my 2 forms able to accept the buttons without input in the fields; corrected main macro only attached. (btw, the macro not used in the zip download above ("ChangeMultiOrig") defines all the environment variables for the form labels in the original macro from Floyd (disabled as scrip1 in my "VarMultipleFieldForm" macro) Randall VarMultipleFieldForm.mxe
  11. this allows 10 input field (minimum zero) If the first field has "hi", re-running allows re-naming the buttons.; see thee pictures in the word document best, Randall macroExp.doc
  12. Hi Floyd, Thanks so much for the multiple field input. For those of us who are not programmers, I thought I would post my attempts to make those scripts usable from Macro Express; I have posted them as playable, but they need to be imported with the same name to interact; using environment variables to help setup my own forms. I have not yet set it up to save a text file with my own form field definitions for each task, which would be the next step. Someone who uses onlyME should be able to set up their own forms using this, without changing the VB sript any further. can it be simplified or developed further for easier use? Best, Randall Macro_Express3.zip
  13. actually, I imagine that it is easier than that! I imagine you are just waiting for various "windows" with your prompt in them, so that you can usethe macro express "wait for window to gain focus" and so forth. These are much easier to use. It is possible also to use the "windows control" options, probably better if they work, but also a little more complicated to program and understand. All the best, Randall.
  14. Thanks! I have bought it, installed it, but never used it! How do I integrate it with the macros I have?; do I have to import them all into my macro file? Thanks, Randall
  15. Hi again, Yes, I found i was going to have trouble comparing date and time in the text file, so used the hour of creation/ modification (command under variables list). (Minute and seconds can be used as well for accuracy as I showed) If we had an excel type date/time stamp that returned an integer for system time, I would not have done this. Perhaps someone knows how/.. best, Randall (PS, you are right, that i have not gone into the other details of the trigger file being deleted of course, just the conundrum you mentioned of comparing times.) (PS2 Do you see if you copy the "direct" code into your direct editor, say in "try1macro" to start a new one, you can then swap to script editor and see the commands I have written (whether accurate or not!)
  16. HI, I wanted to see this too; would others comment on my macro?- ANy better ways? I assume you have already saved your initial file, and compare current hour with hour of creation/ modification; (using Macro2 as above running every so often as a check;) Randall [LATER - please see better answers re date time differences etc in;] DATE formats, differences discussion ** Be WARNED; I am a novice; change the filename too if you are going to try it!, and save file first; make a functional "Timer" macro as macro3 too? // Set %N1% hour, %N2% min, %N3% sec from previously saved file Variable Set From File Date/Time // Set %N21% hour, %N22% min, %N3% sec from current time Variable Set Integer %N21% from Current Hour Variable Set Integer %N22% from Current Minute Variable Set Integer %N23% from Current Second // Add 24 hours if current hour less than hour at which saved (assumes no If Variable %N21% < variable %N1% Variable Modify Integer: %N21% = %N21% + 24 End If // Differences Variable Modify Integer: %N31% = %N21% - %N1% Variable Modify Integer: %N32% = %N22% - %N2% Variable Modify Integer: %N33% = %N23% - %N3% // Check hours If Variable %N31% < 6 Macro Return End If // Check mins If Variable %N32% < 0 Macro Return End If // Checksecs If Variable %N33% < 0 Macro Return End If Text Box Display: Difference Macro Run: Timer <REM2:Set %N1% hour, %N2% min, %N3% sec from previously saved file><VFFILE:0:1:F:1:F:1:F:1:T:1:T:2:T:3:C:\Program Files\Macro Express3\SavedVars.txt><REM2:Set %N21% hour, %N22% min, %N3% sec from current time><IVAR2:21:20:><IVAR2:22:21:><IVAR2:23:22:><REM2:Add 24 hours if current hour less than hour at which saved (assumes no interruption!)><IFVAR2:5:21:3:N1><NMVAR:01:21:1:0000021:2:0000024><ENDIF><REM2:Differences><NMVAR:02:31:1:0000021:1:0000001><NMVAR:02:32:1:0000022:1:0000002><NMVAR:02:33:1:0000023:1:0000003><REM2:Check hours><IFVAR2:2:31:3:6><MRETURN><ENDIF><REM2:Check mins><IFVAR2:2:32:3:0><MRETURN><ENDIF><REM2:Checksecs><IFVAR2:2:33:3:0><MRETURN><ENDIF><TBOX4:T:1:CenterCenter000278000200:000:Differencehours=%N31%;;mins=%N32%;;secs=%N33% ><DIS:<MACRUN2:Timer>
  17. hi, i'm new too! ? try; 1. macro1 to start recorder and write time file to finish at.. "recordtime.txt" 2. macro2 to check the file every 10 mins/ 10secs etc depending how critical (see the answer tomy question about starting program on another computer last week) 3. macro3 to change the txt file to abort early, or just "alt-s" or whatever 4 other macros can still run in between times. Best, randall -What do you think?
  18. A separate topic is probably warranted re DOS bat files; I presume ME does not try to emulate Xcopy commands in FileCopy so you can easily copy depending on the newer file? I tried it using logic and setting variables from files dates, but too clumsy? Best Randall
  19. I am interested in this, as I had to work around the "link"s not running from program launch previously. i thought it was a setup problem with Win XP on my computer, but I wonder if it is a bug. thanks to Joe for his book, which I read recently, by the way! I had to run DOS bat files directly rather than from their shortcuts. (A separate topic is probably warranted re DOS bat files; I presume ME does not try to emulate Xcopy commands in FileCopy so you can easily copy depending on the newer file? I tried it using logic and setting variables from files dates, but too clumsy? - i'll post as topic..) Best Randall
  20. Hi, Kevin, Thanks for the information and saving me thinking! I think I'm exhausted this week! Best, Randall
  21. Hi, I hope this is not silly question; I have two separate computers on the network, both running macro express. I would like to trigger a macro to run on the another computer, computer2, when I'm sitting at a different desk, computer1. Is this just a silly question and it should be obvious, or is it not possible? I am flummoxed. I have read the macro express book, and have not seen any reference to this. Can anyone help? Thanks very much, Randall Clapp.
  22. hi! Thanks very much for your advice; I really needed someone to pull me into gear and do some testing, as you comment. I tried your specific macros for copy and paste, which worked perfectly! I then put a pause in the macros I was using and after about 20 tries realised that the problem occurred if I had tried to paste to Microsoft Word after the other wordprocessing component of the second program had closed! Now I simply make my macro copy sooner and go back to complete the previous tasks. Is this a problem with any clipboard process anyway? At last I have the full table preserved with font, instead of just straight text, and I don't have to do all the further macros which were required to reformat! Thanks once again for making me think clearly; I am very much a hacker in using macro express, and tend to run very much by the seat of my pants. Nevertheless it has been a great bonus to running various programmes for me. Your sincerely, Randall Clapp.
  23. It seems that running control applet "internet options" in Win XP, the tab is incorrect if I ask for "connections", I get the previous tab; similarly for "programs" tab, I get "connections" etc; ? out of synch? Thanks, Randall Clapp
  24. I hope someone can help me simplify a problem I have worked around till now; form word, "clipboard copy" I think copies a table ok to paste later, but from another program i have with its own word processor inbuilt, a generated table willnot copy usin Macro Express "clipboard copy" command, nor sending "ctrl-c". if I do this directly rather than through macExp, it works OK in all versions of windows, 95, 98, XP, 2000! Can anyone please help? I presume there must be a diffence in the way MacExp copies to the clipboard than the way Windows does it, though the problem does not occur in Word!? Best, Randall Clapp
×
×
  • Create New...