Sign in to follow this  
Followers 0
Ace08

Renaming a GUI

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@wakillon

thanks :)

@Melba23

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

it might take a while :shocked:

Edited by Ace08

Work smarter not harder.My First Posted Script: DataBase

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Thanks SmOke_N will try this one too and see how it would turn out :)

Thanks again for the help and for staying with me i realy appreciate it ;)


Work smarter not harder.My First Posted Script: DataBase

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  
Followers 0