Jump to content
Sign in to follow this  
msmou

Change active window title

Recommended Posts

msmou

I clicked on a file to open.Before the file opens and the window title is shown to user ,i want to change the window title and then open it.

Can anyone please help

Share this post


Link to post
Share on other sites
Xenobiologist

Open the file in the background, change title and then show it.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
msmou

I want the code sample how to open the file in background,and then change the title and then showing

Share this post


Link to post
Share on other sites
Xenobiologist

Opt('WinTitleMatchMode', 4)
Run('notepad', '',@SW_HIDE)
Sleep(100)
$h = WinGetHandle("[CLASS:Notepad]", "")
ControlSend("[CLASS:Notepad]", "", 'Edit1', 'It works :-) yes')
WinSetTitle($h, '', @UserName)
WinSetState($h, '', @SW_SHOW )


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
msmou

Thanks for the help

It is working fine for notepad.But i am trying for PDF reader where the class and window handle is varying everytime i open it.How do i then get the window title?

Share this post


Link to post
Share on other sites
Xenobiologist

What program do you use to open the PDF file?

Should be the same technique for that program.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.