Jump to content
Macro Express Forums

DMGberg

Members
  • Posts

    9
  • Joined

  • Last visited

DMGberg's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I think I posted this one other time, but here's one that works good: If Not Program Name "EXCEL.EXE" running Program Launch: "EXCEL.EXE" Variable Set Integer %N1% to 1 Write Registry Integer: "" Macro Stop End If Read Registry Integer: "State" Variable Set String %T1% "Microsoft Excel" If Variable %N1% = 0 Window Show: "%T1%" Activate Window: "%T1%" Variable Modify Integer: %N1% = %N1% + 1 Write Registry Integer: "State" Else Window Hide: "%T1%" Variable Modify Integer: %N1% = %N1% + -1 Write Registry Decimal: "State" End If Registry value would be something like: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\State You could program its creation but since you only need create it once, just regedit, add value DWORD "State" or whatever you want to call it. Attach it to a hotkey. What it does: If program not running, runs it (you don't need to activate it, just have it maximized or normal) If running and visible, hides it. If running and not visible, shows it. It will not appear in the taskbar or system tray so you just have to know it's there. If you don't want it to open on top, leave out the "activate" If you're not comfortable putting something in the registry, you could do it other ways but this is completely safe in CURRENT_USER keys. I've got a bunch of these because I just don't like my taskbar cluttered with stuff I know is around.
  2. I figured it out. The answer is yes. Window restore Window resize Window reposition does it Might be a little inefficient because it momentarily reverts to its last "normal" position but heck, it works. Thanks for my help. -- Dan
  3. I have a macro that resizes and repositions a window (window is maximized, hotkey -> take up 1/3 of screen, position top right). Two commands: resize, reposition. However, when I run it, if the window starts in a "maximized" state, the window state remains "maximized" as indicated by the double boxes in the top right of the title bar. So, to truly maximize it again I have to click that box twice - first it returns to its last "normal" size/position and then it's state is set to "normal" so if I click the single box it will maximize. There are commands for "window maximize" and "window minimize" but not for "normalize." So, is there a way to reset the state to "normal" when I reposition/resize from a maximized windown? -- Dan
  4. Here is a generic version of what I needed. It creates the registry key (more efficiently done by hand probly since it will be persist after you run the macro once), opens and activates the program if it isn't already, and toggles the show/hide state. <IFREG:2:2:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <REGCREATE:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <ENDIF> <IFOTH:14:1:SOMEAPP.EXE> <LAUNCHNO3:0:0112AppWindowTitle<LAUNCH:SOMEAPP.EXE2>< <DVAR2:01:01:1> <REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <MSTOP> <ENDIF> <REGRDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <TVAR2:01:01:AppWindowTitle <IFVAR2:3:01:1:0>< WSHOW:%T1%> <ACTIVATE2:%T1%>< DVAR2:01:01:1> <REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <ELSE> <WHIDE:%T1%> <DVAR2:01:01:0> <REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State> <ENDIF> (Caution: does not run as pasted above because of 's etc) I could next create an uber-macro to create this macro for any app, create the registry key (more generically under the Macro Express key as you did), run an app picker dialogue, grab the window title, and set a hot-key. Would be fun but I got what I need now and it's getting late. Thanks again. toggle_app.mex
  5. Also, apparently there are a # of places to keep the variables so they could be persistent.
  6. Ralph, Thanks so much! You've got me started on what I need. I don't need them to be in the tray, I just don't want them cluttering the taskbar. When I get it tinkered, I'll post it back here. I've changed it so it won't "error" if you click "OK" without having selected a window. I'm working on having it default to the first "hidden" so one can keyboard down (if that control does that) as I don't like to use the mouse any more than I need to. I'll then do an autorun on start to have all my regulars open but hidden (Total Commander, Ecco, stuff like that) and can do defined hotkeys for each of my regulars. Again, thanks for pointing the way. All of those third party "minimize to tray" utilities I used were a little kinky and/or buggy. I even paid for one. Dan
  7. I have tried a couple of those programs and am using one now. None of them meet my needs so I just thought that I might be able to do it for 2 or 3 standard apps that I always use but don't want cluttering up the taskbar, using ME. I've looked into it more. It is more complicated than it would appear, many API calls. I might mess with it myself, maybe.
  8. No, other progs I use frequently but not continually. Task bar real estate is always at a premium. There is a "minimize" command and a "hide" command but no "minimize to tray."
  9. Is there a way to do this? I can't seem to figure it out. -- Dan
×
×
  • Create New...