Sign in to follow this  
Followers 0
au3scr

Notepad

4 posts in this topic

How i add window title change action?

I want make it change window title when i open window.

I tried to don it but i couldn't

Can onyone help me?

#include <GUIConstants.au3>

Global $title = "Noteoad  - Newfile"

#Region ### START Koda GUI section ### Form=c:\documents and settings\rain\my documents\form1.kxf
$Form1_1 = GUICreate($title, 631, 470, 193, 125, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
$body = GUICtrlCreateEdit("", 3, 2, 625, 441)
$Label1 = GUICtrlCreateLabel("Lines:", 3, 448, 36, 17)
$Label2 = GUICtrlCreateLabel("Mouse:", 40, 448, 39, 17)
$file = GUICtrlCreateMenu("File")
$fileopen = GUICtrlCreateMenuItem("Open", $file)
$filesave = GUICtrlCreateMenuItem("Save", $file)
$filesaveas = GUICtrlCreateMenuItem("Save As", $file)
$fileexit = GUICtrlCreateMenuItem("Exit", $file)
$Edit = GUICtrlCreateMenu("Edit")
$editfont = GUICtrlCreateMenuItem("Font", $Edit)
$editcolor = GUICtrlCreateMenuItem("Color", $Edit)
$editfontsize = GUICtrlCreateMenuItem("Font size", $Edit)
$editfind = GUICtrlCreateMenuItem("Find", $Edit)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $fileopen
            $path = FileOpenDialog("Select file:","", "(*.*)")
            $open = FileRead ($path)
            GUICtrlSetData ($title,"opened")
            GUICtrlSetData ($body,$open)
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites



bump


Share this post


Link to post
Share on other sites

You can't use guictrlsetdata to set the window title... you can use WinSetTitle($title, "", $path) though. In that code it will change the title to the path set in fileopen.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

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