Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Change Gui Title


  • Please log in to reply
11 replies to this topic

#1 the_lord_mephy

the_lord_mephy

    I can't believe I asked this many questions =-o

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 11 November 2004 - 03:05 AM

Is there a way to change my GUIs title when something happens?
My site for HTML Help :)

Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?

View Post








#2 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 11 November 2004 - 03:09 AM

WinSetTitle(.....)
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#3 the_lord_mephy

the_lord_mephy

    I can't believe I asked this many questions =-o

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 11 November 2004 - 03:16 AM

Yeah but I'm not sure what the win title is going to be. It's going to be changed very often throughout the script and I don't think WinSetTitle works with handles
My site for HTML Help :)

Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?

View Post


#4 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 11 November 2004 - 03:32 AM

Did you try?

Opt("WinTitleMatchMode", 4) $h = GuiCreate("Title One.") GuiSetState() sleep(1000) WinSetTitle("handle=" & $h, "", "Title Two..") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Three...") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Four....") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Five.....")

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#5 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 10,470 posts

Posted 11 November 2004 - 11:06 AM

Did you try?

Opt("WinTitleMatchMode", 4) $h = GuiCreate("Title One.") GuiSetState() sleep(1000) WinSetTitle("handle=" & $h, "", "Title Two..") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Three...") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Four....") sleep(1000) WinSetTitle("handle=" & $h, "", "Title Five.....")

<{POST_SNAPBACK}>

Not required, this is easier:

$h = GuiCreate("Title One.") GuiSetState() sleep(1000) WinSetTitle($h, "", "Title Two..")


#6 the_lord_mephy

the_lord_mephy

    I can't believe I asked this many questions =-o

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 13 November 2004 - 06:23 PM

Ah, see I didn't know WinSetTitle worked with handles. Thanks both of you
My site for HTML Help :)

Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?

View Post


#7 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 10,470 posts

Posted 14 November 2004 - 12:32 PM

Ah, see I didn't know WinSetTitle worked with handles. Thanks both of you

<{POST_SNAPBACK}>

Any function that works with "title", "text" works with handles. Totally undocumented but when I upgraded the variants to support handles this was a nice side effect. In fact the "handle=" is completely redundant now - it stays only because I need it for AutoItX.
  • Xandy likes this

#8 the_lord_mephy

the_lord_mephy

    I can't believe I asked this many questions =-o

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 14 November 2004 - 06:05 PM

Ooh, that's very helpful. Thanks Jon
My site for HTML Help :)

Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?

View Post


#9 ezzetabi

ezzetabi

    さくらが さいた

  • Active Members
  • PipPipPipPipPipPip
  • 2,011 posts

Posted 14 November 2004 - 09:43 PM

This is great. It need to be documented!

#10 loukaniko

loukaniko

    Seeker

  • New Members
  • 3 posts

Posted 04 July 2010 - 04:17 PM

This Thread is 6 years old now. But this issue is STILL totally undocumented. I'm using autoit for so many years, and I'm a little frustrated that this feature has been there and is ... 6 years old.

please can you put it to the next version's help file?

thanks :blink:

#11 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 04 July 2010 - 04:35 PM

This Thread is 6 years old now. But this issue is STILL totally undocumented. I'm using autoit for so many years, and I'm a little frustrated that this feature has been there and is ... 6 years old.

please can you put it to the next version's help file?

thanks :blink:

Look at "Window Titles and Text (Advanced)" in the help file.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#12 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 20,964 posts

Posted 04 July 2010 - 04:38 PM

loukaniko,

From the Help file - <Using AutoIt - Window Titles and Text (Advanced)>: :blink:

Window Handles / HWNDs

The variant datatype in AutoIt natively supports window handles (HWNDs). A window handle is a special value that windows assigns to a window each time it is created. When you have a handle you may use it in place of the title parameter in any of the function calls that use the title/text convention. The advantage of using window handles is that if you have multiple copies of an application open - which have the same title/text - you can uniquely identify them when using handles. When you use a window handle for the title parameter then the text parameter is completely ignored.

Various functions such as WinGetHandle, WinList and GUICreate return these handles. It is important to note that a window handle is not classed as a number or string - it is its own special type.

Note: Window handles will work no matter what WinTitleMatchMode is currently in use.

Example

$handle = WinGetHandle("Untitled - Notepad", "")
WinClose($handle)

Neck retract button = Pressed

could well be the next thing on your agenda. ;)

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users