twelo Posted December 10, 2009 Share Posted December 10, 2009 using ControlSetText, it Overwrites on previous content how to make it use with previous texts ? like a notepad have already some texts, i want to add some more unicode texts using controlsettext without losing my previous texts. how can i ? and how to make a notepad which supports unicode texts & also save files with unicode chars ? Link to comment Share on other sites More sharing options...
NerdFencer Posted December 10, 2009 Share Posted December 10, 2009 ControlSetText($title,ControlGetText($title,"",$ID)&$WhateverYourTextIs,$ID) _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
twelo Posted December 11, 2009 Author Share Posted December 11, 2009 ControlSetText($title,ControlGetText($title,"",$ID)&$WhateverYourTextIs,$ID) thanks helping me here what i did ControlSetText("Untitled", "", "", ControlGetText("Untitled","","")&"NewText","") from above command i can mix new text with old text either in start position or in end position. any idea to mix with old in anywhere middle, like whwre your cursor blinks ? Link to comment Share on other sites More sharing options...
bo8ster Posted December 11, 2009 Share Posted December 11, 2009 You can, firstly you would have to know where the cursor is then you can use something like StringLeft to break up the string. Local $index = 2 ; the cursor position. I'll leave that for you Local $currentStr = ControlGetText("Untitled","","") Local $str = StringLeft($currentStr, $index) Local $newStr $newStr = $str & "NewText" & StringRight($currentStr, (StringLen($currentStr) - $index)) ControlSetText("Untitled", "", "", $newStr) Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
martin Posted December 11, 2009 Share Posted December 11, 2009 thanks helping me here what i did ControlSetText("Untitled", "", "", ControlGetText("Untitled","","")&"NewText","") from above command i can mix new text with old text either in start position or in end position. any idea to mix with old in anywhere middle, like whwre your cursor blinks ? Maybe Clipput($TextToInsert) Send("^v") Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
twelo Posted December 11, 2009 Author Share Posted December 11, 2009 @ bo8ster & martin i tried what u said above but in both condition i must have to know the already exists text & mouse presence it is useful for static text but it can't help in random dynamically text may be through line & string count fuctions it can be possible but that will be more messy & long term process i just want to send unicode texts like controlsend command any other way to send unicode chars ? 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