StrokesPlus Forum
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Bug and Issues
 Known Issues
 [KNOWN] Bug about the Title
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


18 Posts

Posted - 03/15/2013 :  09:25:26  Show Profile  Reply with Quote
Script such as:
acDisplayText(acGetWindowTitle(nil, gsx, gsy), "Arial", 50, 0, 0, 0, 1000, 200, 200)

run with Firefox in german website, Such as:

The results are as follows:
1、Wikipedia – Die freie Enzyklop?die - Mozilla Firefox
2、Fakult?t Elektrotechnik und Informationstechnik - Mozilla Firefox

This function does not recognize the character ä ö ü ß.....
So the function acFindwindow() can not find the window which containing these characters.


2581 Posts

Posted - 03/15/2013 :  09:34:07  Show Profile  Visit Rob's Homepage  Reply with Quote
As I've mentioned in various threads on the site, S+ is not Unicode compatible:

Just read the above link, I don't feel like typing it all out =)
Go to Top of Page


28 Posts

Posted - 03/21/2013 :  03:30:31  Show Profile  Reply with Quote
I think it can be temporarily fixed by changing the window's title to non-Unicode characters. I guess it by using send WM_SETTEXT message. However, since the S+ Lua cannot read Unicode, Lua cannot get the window handle, thus cannot change by itself.

If you want I can create a script that search for all windows title and you can select and change the title manually. A better one is if the script starts the app and change the title automatically each time you run the script, thus S+ can recognize the window.

Or maybe change acFindwindow to accept wild cards? However it cannot be used if all characters of the title are in Unicode...maybe, just MHO.
Go to Top of Page


2581 Posts

Posted - 03/21/2013 :  06:30:53  Show Profile  Visit Rob's Homepage  Reply with Quote
The biggest challenge to this problem is that I'm simply not versed in internationalization development. Plus, since my system, language, and daily usage are not affected, the language issue is likely going to stick around for a while.

If anyone is familiar with C++ and Unicode in an international environment, I'd happily accept any code which could help get things working!

If someone can provide working source code for a native Win32 C++ app which uses the boost libraries (specifically property tree [reading/writing an XML file] and regex) and Lua which can pass Unicode strings between the C++ code, to/from boost property tree and regex and to/from Lua successfully, back and forth between all four code bases, there's nothing more I would love than to have S+ treat all languages as first-class, instead of English.
Go to Top of Page


28 Posts

Posted - 03/21/2013 :  09:01:28  Show Profile  Reply with Quote
I never use any Unicode before, so I cannot help.
However, I've just created a script that could help Unicode users temporarily...I hope.
It is created using AutoIt scripting language.

Change Window Title

Syntax: CwinT.exe "App.exe" "Title1" "Title2"

App.exe = Path and filename of the app user wants to start
Title1 = Title user wants to change
Title2 = Title user wants to change Title1 into

The app.exe can be left blank, to change existing window title without running any new app. So, the syntax will be: CWinT.exe "" "Title1" "Title2"

For convenience, user could create a shortcut that upon executing the shortcut will automatically change the title.
For example, in shortcut properties window..
Target: "D:\CWinT.exe" "notepad.exe" "Untitled - Notepad" "NEW TITLE"
Noticed that the Notepad window title will changed into "NEW TITLE"

The code:
;~ #NoTrayIcon ;uncomment to remove tray icon
;~ #include <Array.au3>	;uncomment for testing to see the array in a table

If $CmdLineRaw = "" then MsgBox(4096, "Syntax", '"ToRun.exe" "Title of the window to change" "Change into"') ;check param
$Params = StringSplit($CmdLineRaw, '"')	;split the parameters into array

;~ _ArrayDisplay($days, "Class List of Active Window");uncomment for testing to see the array in a table

If $Params[0] <> 7 then	;Check if the syntax is correct
	MsgBox(4096, "Syntax Error", 'Syntax is incorrect')

If $Params[2] <> "" then Run($Params[2])	;run the app

$wHnd=WinWait($Params[4] , "" , 10)	;wait for window title to exist. Timeout 10 seconds
If not $wHnd Then	;check whether the title exists or not after timeout
	MsgBox(4096, "Timeout", 'Window with title: "' &$Params[4]&'" does not exist')

WinSetTitle ( $Params[4], "", $Params[6] ) ;Change the window title

Download link:
The zip contains the script, compiled script (CWinT.exe), and ReadMe.txt
Hope it's useful for someone.

One more thing, users could easily get the title of a window using this app:
Just drag it into the window title.

Edited by - Chris on 03/21/2013 09:13:57
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000