Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. Hi Alan, My greatest challenge at present is trying to achieve a day’s worth of intended tasks in a 24 hour day! Can hardly believe that I used to manage a commute and work as well as hobbies. Terry
  2. Hi Alan, In garden using iPad so can’t try it yet. But with the target cell selected I would expect a copy followed by set variable then a trim would deliver the text you need for the rest. Failing that, an F2, a move to the edit box, and take the copy from there. But a VBA macro would be my personal choice! Not only because it would be so much faster but it would be a refresher exercise as I haven’t done any VBA stuff for ages. Terry
  3. Hi Alan, I don’t see the challenge in this one? Y = 1.13 * X, so X = Y/1.13, for the selected X that the user recognises as a mistake. A bit of rounding and that’s it, yes? Terry
  4. I got up to around 50 or so macros using the prefix '='. Soon regretted it when the conflict in Excel became apparent, but never got around to changing it. I see that I'm up to 217 now and might well switch to the better choice of ';;'.
  5. Do you want a really SIGNIFICANT reply to the "save as"? Modesty not a strong-point then? 😉
  6. To remove all ambiguity why don't you simply show two examples of the input and output?
  7. Hi, Perhaps because I have not yet had my first coffeee, but I’m not clear about the result you want from that example. I assume I this is your INPUT: Ceinture de BloublouNiveau 160@DonarX11Michto : KipuOrkou IV400 X1 =400 Il y a 15 HeureIcône So is your OUTPUT this? Ceinture de BloublouNiveau 160@DonarX11Michto : KipuOrkou IV400 X1 = Il y a 15 HeureIcône Or this? Ceinture de BloublouNiveau 160@DonarX11Michto : KipuOrkou IVX1 =400 Il y a 15 HeureIcône Or this? Ceinture de BloublouNiveau 160@DonarX11Michto : KipuOrkou IV400 X1 =Icône Or this? Ceinture de BloublouNiveau 160@DonarX11Michto : KipuOrkou IV400 X1 = Il y a 15 HeureIcône Or something else? Terry
  8. Faced with learning a new programming language or persisting with MX Pro it would be ‘no contest’ for me! But then I have no AutoCAD experience. I’d probably tackle it just as Robert suggests. However, if I’d already methodically set up an Excel spreadsheet as you have, then I’d first just try a VBA macro from Excel itself. If you have no VBA experience try recording the steps. The devil as usual will be in the details. For instance, where must the processed text end up before being executed by AutoCAD? EDIT: Thinking about it over breakfast it should be relatively straightforward in either MX Pro or Excel VBA (or a combination of both, as I've sometimes used). Screenshot shows the way my mind was working: Terry
  9. My first thought was: don’t use Backspace to trigger A!
  10. Thanks a bunch Samrae, you're right I should have checked that Misc tab. I now remember having trouble with that macro some years ago. Must have added those options and forgot to remove them. As for the main issue, the 'flood' macro, pleased to say that I reached Support. They recognise the problem and are on the case.
  11. As you may have seen from my reply to Cory, the log file covering the time of the 'flood' is called macexp.exe_Events_20210325.log Its 250 or so entries must have finished when I forced MX Pro termination from Task Mgr THE LIKELY CULPRIT 25 March 2021 20:59:29:054: SetBoolean error: Access violation at address 00404FB0 in module 'macexp.exe'. Read of address 74736122 25 March 2021 20:59:39:951: SetBoolean error: Access violation at address 00404FB0 in module 'macexp.exe'. Read of address 74736122 . . . 25 March 2021 22:21:44:513: SetBoolean error: Access violation at address 00404FB0 in module 'MacExp.exe'. Read of address 74736122 I'd also like to raise a related question about many identical log files for a specific much used macro: EXTRACT FROM THE LOG, SHOWING MOST RECENT ENTRY (of about 1,800 since 10th Jan 2019) 26 March 2021 12:09:31:108: Macro Started (Open IrfanView & paste) 26 March 2021 12:09:31:108: Line 1: Comment 26 March 2021 12:09:31:108: Line 2: Delay 26 March 2021 12:09:31:217: Line 3: Comment 26 March 2021 12:09:31:217: Line 4: Delay 26 March 2021 12:09:31:311: Line 5: Program Launch 26 March 2021 12:09:31:342: Line 6: Delay 26 March 2021 12:09:31:546: Line 7: Clipboard Paste 26 March 2021 12:09:32:061: Line 9: Delay 26 March 2021 12:09:32:248: Line 10: Macro Run 26 March 2021 12:09:32:703: Macro Completed (Open IrfanView & paste) MY MACRO (about 15 years old) // Open IrfanView & paste image Delay: 0.1 seconds // Hotkey Ctrl+Shift+I Delay: 0.1 seconds Program Launch: "i_view32.exe" (Normal) Parameters: Delay: 0.2 seconds Clipboard Paste Delay: 0.2 seconds Macro Run: Current window LEFT HALF Global (c+Num4) I tried to send a bug report last night, same time I posted here, but that tool appears to be buggy, giving error: Cannot Access Database An error occurred when accessing the database. Contact your Helix ALM administrator if the issue continues.
  12. Thanks Cory. I've never used the Log Errors or Log Messages commands in my macros. (But I checked the macro that was running at the time of this 'notification flood', to make sure one hadn't snuck in.) In Preferences > Playback > Miscellaneous I do not have 'Log all errors...' enabled. But in Preferences > Playback > Miscellaneous I have both of these enabled. "Log unusual events Any unusual events that occur when playing back a macro will be logged. The information will be stored in the same file where all macro log information is stored." "Notify when unusual event logged This option, enabled by default, displays a notification when an unusual event is logged." I'd like to have seen a few examples of 'unusual events' but I'm guessing that 'Access violation' is one. There are about 250 lines like this in the log file called macexp.exe_Events_20210325.log 25 March 2021 20:59:29:054: SetBoolean error: Access violation at address 00404FB0 in module 'macexp.exe'. Read of address 74736122 All identical, but in a few 'groups' separated by lines like this: ------------------------------------------------------------------------------------------------------------------------------------ 25 March 2021 22:19:57:745: SetBoolean error: Access violation at address 00404FB0 in module 'MacExp.exe'. Read of address 74736122 (BTW, I assume 'Unusual events' are not 'Errors' or 'Messages'? IOW all three are mutually exclusive definitions?) Do you add Log Errors and/or Log messages to some of your macros? Or use Log all errors? I've always assumed that would slow the speed, but never tested that. And, in general, have you found log files valuable? I've tended to treat them rather like Win 10 Event Viewer, which I avoid until desperate, as it's full of obscure warnings that I don't understand!
  13. Thanks both. I'm a novice about error logging so currently struggling. When I've studied some of the basics I'll no doubt be back here for help! Meanwhile the logs and their contents offer no enlightenment. Given that I've had many log reports, I can't fathom why this sudden display. Perhaps some change in Win 10 security settings following my update from 1909 to 20H2, but so far can't identify a likely culprit. Do you both include error log commands in your macros? I see that rberq does, and recall that Cory does too. Alan: What did you do after getting the notification? Did the log help you discover a problem with a macro? And was it the first time, you'd ever seen that message, as in my case? If so do you suspect any particular cause?
  14. Grappling with an issue I've never had before and looking for any insights please. While running a normally reliable macro I suddenly started getting an unstoppable succession of notifications: "Macro Express Pro An event was logged" Had to use Task Mgr to terminate. I went to Win 10 Settings > Notifications & Actions > 'Get notifications from these apps', in order to disable them, but there is no entry for Macro Express Pro.
  15. No, it's the folder/directory number. (And I compared the 'Size' result in all tests.)
  16. My 3D Printer (recent generous and unexpected birthday present) gives me the same kick. But durations are measured in hours not seconds 🙂 I think that would be relatively easy, as I use OCR in several macros for hard-to-get text. But, apart from the occasional inaccuracy, it seems pointless as it comes after the only long step of getting the size! I also tried several command prompt methods but all took at least as long as the straightforward macros by Alan and me. I tested one promising tool from SysInternals called DU https://docs.microsoft.com/en-us/sysinternals/downloads/du on several large folders. It was always no faster. BTW, it was accurate to the byte on all but one of my tests, C:\Users\Terry\Dropbox\. DU reported 27,971,874,555 bytes from 14995 'directories'. The direct method gave 27,965,987,107 from 14994 'folders'.
  17. Looking good! How long does it take to size \Windows, and does it get it right?
  18. You're right, very slow: 15 s for my 29 GB C:\Windows folder. Which my macro hadn't allowed for, with no test to determine when counting had finished. Look forward to seeing your fastest version, perhaps using command prompts or PowerShell.
  19. Did mine fail in the cases you listed? If so I’d appreciate details.
  20. “...and even if my client might be better served by switching to a better file manager, the challenge is to come up with a solution for File Explorer!” Did mine work OK?
  21. We could discuss approaches using command prompts, batch files, PowerShell scripts, etc for a long time! But I think the simplest method would be to use Properties, as in my example below. // Open context menu for selected folder Text Type (Simulate Keystrokes): <SHIFT><F10> Delay: 0.1 seconds // Open Properties Text Type (Simulate Keystrokes): <ARROW UP><ENTER> Wait for Window Title: Properties // Select Name Text Type (Simulate Keystrokes): <SHIFT><TAB> Delay: 0.1 seconds // Move mouse to right of Size line Mouse Move: 320, 184 Relative to Current Window Mouse Left Click // Select text on Size line Text Type (Simulate Keystrokes): <SHIFT><HOME> Delay: 0.1 seconds // Capture size as a text variable and display it Clipboard Copy Variable Set String %tFolderSize% from the clipboard contents Text Box Display: Size of Folder <COMMENT Value="Open context menu for selected folder"/> <TEXT TYPE Action="0" Text="<SHIFT><F10>"/> <DELAY Flags="\x01" Time="0.1"/> <COMMENT Value="Open Properties"/> <TEXT TYPE Action="0" Text="<ARROW UP><ENTER>"/> <WAIT FOR WINDOW TITLE Title="Properties" Partial="TRUE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <COMMENT Value="Select Name"/> <TEXT TYPE Action="0" Text="<SHIFT><TAB>"/> <DELAY Flags="\x01" Time="0.1"/> <COMMENT Value="Move mouse to right of Size line"/> <MOUSE MOVE Option="\x02" X="320" Y="184" _PROMPT="0x000A"/> <MOUSE LEFT CLICK/> <COMMENT Value="Select text on Size line"/> <TEXT TYPE Action="0" Text="<SHIFT><HOME>"/> <DELAY Flags="\x01" Time="0.1"/> <COMMENT Value="Capture size as a text variable and display it"/> <CLIPBOARD COPY/> <VARIABLE SET STRING Option="\x02" Destination="%tFolderSize%" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Size of Folder" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs40 \r\n\\par %tFolderSize%\\b0\\fs20 \r\n\\par }\r\n" Left="749" Top="620" Width="575" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> If that proves unbearably slow for very large folders (like C:\Windows) then let's return to those other more advanced methods. As apparent from my last post, these days when I need that sort of info I resort to intelligent googling. Life's too short! -------------------- I'm not entirely clear about your client's needs? Will the macro always start in a folder, with one of its subfolders selected, as you imply? Or could the target be the current folder? How will the client select the target? What limitations are there on what JAWS can read out? For example, would the screenshot below offer another approach? And will the client be happy to use the macro successively, rather than a columnar display of folders, such as the TreeSize suggestion I made?
  22. Me neither 🙂 But I was curious as to whether there was a way to deliver the size and little else. I tried the multitude of never used Nirsoft stuff I have, then hunted around online and came across that. I also rashly installed JAWS (30-day trial) but gave up trying to get it to talk, and promptly removed it!
  23. I used rberq's method, but with the command slightly changed to show only the summary. It found me the size in bytes of the folder specified: dir "C:\Users\terry\Dropbox\Dropbox (Sundry)" | find "(s)" But the familiar right click > Properties method was very fast too, and displays it in MB too.
  24. Try TreeSize, which will read him the folder sizes - and bore him with lots more if he wants! https://www.jam-software.com/treesize
  25. Hi, How far have you got with it yourself? Show us your macro and tell us where it's going wrong and we may be able to help. I believe one of our experts still does undertake paid macro development. But normally the regulars here like to see some evidence of your efforts! Which also helps you and others to learn faster. Terry
×
×
  • Create New...