Tukata Posted October 25, 2006 Share Posted October 25, 2006 (edited) Hi, I have three things I don't know how to do in this script: 1. I don't want items to be sorted but to appear in the order I wrote them. 2. I don't want any item to be selected on start. 3. I want to send the item full text to the clipboard "on-select" and not use the button. And one question: I have a lot of items, each one is a sentence. Is there a simpler way to load all to listbox then to load one by one ? All help will be appreciated. Thank you Tuk #include <GUIConstants.au3> #Include <GuiList.au3> GUICreate("Caption", 430, 250) $_List =GUICtrlCreateList ("", 10,10,410,100) $s_text="One and one are two" _GUICtrlListAddItem($_List, $s_text) $s_text="Two and two are four" _GUICtrlListAddItem($_List, $s_text) $s_text="Four and three are seven" _GUICtrlListAddItem($_List, $s_text) $BTN =GUICtrlCreateButton (" Copy to Clipboard ",10,100) GUISetState () Do $msg = GUIGetMsg() if $msg = $BTN then $h=GUICtrlRead($_List) ClipPut ($h) endif Until $msg = $GUI_EVENT_CLOSE Edited October 25, 2006 by Tukata Link to comment Share on other sites More sharing options...
CoderDunn Posted October 25, 2006 Share Posted October 25, 2006 This should at least get you started ... #include <GUIConstants.au3> #Include <GuiList.au3> GUICreate("Caption", 430, 250) $_List =GUICtrlCreateList ("", 10,10,410,100,$WS_BORDER + $WS_VSCROLL) $s_text= "One and one are two" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") $s_text= "Two and two are four" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") $s_text= "Four and three are seven" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") $BTN =GUICtrlCreateButton (" Copy to Clipboard ",10,100) GUISetState () Do $msg = GUIGetMsg() if $msg = $BTN then $h=GUICtrlRead($_List) ClipPut ($h) endif Until $msg = $GUI_EVENT_CLOSE Hallman Link to comment Share on other sites More sharing options...
Rad Posted October 25, 2006 Share Posted October 25, 2006 I have three things I don't know how to do in this script: 1. I don't want items to be sorted but to appear in the order I wrote them. 2. I don't want any item to be selected on start. 3. I want to send the item full text to the clipboard "on-select" and not use the button. Added #3 to this... #1 appears to be fixed by hallman, 2 should be fine by default #include <GUIConstants.au3> #Include <GuiList.au3> GUICreate("Caption", 430, 250) $_List =GUICtrlCreateList ("", 10,10,410,100,$WS_BORDER + $WS_VSCROLL) $s_text= "Two and two are four" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") $s_text= "One and one are two" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") $s_text= "Four and three are seven" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") GUISetState () Do $msg = GUIGetMsg() if $msg = $_List then $h=GUICtrlRead($_List) ClipPut ($h) msgbox(0,"Copied to clipboard",$h) endif Until $msg = $GUI_EVENT_CLOSE Link to comment Share on other sites More sharing options...
Tukata Posted October 26, 2006 Author Share Posted October 26, 2006 Many thanks to you both guys. Now I want to include a Thai Script in my sentences for example: $s_text= "Dictionary - พจนานุกรม" GUICtrlSetData($_List,$s_text,"NO_DEFUALT") Can this be done ? Thank you Tuk Link to comment Share on other sites More sharing options...
Rad Posted October 26, 2006 Share Posted October 26, 2006 Not sure, I dont think autoit would be made to support foreign character sets, then again it might depend on the font. But then agan, again, Ive never used foreign characters other than the little ascii symbol things: ¥Ô which seem different on this forum than in warcraft... hmmm :/ Link to comment Share on other sites More sharing options...
Tukata Posted October 26, 2006 Author Share Posted October 26, 2006 Thank you. I even tried to read Thai script from a file and could not. I hope someone will come with a solution how to read Thai script. Tuk 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