Jump to content

Renaming a GUI


Ace08
 Share

Recommended Posts

hi guys my 1st task is now complete now i am trying to learn about GUI's... i was thinking can a GUI be renamed after you created it? additionaly can i make the script not to show at the taskbar when its running but will still show a tray icon so that i know that the script is running?

is this posible?

Work smarter not harder.My First Posted Script: DataBase

Link to comment
Share on other sites

hi guys my 1st task is now complete now i am trying to learn about GUI's... i was thinking can a GUI be renamed after you created it? additionaly can i make the script not to show at the taskbar when its running but will still show a tray icon so that i know that the script is running?

is this posible?

See winsettitle function in the helpfile ! Posted Image

$_Gui = GUICreate ( "", 300, 100, -1, -1 )
GUISetState ( )

$_I =0
While 1
    $_I += 1
    WinSetTitle ( $_Gui, '', $_I )
    Sleep ( 1000 )
WEnd
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

  • Moderators

Ace08,

You can remove a GUI's button from the taskbar by using the "parent" parameter when you create your GUI: ;)

#include <GUIConstantsEx.au3>

; Create parent
$hGUI = GUICreate("Parent", 500, 500)
GUISetState()

; Use parent handle when creating child
$hGUI_No_TaskBar_1 = GUICreate("Child", 200, 200, 100, 100, Default, Default, $hGUI)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

If you do not have a parent, then you can use the ever-present, but hidden, AutoIt window: :)

#include <GUIConstantsEx.au3>

; Use AutoIt window handle when creating child
$hGUI_No_TaskBar_2 = GUICreate("AutoIt Window Child", 200, 200, 200, 200, Default, Default, WinGetHandle(AutoItWinGetTitle()))
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

I hope that helps.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

question? if i understand right, you used the autoit window to be the parent will this also apply with other applications? i mean can i link a child GUI to another application say notepad? with this the GUI's button on the taskbar will be its parent?

Work smarter not harder.My First Posted Script: DataBase

Link to comment
Share on other sites

  • Moderators

aw thats a lot of code ;) i'll try this one thanks :)

You could use $WS_EX_TOOLWINDOW in the ExStyle param of the GUI to remove from taskbar, however, it's going to change how the GUI looks visually.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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