SendKeys - Forum

Forum Navigation
You need to log in to create posts and topics.

SendKeys

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

 

 

 

@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)

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.

@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.

 

luishp has reacted to this post.
luishp

@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

 

luishp and josevdr95 have reacted to this post.
luishpjosevdr95

TY to you !

Finaly i find alone like a chief the solution of Vadim ^^ with the timer.

Gaev your solution is good too.

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.