Jump to content
Sign in to follow this  
ZenKensei

Show only a tray icon?

Recommended Posts

ZenKensei

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

Share this post


Link to post
Share on other sites
Jos

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)

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
HighGuy

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?

Share this post


Link to post
Share on other sites
jpm

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:

Share this post


Link to post
Share on other sites
Holger

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

Share this post


Link to post
Share on other sites
jpm

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

Share this post


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
Sign in to follow this  

×