Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. Well, at least I'm back to yesterday's behaviour now, after rebooting my PC. I've followed your example and now have this ultra-simple macro, for use on any selected filename in a Windows folder. Mouse Left Button Click Delay 500 Milliseconds Macro Return <LCLK><MSD:500><MRETURN> As before, with any shortkey it fails. It somehow goes 'up the tree' so that the result displayed is My Computer or sometimes the Desktop folder. With any hotkey it does what it should. Namely opens the filename for editing/copying. This is different to the result you get, yes? It would be helpful if a few others could run it. Maybe the result is OS dependent or something? Or depends on your astrological star sign? -- Terry, East Grinstead, UK
  2. Very strange! And it gets stranger, because now I am getting nothing when I run the macro with a shortkey. Not just a failure at some point, but no activation at all. Changed the shortkey several times (xy, zz9, etc) but no change. Yet still works fine with a hotkey. I tried Restore Keyboard Hooks and Restore Mouse Hooks, and closed/re-started Mem-Map, but still the same problem. Other simple 'text typing' macros still work OK with their shortkeys, so I'm baffled. Returning to your test, are you saying that the initial left click failed to get into edit mode even with activation by a hotkey? If so, that's a different (but puzzling!) issue. If it just fails with a shortkey then, coupled with my new symptoms this morning, it seems further evidence that shortkey activation gives inconsistent and unrepeatable behaviour... :| -- Terry, East Grinstead, UK
  3. Thanks Cory. See the example included in my reply to Paul. -- Terry, East Grinstead, UK
  4. Thanks for your interest and help. Your macro worked fine for me too, but it's not quite equivalent to my problem macro, which I have still not been able to get working. My original macro is scoped to a program called Memory-Map. It clicks the mouse in a text box and copies its data to the clipboard and thence to T1. Unlike your example, mine sets the variable from the clipboard, i.e. Variable Set String %T1% from Clipboard which may be significant. To continue the discussion, I've now modified the macro to make it more accessible to others. It now works on a filename in a Windows folder, and should copy the name to the clipboard. // Assumes the mouse is on an already highlighted filename in a Windows folder // L-click to make it editable. (I could have used F2 instead, but this keeps it like the original.) Keystroke Speed: 50 Milliseconds Mouse Speed: 5 Milliseconds Mouse Left Button Click Delay 1 Seconds Text Type: <CONTROL>c<ESC> Delay 500 Milliseconds // Put name in string variable T1 Variable Set String %T1% from Clipboard Macro Return <REM2:Assumes the mouse is on an already highlighted filename in a Windows folder><REM2:L-click to make it editable. (I could have used F2 instead, but this keeps it like the original.)><SPKEY:0050><SPMSE:00005><LCLK><DELAY:1><TEXTTYPE:<CONTROL>c<ESC>><MSD:500><REM2:Put name in string variable T1><TVAR2:01:03:><MRETURN> With shortcut key activation, this fails. The clipboard does not get updated. (And, in my case, inexplicably the chosen Windows folder closes and the My Computer folder opens!) With a hotkey, it works fine. -- Terry, East Grinstead, UK
  5. Several times in the last few months I've had straightforward macros that fail because they don't capture text to the clipboard. I now think I've found the cause. Each of these macros had Shortkeys assigned. For example, I would assign 'm1' and type '##m1' to run the macro. If I change the activation to Hotkeys, they work correctly. Change back to (any) shortkey, and it fails again. I have latest version 3.7.2.1, but the same problem occurred in previous version. Is this a known bug? Is there anything I can do to work around it please? As it stands, it effectively means Shortkey activation can't be used whenever text is being saved to the clipboard, which is something I do a lot. -- Terry, East Grinstead, UK
  6. Thanks Kevin. Meanwhile I tried 'Set Value to Topmost Window Title' and that did the job OK. -- Terry, East Grinstead, UK
  7. I'm writing what I thought would be a trivially easy macro, but I'm baffled at the outset. The start point is with a WinXP folder activated. I use the command Variable Set String %T1% from Current Folder Name But T1 is getting set to a folder that I don't even have open, namely C:\Program Files\Macro Express3 ! Even if I follow the above command immediately by a Text Display, T1 is shown to have this bizarre value. -- Terry, East Grinstead, UK
  8. OK, thanks anyway Jason. I've now therefore abandoned hope of that approach. And I didn't try the Control route as I've never had any success with that, apart from the demo programs like Notepad. -- Terry, East Grinstead, UK
  9. No one know the answer to that please? -- Terry, East Grinstead, UK
  10. I am running a program titled, say, TOP and I have a dialog window open within it titled SUB. I want to resize SUB. But when I use the command Window Resize: SUB - (Width: 850 Height: 630) I get TOP resized, not SUB. Is there any way to achieve what I want please? Or can MEX only operate on the 'main' program, not its sub-windows? -- Terry, East Grinstead, UK
  11. Thanks, hadn't thought of that. For anyone else interested, it's at HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Capture -- Terry, East Grinstead, UK
  12. Anyone with any thoughts on how to do this please? -- Terry, East Grinstead, UK
  13. Thanks. I'd glanced at Options > Preferences > Capture > Only Capture Mouse Clicks occasionally in the past and always passed it by, hastily assuming it meant 'Capture only mouse actions, not keystrokes'. Now realise my error. I assume it does indeed achieve the same function as the Recorder feature I described. However, the latter is easier to use, as it's for individual macros and doesn't therefore require that you remember to change it again. So I've written a simple macro to toggle the MEX option, scoped to macedit.exe with a hotkey. For anyone else interested, here it is: <REM2:In MEX itself, toggle the option to capture only mouse CLICKS, not moves.><SPKEY:0020><TEXTTYPE:<ALT>op<ARROW DOWN><ARROW DOWN><ARROW DOWN><ALT>y<TAB><TAB><TAB><TAB><TAB><ENTER>><MSTOP> (One nice feature of MEX that I don't think I've used before is that you can write macros that work on MEX itself.) BTW, I'd have liked to add a text message at the conclusion of that little macro, to tell the user whether the option was checked or not. Is there a clever way to do that please? -- Terry, East Grinstead, UK
  14. Yes, I agree about the potential confusion that can arise on playback of such macros. My test case was limited to alternating strictly between just two apps. As I've become slightly more confident with direct coding, I've done less capturing. But Recorder has another feature that MEX lacks, which makes capture more attractive. You get the option to record at 'actual' or 'fast' speed. The latter appears to strip out all delays. After an MEX capture, I used to go through tediously removing scores or hundreds of small incremental mouse moves! -- Terry, East Grinstead, UK
  15. I'm wasn't interested in proving you wrong - but in finding a way to get this facility into MEX! Do you have any views on that? -- Terry, East Grinstead, UK
  16. Yes, I've just tested it and can confirm that Recorder does capture Alt+Tab commands when recording macros. My test macro copy/pasted several results from Calculator into NotePad, with Alt+Tab switching between the windows. So, not impossible. Maybe your developers could work out how to do it in MEX? -- Terry, East Grinstead, UK
  17. Floyd: Are you 100% sure about that? I seem to recall using the built-in MS macro program Recorder for many years, across various versions of Windows, and I'm pretty sure it reliably recorded Alt+Tab. When MS dropped it, i.e. stopped bundling it within the standard OS, I copied it across and it still worked. I've still got it around somewhere, so I'll hunt it out and try it on this XP Home PC. It's a 16-bit applicaion, of course, but I don't see why it shouldn't still work. Of course, if I'm right, then that might be because it's an MS program, and hence was able to work around the MS restriction you describe. Kevin: Yes, but that doesn't help cptnmorgan with his requirement to capture changes of windows. cptnmorgan: I think your substitution idea is a neat enough second best! -- Terry, East Grinstead, UK
  18. Works fine here. I didn't have the add-on which you didn't name. But I found and installed what must be the one, QuickRestart 1.1.0. I assigned the following macro to a temporary hotkey (Ctl+Alt+6), with scope limited to FF. With FF open, running the macro closed and restarted FF. <REM2:Restart FF using shortcut ket Ctl+Alt+r><ACTIVATE2:Mozilla Firefox><TEXTTYPE:<CONTROL><ALT>r><MSTOP> How did you activate the macro? BTW, would you ever want to run this when FF wasn't already your active window? If so you'd need to ensure of course that there was no conflict with CTL+Alt+r. And you wouldn't need that first step of activating FF. -- Terry, East Grinstead, UK
  19. OK, thanks, understood. Glad you got it sorted. -- Terry, East Grinstead, UK
  20. Works fine here. What procedure are you following? What is on your clipboard? Are you ensuring you don't change it in between trials? With the following copied into my clipboard View full details aaaaaaaa bbbbbbbbbbbbb ccccccccccc xxxxxxxxxxView full detailsyyyyyyyyyyyyy I run the macro (using F9 directly from the Scripting Editor) and I get a Notepad file with that text followed by the correct result, 2. I close Notepad, and repeat the exercise, copying the text into my clipboard again from another permanent source. Result is again identical. -- Terry, East Grinstead, UK
  21. I wouldn't have thought your method would work. Unless I've misunderstood, surely it would only compare two successive names? I thought you wanted to compare each new name with all the previous ones? Or are you saying they are all in some sort of order, and duplicates only occur together? -- Terry, East Grinstead, UK
  22. Here is a slightly tidier version, which also displays the result at the end of your file, as I believe you want: <IVAR2:01:01:0><SPKEY:0010><LAUNCHNO3:0:0130Untitled - Notepad<LAUNCH:c:\windows\notepad.exe><CLIPP><TEXTTYPE:<CTRLD><HOME>f<CTRLU>><WAITWIN2:000010:000000:Find><TEXTTYPE:View full details><REP3:01:000000:000001:99999:1:01:><TEXTTYPE:<ENTER>><IFOTH:03:1:Notepad><TEXTTYPE:<ESC><ESC><CONTROL><END><ENTER>%N1%><MSTOP><ENDIF><NMVAR:08:01:0:0000001:0:0000000><ENDREP> -- Terry, East Grinstead, UK
  23. Your logic is incorrect in several ways. For example, you have asked the macro to repeat the loop zero times! And where are you viewing your result? I'm no expert myself, so there are probably smarter ways, but the following drastically edited version works OK: <SPKEY:0010><IVAR2:01:01:0><LAUNCHNO3:0:0130Untitled - Notepad<LAUNCH:c:\windows\notepad.exe><CLIPP><TEXTTYPE:<CTRLD><HOME>f<CTRLU>><WAITWIN2:000010:000000:Find><TEXTTYPE:View full details><REP3:08:000001:000002:0002:0:01:999999><TEXTTYPE:<ENTER>><IFOTH:03:1:Notepad><TBOX4:T:4:CenterCenter000278000200:000:ResultThe string 'View full details' appears %N1% times in this file.><TEXTTYPE:<ESC><ESC>><REM2:Close the Find dialog (keeping Notepad open) and STOP the macro at once.><MSTOP><ENDIF><NMVAR:08:01:0:0000001:0:0000000><ENDREP> -- Terry, East Grinstead, UK
  24. It should be straightforward if you can first somehow get the text contents of the 'log box on the side' into a variable. You could then test that against your 'certain string of words'. If they were equal you would take the next step of left-clicking the Pause button. Otherwise you would loop around until the appropriate time came to test it again. But it's difficult to make any helpful suggestions about how to achieve that initial capture without knowing the program and how you are using it. One method I use in broadly similar circumstances is to 1. Move the mouse to inside the log box 2. Select all the text (use Home, then Shift+End) 3. Copy it to clipboard If that fails, one more complex alternative you could try (although I've never had success with it myself!) is to try the Windows Controls. Read it up in help (enter 'Controls' in Search.) -- Terry, East Grinstead, UK
  25. Sorted thanks. It was my own stupid mistake. It was simply asking me if I wanted to save the current file before opening a new one! Actually, I hadn't consciously made any changes since the last save, but no harm in having the macro click No, or enter N. But what's the usual way of handling this, to allow for the whether the message does or does not pop up please? -- Terry, East Grinstead, UK
×
×
  • Create New...