memnon Posted March 24, 2009 Share Posted March 24, 2009 ...did you read and or try what the 3/4 posts above yours says/suggests?8)problem is, i dont get it , where i have to use it das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum? Link to comment Share on other sites More sharing options...
ilzimae Posted March 30, 2009 Share Posted March 30, 2009 Thanks for sharing. I'm from non-English speaking country. If $String contains double-byte characters (Chinese, Japanese, and Korean), it does not display properly. For those who using double-byte characters, it would be useful to use lstrlen instead of StringLen() built-in function. Func CreateTextRgn(ByRef $CTR_hwnd, $CTR_Text, $CTR_height, $CTR_font = "Microsoft Sans Serif", $CTR_weight = 1000) ; ... ;~ DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", StringLen($CTR_Text)) Local $CTR_nText = DllCall("kernel32.dll", "int", "lstrlen", "str", $CTR_Text) DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", $CTR_nText[0]) ; ... EndFunc ;==>CreateTextRgn Link to comment Share on other sites More sharing options...
Valuater Posted March 30, 2009 Author Share Posted March 30, 2009 Thanks for sharing. I'm from non-English speaking country. If $String contains double-byte characters (Chinese, Japanese, and Korean), it does not display properly. For those who using double-byte characters, it would be useful to use lstrlen instead of StringLen() built-in function. Func CreateTextRgn(ByRef $CTR_hwnd, $CTR_Text, $CTR_height, $CTR_font = "Microsoft Sans Serif", $CTR_weight = 1000) ; ... ;~ DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", StringLen($CTR_Text)) Local $CTR_nText = DllCall("kernel32.dll", "int", "lstrlen", "str", $CTR_Text) DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", $CTR_nText[0]) ; ... EndFunc ;==>CreateTextRgn Thanks ilzimae! Can someone test and verify this works??? .... If it does, I will put it on Page #1 because others have asked about this also!! 8) Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 30, 2009 Share Posted March 30, 2009 Why not use the "TextOutW" function with "wstr" as a parameter. There shouldn't be a need to make a DLL call for a string's length in bytes. I think it's safer to use length in characters, and use Unicode functions wherever possible. I'm still baffled as to why AutoIT will try to call the ANSI versions of DLL functions (see help on DllCall) when it forced everyone to move to Unicode in version 3.3. There are UDF's that need rewrites too because of the move to Unicode, but I guess they must have missed that during the upgrade. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
myspacee Posted April 23, 2009 Share Posted April 23, 2009 (edited) hello to all, try to use this nice script. i've a question. Is possible to assign free(text) to an 'object' mantain on screen and 'destroy' it when i want ? My needs are to set floating text in a point of screen to make evidence, then 'destroy' this text and make evidence to another point .... anyone can help me? m. Edited April 23, 2009 by myspacee Link to comment Share on other sites More sharing options...
Valuater Posted April 23, 2009 Author Share Posted April 23, 2009 I don't know how to answer that. The text can be placed anywhere, and new "different" text can be placed anywhere as many times as you like. Any one text or text group can be destroyed on command. chronological order is not needed 8) Link to comment Share on other sites More sharing options...
myspacee Posted April 23, 2009 Share Posted April 23, 2009 thank you for reply, you say destroy on command, can you post some script ? I've a gui that show 3x3 grid. when press a key i want to make evidence on one single square or hide others. Can you think i can use textfree engine to do this ? thank you for all good job and disponibility, m. Link to comment Share on other sites More sharing options...
vengat Posted April 24, 2009 Share Posted April 24, 2009 nice effort , i have never seen any thing like this before , it is cool :-) vengat , cool of all Link to comment Share on other sites More sharing options...
RagsRevenge Posted May 3, 2009 Share Posted May 3, 2009 Thanks ilzimae!Can someone test and verify this works???.... If it does, I will put it on Page #1 because others have asked about this also!!8)Hey, I've tried testing it, but it still doesn't seem to work with UTF-8 characters, like ф х цIf I can get these characters working, then your UDF is going to help me out big time. Unfortunately, total newb at autoit, and don't even know where to start looking to fix the problem. Link to comment Share on other sites More sharing options...
Valuater Posted May 4, 2009 Author Share Posted May 4, 2009 I can say that the create shapes is done without the "CreateTextRgn" and just uses a "label" ... give that a try 8) Link to comment Share on other sites More sharing options...
myspacee Posted May 5, 2009 Share Posted May 5, 2009 Hello to all, I need an idea to show all alphabet (a b c d e f g h i j k l m n o p q r s t u v w x y z) in a circle on desktop. If letters are 26 and circle has 360 degrees, every letter must have 13° degree (360/26) from other, right ? Have some difficult to script this, anyone can help ? thank you, m. Link to comment Share on other sites More sharing options...
RagsRevenge Posted May 18, 2009 Share Posted May 18, 2009 I can say that the create shapes is done without the "CreateTextRgn" and just uses a "label"... give that a try8)hi Valuater,I couldn't get your script working with Unicode, but the source code and tutorials were a great help in pointing me in the right direction. Cheers,D Link to comment Share on other sites More sharing options...
Valuater Posted May 18, 2009 Author Share Posted May 18, 2009 (edited) Hello to all, I need an idea to show all alphabet (a b c d e f g h i j k l m n o p q r s t u v w x y z) in a circle on desktop. If letters are 26 and circle has 360 degrees, every letter must have 13° degree (360/26) from other, right ? Have some difficult to script this, anyone can help ? thank you, m. DEMO **** _FreeText_Circle() ... Full or Half Circle expandcollapse popup#include <FreeText.au3> ; ver 2.5.2 ; FreeText.au3 - Demonstration Code - Circle the Horses... lol HotKeySet("{ESC}", "Terminate") Dim $wait = 3000 ; you can copy and paste the Functions _FreeText_Functions() $BGrnd = _FreeText_CreateBackGround("Random") ToolTip("Hit (ESC) to Exit", 1, 1, "FreeText", 1) $TextGUI = _FreeText_Create("ABCDEFGHIJKLMNOPQRSTUVWXYZ") Sleep($wait) _FreeText_Circle($TextGUI) Sleep($wait) $TextGUI2 = _FreeText_CreateCubes(8, -1, -1, 50) Sleep($wait) _FreeText_Shape_SetText($TextGUI2, "Valuater", 30) Sleep($wait) _FreeText_Circle($TextGUI2, 0, 500) While GUIGetMsg() <> -3 WEnd Func _FreeText_Circle($T_GUI, $Full = 1, $adjust = 200, $delay = 1) If Not IsArray($T_GUI) Then Return 0 Local Const $PI = 3.1415926535897932384626433832795, $Points = UBound($T_GUI) Local $Width = (@DesktopWidth - $adjust), $Height = (@DesktopHeight - $adjust), $MidX = $Width / 2, $MidY = $Height / 2 Local $Step = ($PI * (1 + $Full)) / ($Points - $Full), $Radius = $MidY - ($MidY / $Points) For $x = 1 To UBound($T_GUI) - 1 WinMove($T_GUI[$x][0], "", ($MidX - (Cos($x * $Step) * $Radius)) + ($adjust / 2), ($MidY - (Sin($x * $Step) * $Radius)) + ($adjust / 2)) Sleep($delay) Next Return 1 EndFunc ;==>_FreeText_Circle Func Terminate() Exit 0 EndFunc ;==>Terminate Cool!!!... 8) Edited May 18, 2009 by Valuater Link to comment Share on other sites More sharing options...
schoel Posted May 22, 2009 Share Posted May 22, 2009 Hello! I really like your script. I've been using it to display subtitles for movies. However, whenever I create a new text, the movie goes out of fullscreen. I would therefore like to update the text rather than create a new one. I looked at the function _FreeText_Shape_SetText. Is this function for updating texts? I tried it and nothing happens. The text stays as it is. How can update my texts? Best regards, Schoel Link to comment Share on other sites More sharing options...
myspacee Posted May 23, 2009 Share Posted May 23, 2009 thank you Val, try only now, exactly what i need. m. Link to comment Share on other sites More sharing options...
schoel Posted May 23, 2009 Share Posted May 23, 2009 Hello, Disregard my last post. Found on previous page solution to this. GUISetState(@SW_SHOWNOACTIVATE) works well! Link to comment Share on other sites More sharing options...
Valuater Posted May 26, 2009 Author Share Posted May 26, 2009 Hello,Disregard my last post. Found on previous page solution to this. GUISetState(@SW_SHOWNOACTIVATE) works well!Glad that worked!I have been testing with GUISetState(@SW_SHOWNOACTIVATE) and think I am going to release the next update replacing all the @SW_SHOW.8) Link to comment Share on other sites More sharing options...
mesale0077 Posted October 9, 2009 Share Posted October 9, 2009 GUISetFont(48,600,0,"Microsoft Sans Serif") ö,ü,ğ,ş,i,ç word, dont work why Link to comment Share on other sites More sharing options...
Valuater Posted October 9, 2009 Author Share Posted October 9, 2009 The size, shape and etc are set for the text in the initial creation.... _FreeText_Create($String, $Left = -1, $Top = -1, $Size = 50, $Color = "Black", $Font = "Arial", $Weight = 1000) However, if you use the "shaped" text, you can re-size with this Func _FreeText_Shape_SetText($B_GUI, $Text, $Size = 20, $Color = "black", $Font = "Arial", $Weight = 1000, $delay = 20) 8) Link to comment Share on other sites More sharing options...
mesale0077 Posted October 10, 2009 Share Posted October 10, 2009 (edited) thank you,desktop lock forum like picture , Edited October 10, 2009 by mesale0077 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