Sign in to follow this  
Followers 0
Sardith

Name Changer V0.1

6 posts in this topic

#1 ·  Posted (edited)

;Made by: Geoff Haneckow


#include <GUIConstants.au3>
$winName = ""

Opt("GUIOnEventMode", 1)

GUICreate("Name Changer", 220, 200, 0, 0, -1, $WS_EX_TOPMOST)
$Process = GUICtrlCreateButton("Search for Active Process(s)", 10, 10, 200, 20)
GUICtrlSetOnEvent(-1, "Process")
$winLabel = GUICtrlCreateLabel("Select a Process:", 10, 40)
$win = GUICtrlCreateCombo("Select a Window Title", 10, 55, 200, 100)
$winLabel = GUICtrlCreateLabel("Type what you'd like the new name to be:", 10, 85)
$name = GUICtrlCreateInput ("", 10, 100 , 200, 20)
GUICtrlCreateButton("Change name", 10, 135, 200, 20)
GUICtrlSetOnEvent(-1, "Renamepressed")
Process()
GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")


Func Process()
 ;GUICtrlSetData($win, "|")
    $winList = WinList()
    For $i = 1 To $winList[0][0]
        If $winList[$i][0] <> "" And $winList[$i][0] <> "Program Manager"  And BitAND(WinGetState($winList[$i][0]), 2) Then
            GUICtrlSetData($win, $winList[$i][0])
        EndIf
    Next
EndFunc;==>repopList



Func Renamepressed()
$winName = GUICtrlRead($win)
$label = GUICtrlRead($name)
WinSetTitle($winname, "", $label)
Process()
EndFunc





Do
    $msg = GUIGetMsg()
    Select
        Case $msg = $Process
            Process()
            
        Case $msg = $GUI_EVENT_CLOSE
            GUISetState(@SW_HIDE)
    EndSelect
Until $msg = $GUI_EVENT_CLOSE

Func SpecialEvents()
    

    Select
        Case @GUI_CTRLID = $GUI_EVENT_CLOSE
            Exit
            
        Case @GUI_CTRLID = $GUI_EVENT_MINIMIZE
            
        Case @GUI_CTRLID = $GUI_EVENT_RESTORE
            
    EndSelect
    
EndFunc

Random Title Changer:

CODE

#include <GUIConstants.au3>

$winName = ""

Opt("GUIOnEventMode", 1)

GUICreate("Name Changer", 220, 130, 0, 0, -1, $WS_EX_TOPMOST)

$Process = GUICtrlCreateButton("Search for Active Process(s)", 10, 10, 200, 20)

GUICtrlSetOnEvent(-1, "Process")

$winLabel = GUICtrlCreateLabel("Select a Process:", 10, 40)

$win = GUICtrlCreateCombo("Select a Window Title", 10, 55, 200, 100)

GUICtrlCreateButton("Change name", 10, 100, 200, 20)

GUICtrlSetOnEvent(-1, "Renamepressed")

Process()

GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")

GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")

GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")

Func Process()

;GUICtrlSetData($win, "|")

$winList = WinList()

For $i = 1 To $winList[0][0]

If $winList[$i][0] <> "" And $winList[$i][0] <> "Program Manager" And BitAND(WinGetState($winList[$i][0]), 2) Then

GUICtrlSetData($win, $winList[$i][0])

EndIf

Next

EndFunc ;==>repopList

Func Renamepressed()

$winName = GUICtrlRead($win)

WinSetTitle($winname, "", Random(100, 10000, 1))

sleep(100)

Process()

EndFunc

Do

$msg = GUIGetMsg()

Select

Case $msg = $Process

Process()

Case $msg = $GUI_EVENT_CLOSE

GUISetState(@SW_HIDE)

EndSelect

Until $msg = $GUI_EVENT_CLOSE

Func SpecialEvents()

Select

Case @GUI_CTRLID = $GUI_EVENT_CLOSE

Exit

Case @GUI_CTRLID = $GUI_EVENT_MINIMIZE

Case @GUI_CTRLID = $GUI_EVENT_RESTORE

EndSelect

EndFunc

Enojy everyone. Hope someone can find it to be useful.

Little update.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites



it has utility if you use it with a "name change reminder". something like, when you use the next time she same window the name remains the changed one. something like "boss name key" :)


AutoIt if more than a hobby. Is a way of life!http://www.autoitscript.com/forum/index.php?showtopic=26002 -my first projecthttp://www.autoitscript.com/forum/index.php?showtopic=26103 -my second project

Share this post


Link to post
Share on other sites

Looks interesting, but i cant think of a use for it.

Well if you took the GUI out with all the buttons and all, you could have a nice random name changer for any program that you wanted.


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

looks good if you need to change the name of a scripting window every few minutes. Good for hiding stuff. Not that any good World of Warcraft player would ever need something like this. LOL

:whistle:

- Navajo

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