Jump to content

Show only a tray icon?


Recommended Posts

Group,

I created a script to perform various functions on servers within my network. The script stays running until I exit the script, meaning I have a GUI up all the time. With that in mind, is it possible to hide the task bar icon and rely only on the system tray icon to bring the script back to the forefront (as the active window)? When I click on the icon in the system tray, I have only 'script paused' or 'exit' as an option and neither brings the script window back to the forefront of the desktop. Was just wondering if this was possible to do.

Thanks,

ZK

Link to post
Share on other sites
  • Developers

Group,

    I created a script to perform various functions on servers within my network. The script stays running until I exit the script, meaning I have a GUI up all the time. With that in mind, is it possible to hide the task bar icon and rely only on the system tray icon to bring the script back to the forefront (as the active window)? When I click on the icon in the system tray, I have only 'script paused' or 'exit' as an option and neither brings the script window back to the forefront of the desktop. Was just wondering if this was possible to do.

Thanks,

ZK

<{POST_SNAPBACK}>

Just add an Extended Style called $WS_EX_TOOLWINDOW like:

GUICreate("Timer",120, 50,-1,-1,-1,$WS_EX_TOOLWINDOW)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Just add an Extended Style called $WS_EX_TOOLWINDOW like:

GUICreate("Timer",120, 50,-1,-1,-1,$WS_EX_TOOLWINDOW)

<{POST_SNAPBACK}>

Is there a way to change the extended style after GUICreate?

I know there is a GUICtrlSetStyle for Controls? What about a GUISetStyle(windowID, style [,exStyle]) for the GUI itself?

Link to post
Share on other sites

Is there a way to change the extended style after GUICreate?

I know there is a GUICtrlSetStyle for Controls? What about a GUISetStyle(windowID, style [,exStyle]) for the GUI itself?

<{POST_SNAPBACK}>

No :idiot:
Link to post
Share on other sites

@JP: No? :D ... yes:

you could try something like this:

#include <GUIConstants.au3>
$gui = GUICreate("Timer",120, 50,-1,-1,-1,$WS_EX_TOOLWINDOW)
$GWL_EXSTYLE = -20
GUISetState()
Sleep(3000)
DllCall("User32.dll","int","SetWindowLong","hwnd",$gui,"int",$GWL_EXSTYLE,"long",0)
GUISetState(@SW_HIDE)
GUISetState(@SW_SHOW)
Sleep(3000)

Ok, it's not the best way but possible :idiot:

Link to post
Share on other sites

@JP: No? :lol: ... yes:

you could try something like this:

#include <GUIConstants.au3>
$gui = GUICreate("Timer",120, 50,-1,-1,-1,$WS_EX_TOOLWINDOW)
$GWL_EXSTYLE = -20
GUISetState()
Sleep(3000)
DllCall("User32.dll","int","SetWindowLong","hwnd",$gui,"int",$GWL_EXSTYLE,"long",0)
GUISetState(@SW_HIDE)
GUISetState(@SW_SHOW)
Sleep(3000)

Ok, it's not the best way but possible :D

<{POST_SNAPBACK}>

Thanks Holger, ;):D

I just answer no from Gui Function.

It true now we have this fantastic escape (DllCall). I am afaid sometime of what will append with bad use of this fonction. :idiot:

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...