DirtyBanditos Posted February 28, 2005 Share Posted February 28, 2005 (edited) Hi all´ have any a exampel to make a Titlechanger for any Prog=? i use the search func but not found Thx for any help! Edited February 28, 2005 by DirtyBanditos Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 1, 2005 Share Posted March 1, 2005 (edited) i'll make one for you and edit this post, just a minute edit: ok maybe longer... im making it nice Edited March 1, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
MHz Posted March 1, 2005 Share Posted March 1, 2005 Here is a title changer. Got it from somewhere? You maybe able to use some of it? expandcollapse popup#include <GUIConstants.au3> If Random() < 0.5 Then ;Capitals $Letter1 = Chr(Random(Asc("A"), Asc("Z") + 1)) $Letter2 = Chr(Random(Asc("A"), Asc("Z") + 1)) $Letter3 = Chr(Random(Asc("A"), Asc("Z") + 1)) $Letter4 = Chr(Random(Asc("A"), Asc("Z") + 1)) $Letter5 = Chr(Random(Asc("A"), Asc("Z") + 1)) $Letter6 = Chr(Random(Asc("A"), Asc("Z") + 1)) Else ;Lower case $Letter1 = Chr(Random(Asc("a"), Asc("z") + 1)) $Letter2 = Chr(Random(Asc("a"), Asc("z") + 1)) $Letter3 = Chr(Random(Asc("a"), Asc("z") + 1)) $Letter4 = Chr(Random(Asc("a"), Asc("z") + 1)) $Letter5 = Chr(Random(Asc("a"), Asc("z") + 1)) $Letter6 = Chr(Random(Asc("a"), Asc("z") + 1)) EndIf GUICreate("Windows title changer") $n1 = GUICtrlCreateCombo("Select a window", 10, 20) GUICtrlSetData(-1, getWindows()) GUISetState() GUICtrlCreateLabel("Do you want to change the window-title of:", 60, 50) $selected = GUICtrlCreateLabel(GuiCtrlRead ($n1), 70, 70, 300, 20) GUICtrlCreateLabel("to:", 60, 90) $changed = GUICtrlCreateLabel($Letter1 & $Letter2 & $Letter3 & $Letter4 & $Letter5 & $Letter6, 70, 110, 300) $cancel = GUICtrlCreateButton("Cancel", 120, 140, 50) $yes = GUICtrlCreateButton("Yes", 70, -1, 50) $refresh = GUICtrlCreateButton("Refresh", 320, 10, 50) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $n1 GUICtrlSetData($selected, GuiCtrlRead ($n1)) Case $msg = $cancel ExitLoop Case $msg = $yes WinSetTitle(GuiCtrlRead ($n1), "", GuiCtrlRead ($changed)) MsgBox(0, "Titlechange", 'The window-title: "' & GuiCtrlRead ($n1) & '" was successfully changed to: "' & GuiCtrlRead ($changed) & '"') GUICtrlSetData($n1, getWindows()) keeptitle() Case $msg = $refresh GUICtrlSetData($n1, getWindows()) EndSelect WEnd Func getWindows() Local $T_Windows = "" Local $Var = WinList() For $i = 1 To $Var[0][0] ; Only display visble windows that have a title If $Var[$i][0] <> "" And IsVisible($Var[$i][1]) Then $T_Windows = $T_Windows & "|" & $Var[$i][0] EndIf Next Return $T_Windows EndFunc;==>getWindows Func IsVisible($handle) If BitAND( WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndFunc;==>IsVisible Func keeptitle() Do $title = $Letter1 & $Letter2 & $Letter3 & $Letter4 & $Letter5 & $Letter6 WinSetTitle(GuiCtrlRead ($n1), "", GuiCtrlRead ($changed)) Until Not ($title = GuiCtrlRead ($changed)) EndFunc Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 1, 2005 Share Posted March 1, 2005 (edited) oooh u were faster than me, but i like mine more expandcollapse popup;Created by Xenogis ;================== ;Customize window titles Dim $CTitle, $STO Dim $C1, $W1, $JS, $NC, $TM, $ston = 0 #include <GUIConstants.au3> #notrayicon Opt ("GUIOnEventMode", 1) Opt ("WinTitleMatchMode", 3) GUICreate("Title Changer", 225, 92, -1, -1, -1, $WS_EX_TOPMOST) GUISetOnEvent($GUI_EVENT_CLOSE, "quit") $WTL = GUICtrlCreateLabel("Current window title", 25, 3, 175, 17, $SS_SUNKEN + $SS_CENTER) $STC = GUICtrlCreateCheckbox("Show time", 3, 23, 70, 20) $STE = GUICtrlCreateInput("", 80, 23, 135, 20) GUICtrlCreateLabel("The title will change automaticly as you type.", 9, 46, 215, 20) GUICtrlCreateButton("Manually Update Title", 50, 69, 120, 20, $BS_DEFPUSHBUTTON) GUICtrlSetOnEvent(-1, "MUT") GUISetState() While 1 If Not (WinGetTitle("") = "Title Changer") And Not (WinGetTitle("") = $CTitle) And Not (WinGetTitle("") = "") Then $GTitle = WinGetTitle("") If Not ( $CTitle = "Title Changer" ) Then $CTitle = $GTitle GUICtrlSetData($WTL, $CTitle) $W1 = 1 $JS = 1 $NC = 0 EndIf ElseIf WinGetTitle("") = "" And $NC = 0 Then GUICtrlSetData($WTL, "Titleless Windows Not Supported." ) $NC = 1 ElseIf WinGetTitle("") = "Title Changer" And $W1 = 1 Then GUICtrlSetData($WTL, $CTitle) $W1 = 0 $NC = 0 EndIf If GUICtrlRead($STC) = $GUI_CHECKED And $C1 = 0 And $JS = 1 Then $C1 = 1 ShowTime() AdlibEnable("STLoop") ElseIf GUICtrlRead($STC) = $GUI_UNCHECKED And $C1 = 1 Then $C1 = 0 AdlibDisable() StopTitle() EndIf If Not (GUICtrlRead($STE) = $STO) And Not (GUICtrlRead($STE) = "") And $JS = 1 And Not (GUICtrlRead($WTL) = "Title Changer") And Not ( $CTitle = "Title Changer" ) Then If $ston = 0 Then WinSetTitle($CTitle, "", GUICtrlRead($STE)) $CTitle = GUICtrlRead($STE) $title = GUICtrlRead($STE) $STO = GUICtrlRead($STE) GUICtrlSetData ( $WTL, GUICtrlRead ( $STE ) ) EndIf If Not WinExists ( "Title Changer" ) Then _ WinSetTitle ( WinGetTitle ( "" ), "", "Title Changer" ) WEnd Exit Func ShowTime() If Not ($CTitle = "Title Changer") Then Global $title, $hwnd $ston = 1 $hwnd = WinGetHandle ( $CTitle ) $title = $CTitle STLoop() EndIf EndFunc Func STLoop() SetTitle($hwnd, $title) Sleep(200) EndFunc Func SetTitle($h, $t) If @HOUR > 12 Then $hour = @HOUR - 12 $pa = " PM" Else $hour = @HOUR $pa = " AM" EndIf WinSetTitle($h, "", $t & " < " & $hour & ":" & @MIN & ":" & @SEC & $pa & " >") EndFunc Func StopTitle() WinSetTitle($title, "", $title) $ston = 0 EndFunc Func Quit() Exit EndFunc Func MUT() If Not (GUICtrlRead($STE) = "") And $JS = 1 And Not (GUICtrlRead($WTL) = "Title Changer") And Not ( $CTitle = "Title Changer" ) Then WinSetTitle($CTitle, "", GUICtrlRead($STE)) $CTitle = GUICtrlRead($STE) $title = GUICtrlRead($STE) GUICtrlSetData ( $WTL, GUICtrlRead ( $STE ) ) EndIf EndFunc edit: remember! larry made the time part, i just put it inside this program edit2: improved code, now the X button quits right when you press it! edit3: btw its really buggy right now but i almost have all of the bugs worked out edit4: i think i fixed all the bugs now except for one where if you type too fast (really fast) it wont update the window title until you re-select it then click Manually Update Title edit5: a more basic example WinSetTitle ( WinGetTitle ( "" ), "", "New Title" ) that will change the title of the active window to "New Title" Edited March 1, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
MHz Posted March 1, 2005 Share Posted March 1, 2005 Sorry Xenogis, had one premade to fit. oooh u were faster than me, but i like mine more You may like your script. But others may not benefit too well. Try to copy and paste from the codebox, that you used, and you will find that your script is one big line.The code tags are best for code. Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 1, 2005 Share Posted March 1, 2005 never knew that, i will change it [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
DirtyBanditos Posted March 1, 2005 Author Share Posted March 1, 2005 i'll make one for you and edit this post, just a minuteedit: ok maybe longer... im making it nice <{POST_SNAPBACK}>Hi Xenogis And Mhz wow very nice exampels I like all two exampels Thx to help me out Xenogis and Mhz I like this gui Styles^^^thx you for help me out And thx for the Good jobs works very nice Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now