Because some commands will fail when the Total CMD's window minimizing or loss of focus, and I am finding how to realize some functions like AHK's "If WinActive" in AUTORUN.
[WDX] Autorun Plugin: Run commands/set envvars on TC start
Moderators: Hacker, petermad, Stefan2, white
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Minimizing the window should not affect the execution of the code in any way, unless, of course, you are trying to simulate keystrokes in it.zhxeeaa wrote: 2022-08-31, 04:16 UTCBecause some commands will fail when the Total CMD's window minimizing or loss of focus, and I am finding how to realize some functions like AHK's "If WinActive" in AUTORUN.
But even in this case, knowing about the activity of TC window will not save you. You need look for another way.
Show your code better. Let's see what can be done.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
Minimizing makes it inactive. In that case one would need to use If WinExist.
Roman
Minimizing makes it inactive. In that case one would need to use If WinExist.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
No. Deactivation occurs only by activating another window, not otherwise.Hacker wrote: 2022-08-31, 13:55 UTCMinimizing makes it inactive. In that case one would need to use If WinExist.
Checking the existence here will not play any role at all.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
Roman
I have never observed such behavior.Deactivation occurs only by activating another window, not otherwise.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
2Hacker
You observe this all the time when you switch between windows by Alt+Tab/Esc or click the mouse button to another window.
You observe this all the time when you switch between windows by Alt+Tab/Esc or click the mouse button to another window.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
Strange. Here no window gets minimized when I switch between windows by Alt+Tab/Esc or click the mouse button to another window.
Roman
Strange. Here no window gets minimized when I switch between windows by Alt+Tab/Esc or click the mouse button to another window.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
2Hacker
Nothing strange, it shouldn't collapse. Collapsing occurs when the WS_MINIMIZE flag is set. But the window doesn't cease to be active from this.
Nothing strange, it shouldn't collapse. Collapsing occurs when the WS_MINIMIZE flag is set. But the window doesn't cease to be active from this.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
Roman
When minimizing, the window shouldn't collapse?Nothing strange, it shouldn't collapse.
Isn't that minimizing - which we're talking about?Collapsing occurs when the WS_MINIMIZE flag is set.
The window remains active after one clicks the Minimize button?the window doesn't cease to be active from this
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Minimization = collapse. We talked about activation by Alt+Tab/Esc or mouse click.
See above.
It's not about the window control, it's about the styles of the window at startup.
Run this .vbs:
Code: Select all
CreateObject("WScript.Shell").Run "notepad", 2
But if you change 2 to 7, the window of deactivation of the current window will not occur, i.e. Enter will work in it, not in Notepad.
I paid attention to this in relation to button option in TC.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
Huh? From the beginning we are talking about minimization:Minimization = collapse. We talked about activation by Alt+Tab/Esc or mouse click.
zhxeeaa wrote:some commands will fail when the Total CMD's window minimizing or loss of focus
Fla$her wrote:Minimizing the window should not affect the execution of the code
RomanHacker wrote:Minimizing makes it inactive.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
It was about context:
Hacker wrote: 2022-08-31, 15:55 UTCHere no window gets minimized when I switch between windows by Alt+Tab/Esc or click the mouse button to another window.
Overquoting is evil! 👎
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Fla$her,
It seems to me that the conversation derailed here:
Does this clear up the context?
Roman
It seems to me that the conversation derailed here:
I was saying that I have never observed focus only being lost by switching to another window and not by minimizing. From my experience a window always loses focus when minimized. However, it seems you misunderstood my point as me saying that I never saw a window lose focus by switching to another window.Hacker wrote:I have never observed such behavior.Fla$her wrote:Deactivation occurs only by activating another window, not otherwise.
Does this clear up the context?
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
It should be related to the redrawing of the TC's window every time the window is switched.Hacker wrote: 2022-08-31, 19:36 UTC Fla$her,
It seems to me that the conversation derailed here:I was saying that I have never observed focus only being lost by switching to another window and not by minimizing. From my experience a window always loses focus when minimized. However, it seems you misunderstood my point as me saying that I never saw a window lose focus by switching to another window.Hacker wrote:I have never observed such behavior.Fla$her wrote:Deactivation occurs only by activating another window, not otherwise.
Does this clear up the context?
Roman
I used a command to modify the title bar text of TC:
shellexec "%COMMANDER_PATH%\Addons\TCIMG\TCIMG.exe" "tityn=0 title=~~~~~~~~~~~~~~~~~~~~✿~~~~𝓣𝓒~~~~✿"
But it only works when the TC is started. When the window is switched, the title bar text returns to its original state. Fortunately, I found a sub-parameter of "TCIMG - title" to make it resident in memory to solve this problem:
shellexec "%COMMANDER_PATH%\Addons\TCIMG\TCIMG.exe" "tityn=0 title=~~~~~~~~~~~~~~~~~~~~✿~~~~𝓣𝓒~~~~✿||insystem<>"
I think this problem is the same as the fs2 of TCFS2 that I encountered before to hide the title bar and lose the Windows TaskBar.
Re: [WDX] Autorun Plugin: Run commands/set envvars on TC start
Apparently so.
Clearly.Hacker wrote: 2022-08-31, 19:36 UTCI was saying that I have never observed focus only being lost by switching to another window and not by minimizing.
That's exactly how I understood you.Hacker wrote: 2022-08-31, 19:36 UTCFrom my experience a window always loses focus when minimized. However, it seems you misunderstood my point as me saying that I never saw a window lose focus by switching to another window.

2zhxeeaa
So they would write that the title should be changed. Then why check the activity? Just change in the loop:
Code: Select all
While 1
ShellExec '%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe' '/ei "settext(`My HEADER`)"'
Sleep 5000
Wend
That's a whole other problem. See my answer below. I solved this problem a long time ago with AutoIt script for restoring the window when you move the mouse pointer to the upper left corner of the screen.zhxeeaa wrote: 2022-09-01, 12:23 UTCI think this problem is the same as the fs2 of TCFS2 that I encountered before to hide the title bar and lose the Windows TaskBar.
Overquoting is evil! 👎