Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. I'm completely lost as to the aim of the macro. "Then jump to the next line with is not 822 away but 2 Values away" escapes me as well as what "822 value" is. 822 lines down? across? 822nd character? What is being done with the 72 characters copied each time? Copied to the same variable? What is the point of that if so? If xxevilfrogxx has cracked it, well done! A few comments: If you want to make an endless loop (which normally you would exit with some If condition) you can use things like: Repeat Until T99<>T99 Repeat Until T99 = Never (T99 is not set in the macro so is always blank "") I was not sure what this does: Shift down Repeat Start (78) Right arrow end repeat Shift up Shift across a repeat seems unusual. What does the shift do? If you want to copy 72 characters you can use Variable Modify String and copy 72 characters to a new variable
  2. Something to be wary of with text strings in Debug; you cannot click on the content nor encase in quotes so you cannot tell if there are hidden characters such as spaces. The length of text string displayed is limited too.
  3. If you were not waiting for the file, you could otherwise use wildcards in the File Move or Copy, not requiring the Repeat with Folder: Path1\*.exe to Path2\*.exe which would move/copy all exe files
  4. I was quite disappointed when I looked at the Case command. I was trying to clean up multiple If statements. I found that there are many more possibilities with If (Equals, Contains, Greater Than, Exists etc) and Case is so limited to exact comparison.
  5. Take a look at the options in Variable Set Integer (length of string, position of text) Variable Set String (from Clipboard) and Variable Modify String (copying, deleting, replacing substring). You can do all the tasks you mentioned although not necessarily directly. It sounds like you have a rough idea of what to do. Ask if you need more info. PS, If you do a substring search and it is not found, the position integer variable will be 0.
  6. At the start of the code are comments about inputting data like "Input here %tTarget Date% and %tTarget ToD% by whatever means" and outputs as "Date/Time Variable is in %dSubtracted DateTime% "Decimal Time is in %decSubtracted DateTime% You strip out what is not needed. The "short" versions do not have the variable description lists nor any date input checking.
  7. My macro is not intended to be visible either. The only reason I added manual I/O capability was so that users can test to their satisfaction and then delete the dialogs. The speed of operation varies since it works from Jan 1st in the target year. Anyone with a Christmas delivery database could modify for Jan 1st of the following year and count back!
  8. If you cannot wait for the next rev, you can toggle the system tray menu using ME Explorer. It works where the Macro Disable command does not, closing the menu in the tray. You seem to get the opposite, menu enabled but does not appear. This is really crude and needs ME Explorer to be open. The code below will toggle "MenuA" in the mex file that is currently selected: Window Activate: Macro Express Pro Explorer Text Type (Simulate Keystrokes): <HOME> Text Type (Simulate Keystrokes): <ALT>s Text Type (Simulate Keystrokes): <ENTER> Wait for Window Title: Search Text Type (Simulate Keystrokes): MenuA Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ESC> Text Type (Simulate Keystrokes): <ALT>m Text Type (Simulate Keystrokes): b Window Minimize: Macro Express Pro - Explorer <WINDOW ACTIVATE Title="Macro Express Pro Explorer" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <TEXT TYPE Action="0" Text="<HOME>"/> <TEXT TYPE Action="0" Text="<ALT>s"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <WAIT FOR WINDOW TITLE Title="Search" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="5"/> <TEXT TYPE Action="0" Text="MenuA"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ESC>"/> <TEXT TYPE Action="0" Text="<ALT>m"/> <TEXT TYPE Action="0" Text="b"/> <WINDOW MINIMIZE Option="\x01" Title="Macro Express Pro - Explorer" Partial="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/> Add/modify delays as needed. The Text Box displays may be more of a problem (if really needed).
  9. Something I'd forgotten about - if the macro is long, the display can be really annoying and interfere with other things you may be doing. I'm sure you would have found out anyway - disable temporarily before running in such circumstances.
  10. You seem to know what a Repeat and Text Box Display are (and apparently have used them). That's all you need to know. Between the Help in ME (which is excellent, with examples) and browsing the command list it should not have been very difficult. Repeat Start (Repeat 10 times) Text Box Close: Repeat Counter Macro Text Box Display: Repeat Counter Macro Sound Beep Delay 3 Seconds Repeat End Text Box Close: Repeat Counter Macro <REP3:01:000001:000001:00010:1:02:><TBCLOSE:Repeat Counter Macro><TBOX4:T:3:CenterCenter000175000097:000:Repeat Counter Macro This is repeat number: %N2%><BEEP><DELAY:3><ENDREP><TBCLOSE:Repeat Counter Macro> If pasting the Direct Editor code does not work you will have to enter the Scripting Editor commands manually
  11. It's quite easy but more difficult than in ME Pro where you can update a Text Box Display. If the counter is in a variable say %N2% you use that. If you want to use your own variable, set it to 1 before going into the loop and increment by 1 before the end of the repeat loop. If you want repeats to finish the loop, you will have to add some maths for that (total number of repeats - repeats finished). There are several methods depending on the speed of the loop: 1. Let's say the loop takes 5 secs. You can add a Timed Floating Box for say 3 secs. Each time through it will show the value of %N2% for 3 secs, be off for about 2 secs and re-appear next time through. If the display time is longer than the repeat time, you will accumulate a pile of Text Box Displays! 2. For faster loops you can still add Text Box Displays; they will slow the loop down slightly. Create a Floating Box - must have a Box Header title. Duplicate and go back to the first box. Change to Close Text Box. Every time you go through the loop, any existing box will be closed, followed by the new box opening. You can use this method for 1. too. 3. If the loop is too fast to read, have an If group of commands so the Text Box Display only appears, say, every 100 repeats (and could be a Timed Floating Box). The logic for doing that will slow things down. To clear the final Text Box display for the last two methods, copy and paste the Close Text Box after the repeat loop.
  12. Kevin's post #4 indicates that the issue is due to be fixed. Did you check with ISS to find the status of that correction? No later revs have been issued to date.
  13. This will be my last comment on the thread. I may post a new topic on the mouse issue later. The origins of this thread is OT but I did test the two methods I described in post #2. Obviously the max time before the rest of the macro executes can be anything you like. The minimum is so short it's difficult to guess; my estimate is in the 100-250msec range. If that is considered excessive then I suppose it's a problem. I would not be changing 40 macros just for that.
  14. There seems to be some confusion as to what is required. To quote the original post, "because at the very least I want to display instructions at its start like "Place the mouse cursor at the required position before continuing". The response to my suggestion for doing exactly that is, "Thanks, but my point was that I want to avoid that unnecessary interaction when the macro is started off with the hotkey". Apart from the fact that was not mentioned, here is no unnecessary interaction - a Text Box Display appears, so what? If you choose the "all-mouse" option you click the mouse just like you do right now. Nothing extra is involved as far as you are concerned. I use the "hit Enter" option for numerous macros. I place the mouse and hit Enter. It's a nothing event. Also, if you use either option I mentioned, the macro behaves exactly the same regardless of how it is activated. Isn't that a good idea? The TBD does not even have to appear but I thought the idea was also to stop you clicking without thinking, "Providing I then activated the macro by its accelerator key rather than impulsively d-clicking it". Going the memory route is fraught with problems. Every time you memorize it has appeared, it has to be reset. That means it has to be reset after any macro has run as you noted. So you are going to edit 40 macros just to stop a TBD appearing that clears itself with no intervention from you. Every time you add a new macro to the menu, you have to remember to add the extra lines.
  15. That is strange for sure. It's annoying too because you spend time thinking what to enter and it does not appear. Even stranger is that you can make the dialog box any size. You could send in a request to ISS for a larger dialog (it's not really a bug, a limitation). I've sent in my quota for today already.
  16. I'd do it the same way I do all those sort of things. The following code at start of macro: Text Box Display "Position mouse and hit keyboard ENTER" Rest of code An "all-mouse" solution that I've not tried would be: Floating Text Box Display "Position mouse and click" Wait for Mouse Click Close Text Box Display Rest of code
  17. I've never counted but I think that is the case. It's a choice, not a novel!
  18. This should really go in 3rd Party Tools but that is apparently 3x only. There is currently no way to convert a Date text string to Date/Time Variable other than at the time of writing the macro. The ME Pro inputs are all manual (calendar pop-up or updown box). I wrote a macro that does it using the Current Date and Time and a second version that uses 1st Jan 2000. They both give the same results - the date base is irrelevant for most users. You can input the Time of Day or if you enter nothing, it assumes mid-day, 12pm. The macro converts a date in the format mm/dd/yyyy and time in format hh/mm/ss, 24 hour clock, into a Date/Time Variable and Decimal time. It is only valid as far as the calendar used by ME goes. Country of user could be an issue which is why this is currently unavailable in ME. As far as I can see, it should be as accurate as the Date/Time variable is. The year cannot be before 1900 as set by ME. The macro method is very crude but seems to work for all dates tested by author. The macros are currently written for user input by prompt and output for initial user testing by Text Box Display. Input can alternatively be made by removing the input dialogs and running the macro from another macro and transferring values; from the Clipboard; or setting values with Set Variable. The output displays can be removed. The results are in Date/Time Variable %dSubtracted DateTime% and Decimal time %decSubtracted DateTime%. To change the names if desired there is no provision for copying Date Variables. Use Variable Modify Date/Time, adjust by 0 (milliseconds?) and specify the output variable with a new name. The macro contains some basic input verification for year, month, day, hour, minute, second. This is my own creation and is not exhaustive (for example it does not check if any characters are alphabetical). If the user has a good date verification macro, the subroutine can be removed and the macro redirected to the user's (subject to getting variables in required format). The macros also have some result verification lines which are currently disabled. If enabled, the Decimal Time is converted back to Date/Time Variable to show the results are (hopefully) correct and agree with the user input data. Note that midnight Date/Time Variables do not exhibit a time, just the date. Short versions of the macros are included in which all extraneous code including date verification has been removed. They still contain the input/output display commands but the output is disabled (enable for testing). As a result of the way the macro was developed, it is possible to extract the output data part-way through the (currentday) macros which will give output at the target date but the time of day the macro is actually run. This may be useful if it is desired to know the Date/Time Variable or Decimal time an exact number of whole days from the macro time. The variables are %dFromNowDateTime% and %decFromNowDateTime% and are independent of any Time of Day entered at the start of the macro. Month/day/year always seems to be the North American standard so that was used. To swop to dd/mm/yyyy all the variables with index [1] could be swopped for variables index [2]. Time of Day variable will be unaffected. Alternatively convert format prior to entering the macro. Date String to Date Variable: Full macro using 1st Jan 2000 as base, includes date verification Date String to Date Variable (short): Short macro using 1st Jan 2000 as base Date String to Date Variable (currentday): Full macro using Current Date/Time as base, includes date verification and can provide Date/Time and Decimal Time Variables exact days to the minute from time of running macro (eg set required date to 2/15/2007 and run macro at 3.15pm, the Date/Time Variable and Decimal Time will be for 2/15/2007 at 3.15pm) Date String to Date Variable (short currentday): Short macro using Current Date/Time as base and can provide Date/Time and Decimal Time Variables exact days to the minute from time of running macro The first two are slightly shorter code and would suit most users. There are some audible alarm files that are in the Windows/Media path. Change or remove to suit need. They are offered as-is. Test away. Please provide feedback of any problems.
  19. Paul's findings should add weight to a bug report for sure. OK, did anyone check Command Line activation? No slacking.
  20. There are a number of missing Date/Time functions as Paul mentioned. One of the most glaring is that there is currently no way to convert a Date text string to Date/Time Variable other than at the time of writing the macro. The inputs are all manual (calendar pop-up or updown box). ISS responded to me that this is due to issues with the user's country. I've written a macro that does it (which I've split into 4 macros), for North America at least. I'll try to post them shortly. Another issue is that there is no way to copy a Date/Time Variable. The only way I've found is to add 0 milliseconds (I guess any time unit would do) and you can put the result in a new Date/Time variable. It may no seem useful but I use it in the forementioned macros. Just mentioning in passing, sorry to go OT.
  21. I interpreted your mention of Macro Run command as being the Run Arrow in the Explorer Bar. Sorry about that, add it to your list! I routinely get the Menu Bar disappearing which requires an uninstall and reinstall (resetting toolbars does not include the Menu bar neither does importing the previous good, saved configuration). My "Last Run Time" column items are usually "Never" as a result. "Never" also describes how often I look at the data. Returning to your issue, it seems an oversight but it's not too difficult to figure as you have run times for the primary macro. If it's a problem for you (which really has nothing to do with other people having the same behaviour), report it.
  22. I can't confirm nor deny but as I mentioned some time back, that Macro Run command is a purely manual start circumventing any interlocks. You press Run, it runs. The impression I got from an incidental comment from ISS was that manual start was not seen as a primary method of starting macros. I start at least half of mine that way! I assume that is why it is not flagged as having run. This does not answer your question of course.
  23. I definitely would not omit my name from the registry folder tree. If I don't use the registry regularly enough to remember where I put the goodies, I can usually remember my name or initials. Usually but not always! Registry editors usually have some form of bookmark or favorite list so it's not a big deal if you use those. Most of us have fairly small projects. I've always made subsections by project title/abbreviation since I only have a few entries. The subdivision per Paul per PGM may be desirable for large projects. I have to disagree with Paul's comment about self-documenting programs. There goes a programmer v user! My experience has been, without exception, that reviewing and using custom applications is a nightmare if undocumented properly. Looking back at the work posted by Floyd in this forum, it is so easy to follow what is going on. Writing a program in a logical fashion may help, but code is only "obvious" to the author. The companies I've worked for, you would get no return business relying on code to explain everything. It would be moot since proper documentation including commenting would be in the contract. You pay for it but it's worth the money. Some poor employee down the road is going to have to figure out how the program works.
  24. With most of these things, once you get into it all becomes clear. Registry names can be what suits but descriptive and to the point is better. You will see from code in the forum that many people use prefixes for variable type eg Integer n or i. It depends on what computer languages you are used to. A single variable could be tVar, iVar, dVar, cVar depending on the format. Related to ME, that's simply an extension of T, N, C, D. A variable like %myunits% has to be renamed if it changes format from integer to text - with prefix %nMyunits%, %tMyunits%. A prefix is generally used more than a suffix.
  25. I did not have any problems with Window Activate or Get Control/Set Focus but I have an older version of Excel. If you are opening windows of variable names you can get the (full or partial) window title or get control when it's on top on opening. Exact name should work but even the slightest change in title will cause a window not to be selected. Re browser, if the button location varies, do several mouse clicks at slightly different positions to ensure you get it. Use change of page title; mouse cursor is hour glass; colour changes etc to tell the page has changed. Any changes to browser layout will affect position of button (including no-tabs to tabs). You can also find a local pixel of unique colour and move mouse from there - quite reliable apparently. To open in the same window is a function of the browser settings/shortcuts. I don't use IE8. If you can get the URL, type it in the location bar and the page will open in the same window, if that's what your browser is set to.
×
×
  • Create New...