
Quote from Feli on February 18, 2023, 6:27 pmHi all
I'm back with the senkeys command.
I can't understand and i need help.
My 1st app go to minimized and launch a second app.
I would like than the 2nd app close my 1st app go alone to maximized.
What i must to do in the 1st and in 2nd app for that?
TYVM
Feli
Hi all
I'm back with the senkeys command.
I can't understand and i need help.
My 1st app go to minimized and launch a second app.
I would like than the 2nd app close my 1st app go alone to maximized.
What i must to do in the 1st and in 2nd app for that?
TYVM
Feli

Quote from Vadim on February 18, 2023, 8:00 pm@feli
To start another application, you can use the Run command.
To close another application, you can use:
command CloseApp (VisualNEO Win)
command hpwAutoItWinKill or command hpwAutoItWinClose, plugin hpwAutoIt (Hans-Peter Wickern)
command dec_CerrarAplicacion_1 or command dec_CerrarAplicacion_2 , plugin dec_Plus 1.9 (David Esperalta)
command RAC_WinKil or RAC_Winclose, plugin RacAutoIt3x 1.0 (Roman Avalos Castillo)
command rlCloseWindow, plugin rlFunctions 2.6s (Reynold E. Lariza)
To start another application, you can use the Run command.
To close another application, you can use:
command CloseApp (VisualNEO Win)
command hpwAutoItWinKill or command hpwAutoItWinClose, plugin hpwAutoIt (Hans-Peter Wickern)
command dec_CerrarAplicacion_1 or command dec_CerrarAplicacion_2 , plugin dec_Plus 1.9 (David Esperalta)
command RAC_WinKil or RAC_Winclose, plugin RacAutoIt3x 1.0 (Roman Avalos Castillo)
command rlCloseWindow, plugin rlFunctions 2.6s (Reynold E. Lariza)

Quote from Feli on February 18, 2023, 8:10 pmTY Vadim
Sorry my english is very bad !
My 1st app is always running but minimized
i want to maximize auto it when the second app close.
TY Vadim
Sorry my english is very bad !
My 1st app is always running but minimized
i want to maximize auto it when the second app close.

Quote from Vadim on February 18, 2023, 10:35 pm@feli
I may have misunderstood you.
In the timer you can check if the other application you are looking for is running.
To do this you can use the IsAppRunning command.
If the application is not running, you can react as desired in your application.
I may have misunderstood you.
In the timer you can check if the other application you are looking for is running.
To do this you can use the IsAppRunning command.
If the application is not running, you can react as desired in your application.
Quote from Gaev on February 19, 2023, 5:43 pm@feli
I too misunderstood your requirements as stated in the first post.
i want to maximize auto it when the second app close.
This is much easier than I initially thought.
Using the example of notepad.exe as the second App, try this code ...
SetVar "[WindowState]" "Minimized" Run "c:\windows\notepad.exe" "" "RunOnce" "whenNotepadCloses" "[AppId]"... and create a subroutine (Press the F12 key, and then display the full screen editor to make it easier to manage subroutines) like so ...
:whenNotepadCloses SetVar "[WindowState]" "Maximized" ... remove AlertBox after successful testing. AlertBox "Notepad" "closed" Return
I too misunderstood your requirements as stated in the first post.
i want to maximize auto it when the second app close.
This is much easier than I initially thought.
Using the example of notepad.exe as the second App, try this code ...
SetVar "[WindowState]" "Minimized" Run "c:\windows\notepad.exe" "" "RunOnce" "whenNotepadCloses" "[AppId]"
... and create a subroutine (Press the F12 key, and then display the full screen editor to make it easier to manage subroutines) like so ...
:whenNotepadCloses SetVar "[WindowState]" "Maximized" ... remove AlertBox after successful testing. AlertBox "Notepad" "closed" Return

Quote from Feli on February 19, 2023, 8:34 pmTY to you !
Finaly i find alone like a chief the solution of Vadim ^^ with the timer.
Gaev your solution is good too.
TY to you !
Finaly i find alone like a chief the solution of Vadim ^^ with the timer.
Gaev your solution is good too.
Quote from PaulJonestindall on March 1, 2023, 7:30 pmLet me see if I also understand this...
You have app number 1 that will minimize when you run app number 2, and then maximize when the second app is closed, correct?
Could this be a possible solution:
SetVar "[WindowState]" "Minimized"
Run "app2.exe" "" "Wait+LoadComplete" "" ""
SetVar "[WindowState]" "Maximized"Under these conditions though, you cannot use app number 1 while app number 2 is running.
Let me see if I also understand this...
You have app number 1 that will minimize when you run app number 2, and then maximize when the second app is closed, correct?
Could this be a possible solution:
SetVar "[WindowState]" "Minimized"
Run "app2.exe" "" "Wait+LoadComplete" "" ""
SetVar "[WindowState]" "Maximized"
Under these conditions though, you cannot use app number 1 while app number 2 is running.