Underdogger Posted March 11, 2013 Share Posted March 11, 2013 (edited) This is the schema pic >> http://x.co/wiMPI want to pull outside window and inside inside list would be pulled proportionally...How can I make it?Thanksexpandcollapse popup#include <File.au3> #include <Array.au3> #include <GuiListView.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> Local $clipArray Local $clipOpenFile = FileOpenDialog("Copy Tool", @DesktopDir & "\", "Format(*.txt; *.au3; *.htm; *.php; *.html; *.js)", 1) If Not @error Then $flag1 = True $clipForm = GUICreate("Copy Tool", 364, 468, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS, $WS_OVERLAPPEDWINDOW)) WinSetOnTop("Copy Tool", "", 1) $EnterKey = GUICtrlCreateCheckbox("", 4, 0, 15, 20) $LEnterKey = GUICtrlCreateLabel("Send Enter", 20, 4, 70, 20) $clipList = _GUICtrlListView_Create($clipForm, "", 0, 20, 364, 448) $ClickItem = _GUICtrlListView_InsertColumn($clipList, 0, "Click to paste on text field..", 550) _GUICtrlListView_SetExtendedListViewStyle($clipList, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) _FileReadToArray($clipOpenFile, $clipArray) For $I = 1 To UBound($clipArray) - 1 _GUICtrlListView_AddItem($clipList, $clipArray[$I], 0) Next GUICtrlSetState($EnterKey, $GUI_CHECKED) GUISetBkColor(0x333333, $clipForm) GUICtrlSetColor($LEnterKey, 0xFFFFFF) GUISetState(@SW_SHOW) EndIf If $clipOpenFile <> '' Then While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN $ci = GUIGetCursorInfo() If IsArray($ci) Then If $ci[4] = $ClickItem Then $getItemTxt = _GUICtrlListView_GetItemTextString($clipList) If $getItemTxt <> '' Then If GUICtrlRead($EnterKey) == $GUI_CHECKED Then ClipPut($getItemTxt & @CRLF) Else ClipPut($getItemTxt) EndIf Send("!{TAB}") Sleep(100) Send("^v") EndIf EndIf EndIf EndSwitch WEnd EndIf Edited March 11, 2013 by Underdogger Link to comment Share on other sites More sharing options...
PhoenixXL Posted March 11, 2013 Share Posted March 11, 2013 (edited) Why to use UDF when native control are sufficient Check GUICtrlSetResizing and Opt("GUIResizeMode") Herez is your example scriptexpandcollapse popup#include <File.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt ( "GUIResizeMode", 802 ) ;<<<<<<<<<<<<<<<<<<<<<<<<<< Dock All Local $clipArray Local $clipOpenFile = FileOpenDialog("Copy Tool", @DesktopDir & "\", "Format(*.txt; *.au3; *.htm; *.php; *.html; *.js)", 1) If Not @error Then $flag1 = True $clipForm = GUICreate("Copy Tool", 364, 468, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS, $WS_OVERLAPPEDWINDOW)) WinSetOnTop("Copy Tool", "", 1) $EnterKey = GUICtrlCreateCheckbox("", 4, 0, 15, 20) $LEnterKey = GUICtrlCreateLabel("Send Enter", 20, 4, 70, 20) GUICtrlCreateListView( "", 0, 20, 344, 428) GUICtrlSetResizing( -1, 102 ) ;<<<<<<<<<<<<<<<<<<<<<<<<<< Make it grow as the GUI $clipList = GUICtrlGetHandle( - 1) $ClickItem = _GUICtrlListView_InsertColumn($clipList, 0, "Click to paste on text field..", 550) _GUICtrlListView_SetExtendedListViewStyle($clipList, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) _FileReadToArray($clipOpenFile, $clipArray) For $I = 1 To UBound($clipArray) - 1 _GUICtrlListView_AddItem($clipList, $clipArray[$I], 0) Next GUICtrlSetState($EnterKey, $GUI_CHECKED) GUISetBkColor(0x333333, $clipForm) GUICtrlSetColor($LEnterKey, 0xFFFFFF) GUISetState(@SW_SHOW) EndIf If $clipOpenFile <> '' Then While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN $ci = GUIGetCursorInfo() If IsArray($ci) Then If $ci[4] = $ClickItem Then $getItemTxt = _GUICtrlListView_GetItemTextString($clipList) If $getItemTxt <> '' Then If GUICtrlRead($EnterKey) == $GUI_CHECKED Then ClipPut($getItemTxt & @CRLF) Else ClipPut($getItemTxt) EndIf Send("!{TAB}") Sleep(100) Send("^v") EndIf EndIf EndIf EndSwitch WEnd EndIfRegards Edited March 11, 2013 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
Underdogger Posted March 11, 2013 Author Share Posted March 11, 2013 Why to use UDF when native control are sufficient Check GUICtrlSetResizing and Opt("GUIResizeMode") Herez is your example scriptexpandcollapse popup#include <File.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt ( "GUIResizeMode", 802 ) ;<<<<<<<<<<<<<<<<<<<<<<<<<< Dock All Local $clipArray Local $clipOpenFile = FileOpenDialog("Copy Tool", @DesktopDir & "\", "Format(*.txt; *.au3; *.htm; *.php; *.html; *.js)", 1) If Not @error Then $flag1 = True $clipForm = GUICreate("Copy Tool", 364, 468, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS, $WS_OVERLAPPEDWINDOW)) WinSetOnTop("Copy Tool", "", 1) $EnterKey = GUICtrlCreateCheckbox("", 4, 0, 15, 20) $LEnterKey = GUICtrlCreateLabel("Send Enter", 20, 4, 70, 20) GUICtrlCreateListView( "", 0, 20, 344, 428) GUICtrlSetResizing( -1, 102 ) ;<<<<<<<<<<<<<<<<<<<<<<<<<< Make it grow as the GUI $clipList = GUICtrlGetHandle( - 1) $ClickItem = _GUICtrlListView_InsertColumn($clipList, 0, "Click to paste on text field..", 550) _GUICtrlListView_SetExtendedListViewStyle($clipList, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) _FileReadToArray($clipOpenFile, $clipArray) For $I = 1 To UBound($clipArray) - 1 _GUICtrlListView_AddItem($clipList, $clipArray[$I], 0) Next GUICtrlSetState($EnterKey, $GUI_CHECKED) GUISetBkColor(0x333333, $clipForm) GUICtrlSetColor($LEnterKey, 0xFFFFFF) GUISetState(@SW_SHOW) EndIf If $clipOpenFile <> '' Then While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN $ci = GUIGetCursorInfo() If IsArray($ci) Then If $ci[4] = $ClickItem Then $getItemTxt = _GUICtrlListView_GetItemTextString($clipList) If $getItemTxt <> '' Then If GUICtrlRead($EnterKey) == $GUI_CHECKED Then ClipPut($getItemTxt & @CRLF) Else ClipPut($getItemTxt) EndIf Send("!{TAB}") Sleep(100) Send("^v") EndIf EndIf EndIf EndSwitch WEnd EndIfRegards Yes, you gave me nice idea!! Thanks bro!! 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