 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Wolfer
Joined: 08 Nov 2005 Posts: 14 Location: Chicago, IL
|
Posted: Wed Jan 16, 2008 2:06 am Post subject: Winactivate only works once without reloading script |
|
|
I am new to AHK and have been trying to get WinActivate to work for an explorer replacement called PowerDesk. The program has not been upgraded for Vista (this may be part of the problem) and has some funky behaviors:
1. It sometimes disappears from the Taskbar, but is apparently still running in the background. If I try to start it, I get nothing. If I open Task Manager and find two copies running and end one, PowerDesk suddenly appears. I thought a WinActivate script from AHK would solve the problem, i.e. it would find PowerDesk if it was running hidden in the background, and activate it. Except...
2. I can only get WinActivate to work one time if the window is minimized. After that the WinActivate script stops working to maximize the window unless I reload the script. If PowerDesk is not running, then the Run command always works, no matter how many times I close PowerDesk and run the AHK script. Here is the script:
^!p::
SetTitleMatchMode, RegEx
SetTitleMatchMode, Fast
{
IfWinExist ahk_class EXPLORERPLUS
WinActivate ahk_class EXPLORERPLUS
else
Run C:\Program Files\VCOM\PowerDesk\PDExplo.exe
}
return
^!m::
IfWinExist ahk_class metapad
WinActivate
else
Run C:\Program Files\metapad\metapad.exe
return
I threw in the metapad script, because the script for metapad works perfectly every time no matter how many times I minimize metapad, and it's configured exactly the same way as the PowerDesk script. Any suggestions? Toss PowerDesk or live with the glitch?
------------------------------
One more note: WinMaximize works fine (?!?!)
The script below works every time, no need to reload.
^!p::
SetTitleMatchMode, RegEx
{
IfWinExist, ahk_class EXPLORERPLUS
WinMaximize, ahk_class EXPLORERPLUS
else
Run C:\Program Files\VCOM\PowerDesk\PDExplo.exe
}
return |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Wed Jan 16, 2008 2:58 am Post subject: |
|
|
| What about WinRestore instead of WinMaximize and DetectHiddenWindows,On? |
|
| Back to top |
|
 |
Wolfer
Joined: 08 Nov 2005 Posts: 14 Location: Chicago, IL
|
Posted: Wed Jan 16, 2008 6:40 am Post subject: Tried your suggestions... |
|
|
I tried every permutation, and included DetectHiddenWindows,On.
At odd times, which I cannot figure out why, the program hides from the Taskbar, and only appears as a running process when the Task Manager is invoked. In that state, it ignores IfWinExist, WinRestore, WinMaximize. It even ignores Run, c:/...PowerDesk.
As long as the program window can be seen in the Taskbar, WinMaximize brings it back.
One of the options is to "Minimize to System Tray." Once the icon is in the System Tray, again, none of these commands make it return to a full window. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|