Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. Steve: Thanks, exactly what I need - somehow overlooked that! Kevin: Yes, thanks, experimenting with that this afternoon and it gave me a much-improved macro. But next I'll try the If Program commands Steve suggested which look as if they might completely meet my requirement. -- Terry, East Grinstead, UK
  2. Is there some neat way to detect if an application X is already loaded (but not activated)? If it's already loaded I want to Activate it, and take various steps. Otherwise I want to Launch it, wait for a longish time, and then take those same steps. For my intended macro I can't just use Activate/Launch followed by a Wait for Window Title command. I want to paste some data to the program, and that is possible almost immediately if I just have to activate it, but it needs 15-20 secs if I have to load the program first. However, the title comes up fast in a second or so, with the long wait after that. -- Terry, East Grinstead, UK
  3. Thanks, appreciate the fast reply. But after another hour or so of further head scratching I've found the cause Turns out to be the same issue that keeps catching me out: shortkey settings. In the past I've had frustrating cases in which a simple macro didn't work, and I eventually solved them after a suggestion from Joe Weinpert last November. I changed the setting to Do Not Remove Keystrokes Typed on those occasions and the macros ran fine. But I've therefore slipped into the habit of setting that for all my macros! This latest one just needs the default Global setting. With that restored, the clipboard is working again, with lots of tolerance on timings. -- Terry, East Grinstead, UK
  4. Of all the problems I have, getting stuff copied reliably to the clipboard is by far the most frequent. This morning I've already spent an hour on what should be a pretty trivial macro. Whatever delays I introduce, whatever keystroke speeds I use (10ms, 20ms, 50ms), I still can't seem to get the selected text into the clipboard. Instead it usually seems to hold the previous (or even older) copy. Does this ring a bell with anyone please? Are there any other things I can try? Here's the current example. I left-click an entry to make it editable, copy that (automatically selected) string to the clipboard, remove the highlighting (probably a redundant step), and store the clipboard contents in a variable. But if I paste the clipboard to a text editor directly after running this, I can see it's usually not copied correctly what was selected. // Copy Name to T1, from already open Properties (at preset size & position) // Assumes entry selected and mouse hovered // L click entry to make it editable Keystroke Speed: 20 Milliseconds Mouse Speed: 1 Milliseconds Mouse Left Button Click Delay 600 Milliseconds Text Type: <CONTROL>c Delay 100 Milliseconds Text Type: <ESC> // Put name in string variable T1 Variable Set String %T1% from Clipboard Variable Save Text Variables Macro Return Any advice would be appreciated please. -- Terry, East Grinstead, UK
  5. Thanks Stan. I'm pleased to report that I solved the problem. It turned out to be the same issue that had me foxed months ago. I was using a Shortkey for activation. When I switched to a Hotkey, it worked. Back with the Shortkey, I changed the setting to Do Not Remove Keystrokes Typed - and it worked! For anyone new to this issue, here's the relevant Help: This option instructs the shortkey not to erase itself after being typed in. Normally, backspaces are issued to remove the shortkey from the screen before the macro is executed. When using shortkeys in non text usage programs, this may not be desirable to have "backspaces" issued It seems sort of counter-intuitive (my first thought is that I would normally want to remove those text characters in case they screw things up) but it's those pesky backspaces that cause the trouble. I'll try to remember this from now on -- Terry, East Grinstead, UK
  6. Thanks, but 1. Tried that alternative earlier; made no difference. Various delays and minor variations - same result. 2. Doing that; I have the mouse hovered over the selected (highlighted) text before running the macro. IOW, exactly the same as the manual procedure. I only added the Pause to check why the later Ctl+C command to get the name onto the clipboard was failing. It shows that the reason is because the text is not accessible for copying at the outset. -- Terry, East Grinstead, UK
  7. I'm at the hair-tearing stage over what should be a really simple operation! In my application Memory Map there's a list of entries like this: Manually, if I left click a selected entry then after about half a second the name becomes editable (so that I can copy it to clipboard for instance), like this: But if I try to do that in a macro the box refuses to become editable. For example, this code Mouse Left Button Click Delay 2 Seconds Pause: Basic results in this: Anyone know what might be happening, and how to achieve the result I want please? -- Terry, East Grinstead, UK
  8. Thanks for the alternative suggestion. I actually got stuck in and wrote the macro along the lines suggested by rberq. Happy to say it works fine. On using a hotkey combination (had to look hard for one still unused by FSX!) it pops up a small message window headed 'NUMLOCK Status' containing either 'ON' or 'OFF', and I then hit Enter (or click OK) to close it. That appears on top of whatever FSX window is active. But it's now redundant! Someone suggested a freeware program that puts indicators in the system tray, next to the clock: http://www.snapfiles.com/get/systrayindicator.html and that works a treat. I've rarely used MX's Logical commands before, so I'm sure my code could be much improved. (Would welcome tips.) Here it is anyway, in case anyone else ends up here and finds it useful. // Display status of NUMLOCK Keystroke Speed: 10 Milliseconds Activate Window: "TextPad" Text Type: <CONTROL>n Text Type: <SHIFTD><KEYP7><SHIFTU> Text Type: <SHIFTD><ARROW LEFT><SHIFTU> Delay 100 Milliseconds Text Type: <CONTROL>c Window Minimize: "TextPad" Variable Set String %T1% from Clipboard If Variable %T1% = "7" Text Box Display: NUMLOCK Status Clipboard Empty Activate Window: "TextPad" Text Type: <CONTROL><F4> Delay 50 Milliseconds Text Type: n Delay 50 Milliseconds Window Minimize: "TextPad" Macro Return Else Text Box Display: NUMLOCK Status Activate Window: "TextPad" Text Type: <CONTROL><F4> Delay 50 Milliseconds End If Window Minimize: "TextPad" Macro Return -- Terry, East Grinstead, UK
  9. Thanks, I'll give that approach a try if nothing simpler emerges. I wonder if perhaps there's a registry entry for Numlock? -- Terry, East Grinstead, UK
  10. For my new PC I chose a Logitech wireless keyboard and mouse. A poor choice now that I realise it obviously has no Numlock LED indicator due to the battery limitation. I've just installed MS Flight Simulator, a birthday present from my son. Its flying controls vary significantly depending on whether Numlock is enabled or not. Anyone know of a simple way I can toggle a small message window displaying if it's ON or OFF please?. That would be marginally preferable to pressing Numlock to see what happens to my aircraft -- Terry, East Grinstead, UK
  11. OK, thanks, I'll try that approach. -- Terry, East Grinstead, UK
  12. That raises all sorts of other possibilities in my mind. You're clearly way ahead of me on this. Is there a general way to work reliably with the taskbar entries? For example, how could I click on a particular entry? Even if I could assume it was present in the taskbar, it changes position/size as others are added or removed. Are the current names and positions accessible in the XP registry perhaps? -- Terry, East Grinstead, UK
  13. Thanks Cory, that looks promising - I'll experiment along those lines. Nothing like that around already, I suppose? -- Terry, East Grinstead, UK
  14. Does anyone have or know of a macro(s) that could help me achieve something I do a lot, like the following example. Suppose on my taskbar I have this typical mixture: - Browser - Text editor - A 'group' representing 3 JPG photo images from say IrfanView. (I have 'Group similar taskbar buttons' checked in Properties.) - Email program I'm composing a message about the photos in my email program, which therefore currently has the focus. If I look around or use Alt-Tab I can see one of the images, which was opened recently and not mimimised. I now briefly want to see all 3 images, plus my text editor document, vertically or horizontally tiled, at a single view. There appears to be no way to do that simply within XP. I can't even reliably see the 3 IrfanView images. Although r-clicking the grouped taskbar item displays a menu including 'Tile Vertically', it doesn't do so unless you use 'Minimize Group' first. Otherwise you get a mix of the images and whatever window last had focus. (Presumably a Windows design flaw or bug?) What I'm after in this example is to identify each of those 4 windows (probably just the text window and the grouped item), click or apply a hotkey, and have all 4 immediately tiled across the full screen. Click or hotkey again, (or Alt-Tab) and I want to be back to my email program. Any thoughts or suggestions please? -- Terry, East Grinstead, UK
  15. Any comment from Macro Express Support on my last point please? -- Terry, East Grinstead, UK
  16. Sorted thanks. It was easier than I expected. For anyone else who ends up here with a similar query, here's the basic routine: // Drags mouse rightwards until cursor changes to colour 13160660 Repeat Start (Repeat 800 times) Mouse Move Position 1, 0 Delay 4 Milliseconds Get Pixel: Under Mouse into %N1% If Variable %N1% = 13160660 Text Box Display: Cursor change 1 Else End If Repeat End Macro Return If there's a neater way, I'd appreciate seeing it please. Incidentally, I first experimented with using the Wait for Mouse Cursor command, set to <-||->. (MacroExpress calls that 'Horizontal Split'. Surely it should be 'Vertical Split'?) Anyway, that just didn't work. Even with the changed cursor showing for several seconds. Yet it did work with the other cursor, <->. -- Terry, East Grinstead, UK
  17. Hi, Could someone point me to a macro that will let me size two panes in an application window please? I've attached a screenshot. I can get the full window to its desired size and position using a program I have called Sizer. But the only way I can resize those two sections on the left is by dragging the mouse cursor. FWIW, when the mouse reaches the left border of the two it changes to something like this: <-||->. And when it reaches the one to the right, it becomes like this: <->. Presumably I need a subroutine (section?) to drag the mouse rightwards from say x=100 px and detect when it reaches the first border. Then drag this border to a point at say x=500. Then do something similar with the second pane. I'm hoping in particular that there is a well-tried macro for the detecting aspect? Any suggestions will be appreciated please. -- Terry, East Grinstead, UK
  18. I just noticed that a new version 3.7c was announced 6 months or so ago, and I was about to install it, upgrading my 3.7b. However in this thread http://pgmacros.invisionzone.com/index.php?showtopic=2681 I see mention of a problem with sending keys. That's something I use a lot. So could Kevin or anyone else tell me if this has now been fixed please? If so, is there a patch or what? -- Terry, East Grinstead, UK
  19. Thanks Joe, good of you to take the trouble to try it. And yes, bingo, you've put your finger on the cause of my problem! I just came back here to post the good news that I'd had a very fast reply from Insight Software, making exactly the same point about that Do Not Remove Keystrokes Typed setting, and saw your post. Mine has always been unchecked, and I never thought to change it. I'm confident my other more complex macros will respond to the same technique too. I'll try it tomorrow. Really pleased to sort this - it's been vexing me for days! -- Terry, East Grinstead, UK
  20. I hadn't, but have done so now Kevin. -- Terry, East Grinstead, UK
  21. Thanks for the follow-up Alexandra. You're way ahead of me in your use of menus in general, and pop-ups in particular. But I'm going to set aside some time to experiment and will use this thread to help me, complementing the tutorial Cory recommended. Have you also used shortkey activation very much? As one of your motivations (like mine) is to avoid having to remember so many hotkeys, I'd have thought this was a promising alternative? Although it's going off at a bit of a tangent, can I get your interest in my issue about shortkeys please. I'm baffled why macros activated by a shortkey sometimes fail, yet work OK with a hotkey. Obviously, until this is resolved, it's a serious handicap to using shortkeys confidently. I use scores of them at present for simple stuff, like entering frequently-used folder names in browse windows, or typing common words/phrases. But it's only recently that I've tried using shortkeys to replace hotkeys in my more complex macros. That's where I've hit these problems. Perhaps you could try this 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> You just highlight a filename in any folder and activate the macro. It should just 'open up' the filename ready for for editing/copying. Here, with any shortkey, it fails. (It somehow goes 'up the tree' so that the result displayed is My Computer or sometimes the Desktop folder. No ill effects, just totally wrong result.) Yet with a hotkey it works perfectly. (Note that I've deliberately not used the alternative of entering F2 instead of left-clicking, because many of my programs don't support F2 for editing.) Feedback from anyone else would of course also be much appreciated too please. -- Terry, East Grinstead, UK
  22. Eh? I don't think you can have properly read this thread from the outset! In particular, my post of Nov 26 2007, 05:20 PM included: 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. and, in the code itself: // L-click to make it editable. (I could have used F2 instead, but this keeps it like the original.) I've reminded you of these points a couple of times since! So I'm baffled why you're finding it hard to understand. It's very simple. Your 'solution' (of using F2 instead of a left-click) is not applicable to the original macro that prompted this thread. F2 cannot be used in that box in Memory-Map. Our discussion on the ultra-simple macro was to find an answer to the underlying issue, namely: do macros sometimes work fine with hotkey activation and fail with shortkey activation? You are the only user who has so far tested this and your answer as I understand your feedback is plainly Yes. (However, a so far unexplained side issue arose because in your case your macro failed to get into edit mode even with activation by a hotkey. Like my original, my ultra-simple macro works fine with a hotkey.) So: 1) I am still looking for a solution to my specific problem. 2) I'm still hoping to get some MEX Support response on the underlying issue of unreliable shortkey activation. -- Terry, East Grinstead, UK
  23. Yes, but, as I said earlier, I can't use F2 in the real macro. -- Terry, East Grinstead, UK
  24. Many thanks Cory, appreciate your taking the trouble. I reckon I agree with you about preferring pop-up over floating menus. I think I'll focus on expanding what I did a year or so ago when I made a tentative exploration of menus. I have an icon in my system tray (darned if I can recall how I put it there!) which brings up a list of macros, each of which is itself a menu. Some are specific to programs, others generic. So I have - Google Earth MENU - Graphics MENU - Memory-Map MENU - Movies MENU etc Within each of those are my specific macros. Main downsides are: 1) Not as fast as hitting a hotkey 2) I will have to alter those of my hotkey-activated macros that assume I'm starting with the mouse hovering in a certain place. These will presumably need me to add a Text Box Display instructing me to manually place the mouse pointer. 3) Menu list can sometimes obscure information The plus of course is that I don't have to remember a steadily increasing number of hotkeys. I was interested in your point about displaying a list of all the macros and their activations. (BTW, why a web page rather than a simple text file? Better appearance? Is maintenance an issue?) You could in fact make an argument for doing that and then just using the appropriate hotkey. IOW, pop-up the list, recall the hotkey, and activate the macro with it. That avoids the mouse movement issue. I'll do some more studying, including the tutorial. I usually find that once I've got a few practical examples working, the penny begins to drop. As for shortkeys, seems like I'm still looking for a guru on that subject then! Hope you'll follow the thread anyway and chip in with any ideas or experience. Maybe you could just try that ultra-simple macro I posted earlier today? It's so frustrating to have a macro work with one activation and not another ;-( -- Terry, East Grinstead, UK
  25. Alexis, Cory: I've so far not used menus much, but I'd like to do so. It's getting hard to remember all my hotkeys, and my cunning plan of switching to more easily-remembered Shortkeys has hit a major obstacle because shortkey activation seems erratic/unreliable. (See separate thread.) However, most of your discussion has left me behind! An added probem is that I don't use Outlook, so can't confidently try Cory's examples. I don't want to hijack the discussion of Alexis's problem, but I'm wondering if you could help me over the initial hurdles by a simple example involving say Notepad and Calculator please? Either here or in a separate thread? The aim being that I have a floating (or pop-up?) menu at my service when I use either or both programs. Populated with operations that can't be achieved using the application's own tools. I could then apply these principles to my more complex applications. Presumably I have to activate these menus manually? IOW, I assume MEX can't automatically display a menu when Notepad is launched, for instance? (At least, not without running another 'supervisory' macro permanently?) So would I activate by opening a 'Top Menu', in my system tray, then clicking the appropriate item 'Notepad Menu' or 'Calculator Menu'? Or maybe use a shortkey 'zn' for Notepad Menu, and 'zc' for Calculator Menu, if I can get these to run reliably? Am I on the right lines here? Oh, and what on earth is a 'shower menu' please? -- Terry, East Grinstead, UK
×
×
  • Create New...