Jump to content

EXE appears in Taskbar, how to remove?


Recommended Posts

Hi,

I have written an autoit script, and converted it to an exe.

When i run the exe, the exe appears in the Taskbar, how do i run the exe without the program appearing in the Taskbar???

I can used the notrayicon, which prevents it from appearing in the system tray, but I want my script to run silently, without appearing in the Taskbar. Any ideas?

Thanks

Link to comment
Share on other sites

I hope you don't mind if I quote myself here.

You need to set another window as the parent (last parameter of GuiCreate), like the desktop or the hidden autoit window. Here's example for both:

GUICreate("Test1", 200, 100, -1, -1, -1, -1, WinGetHandle("Program Manager"))

GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3


AutoItWinSetTitle("WeDontWantToHaveTheSameNameAsOtherScripts")
GUICreate("Test2", 200, 100, -1, -1, -1, -1, WinGetHandle(AutoItWinGetTitle()))

GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3

Link to comment
Share on other sites

I hope you don't mind if I quote myself here.

Just placed your code in my script at the top, converted to an exe and ran it. It displays two test boxes and then run my code....

I want to hide the taskbar icon for the exe... Do i need to insert my code somewhere in the code u have provided???

Link to comment
Share on other sites

Tvern - instead of upping your post count why don't u be helpful for a change? Some people are just so childish. This is a forum, so help instead of being sarcastic.

I told you I already tried the code and it brings up a window. At which point do I enter my code in there? I simply want to hide the Taskbar icon.

I tried entering my code in between the:

GUICreate("Test1", 200, 100, -1, -1, -1, -1, WinGetHandle("Program Manager"))

GUISetState()

Do

Sleep(10)

CODE ENTERED HERE

Until GUIGetMsg() = -3

But that did not work, so how about some help instead of snide remarks?

Link to comment
Share on other sites

Have a look at the GUICreate page in the help file. You may find some styles in particular that may help.

This exstyle causes the GUI to hide from the taskbar.

$WS_EX_TOOLWINDOW | Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE.

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