Jump to content

WinSetState(title,text,@SW_MINIMIZE) not sending program to tray


Recommended Posts

I'm using a program that will automatically hide itself and create a tray icon when it is minimized. However, the AutoIt way of minimization does not seem to activate this function for the program - it simply minimizes down to the task bar like any normal program would do.

Outside of directly sending keystrokes, how can I emulate an actual "minimize" button press for this program? ControlSend (and similar Control functions) are acceptable.

EDIT: More info:

The program is MME Audio Repeater from Virtual Audio Cable, for anyone wondering.

I can't just @SW_HIDE the program as it only creates the tray icon if it's minimized properly

Edited by Sunblood
Link to comment
Share on other sites

When you press the Minimize button a trayicon is created but when you set the state of the program using WinSetState( $sTitle, $sText, @SW_MINIMIZE ) you don't get the trayicon.

If yes, then something under the hood is going on. You could just simulate the Clicking process on the Minimize button, I guess

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

When you press the Minimize button a trayicon is created but when you set the state of the program using WinSetState( $sTitle, $sText, @SW_MINIMIZE ) you don't get the trayicon.

If yes, then something under the hood is going on. You could just simulate the Clicking process on the Minimize button, I guess

Yeah that's the exact problem.

I could do it with mouseclicks but I'm looking for something more elegant to be able to automate the process without taking the active window.

Link to comment
Share on other sites

So is it the real minimize button like we have in a normal GUICreate or does it look somewhat other than that ?

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

The NC Area doesn't seems to be of WindowsAPI, its user drawn control which is used to set the state of the window.

Have you tried Autoit Window Info Tool over that minimize button ?

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...