gseller Posted May 17, 2008 Share Posted May 17, 2008 I Like it!! Could be a nice fixture on some script. Reminds me alot of the KODA properties list thingy.. Cool! Link to comment Share on other sites More sharing options...
Kip Posted May 17, 2008 Author Share Posted May 17, 2008 ah, cool! Thanks! It just needs some small edits. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Kip Posted May 17, 2008 Author Share Posted May 17, 2008 I Like it!! Could be a nice fixture on some script. Reminds me alot of the KODA properties list thingy.. Cool! biggrin.gifMaybe because I made it to replace Koda MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
gseller Posted May 17, 2008 Share Posted May 17, 2008 Sweet!! Can ya make it so that it can interact with a already written script? If only to edit the gui would be great.. LOL Link to comment Share on other sites More sharing options...
Kip Posted May 17, 2008 Author Share Posted May 17, 2008 That's not really what I meant. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Zedna Posted May 17, 2008 Share Posted May 17, 2008 Nice.Kip! ProgAndy's aditions are educational too. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ProgAndy Posted May 17, 2008 Share Posted May 17, 2008 (edited) Atm i search my Scripts and look which could be helpful This is a wrapper for my Icon Selection Script:http://www.autoit.de/index.php?page=Thread...31304#post31304CODEFunc _PropertyList_IconChoose($fName="") Switch StringInStr($fName,"|") Case 0 Local $file = $fName Case Else Local $file = StringLeft($fName,StringInStr($fName,"|")-1) EndSwitch Local $return = _ChooseIcon($file) If $return[0] = "" Then Return $fName If StringRight($return,4) = ".ico" Then $return[1] = 0 Return $return[0] & "|" & $return[1]EndFunc Edited May 17, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Kip Posted May 17, 2008 Author Share Posted May 17, 2008 (edited) Added another 4 functions: _PropList_EditStart() _PropList_EditEnd() _PropList_EditGetValue() _PropList_EditSetValue() And modified/simplified ProgAndy's function. (not included yet, there are some bugs ) You can set the width manually, or you can set it to 0 (the width of the value field will be used) Add to example: ElseIf $UpdateMsg = $PL_MSG_BROWSEBUTTON Then; If that small little button is pressed If $ItemID = $Item_State Then $ListItems = "@SW_DISABLE|@SW_ENABLE|@SW_HIDE|@SW_LOCK|@SW_MAXIMIZE|@SW_MINIMIZE|@SW_RESTORE|@SW_SHOW|@SW_SHOW DEFAULT|@SW_SHOWMAXIMIZED|@SW_SHOWMINIMIZED|@SW_SHOWMINNOACTIVE|@SW_SHOWNA|@SW_SHOWNOACTIVATE|@SW_SH OWNORMAL" $Text = _PropList_ItemGetValue($PropertiesList, $ItemID) _PropList_EditStart($PropertiesControl, $PropertiesList, $ItemID) $SelectedText = _PropList_CreateSelectionList($PropertiesControl, $PropertiesList, $ItemID, $ListItems, $Text,120) _PropList_EditSetValue($SelectedText) Do until not _IsPressed("01",$User32) EndIf EndIf Function: CODEFunc _PropList_CreateSelectionList($PropControl, $Proplist, $ItemID, $ListItems, $ListDefault, $PreferHeight=60, $PreferWidth=0) $Pos = _PropList_ItemGetValuePos($Proplist,$ItemID) $win = WinGetPos($PropControl[6]) $hWnd = $PropControl[6] $iWidth = _WinAPI_GetClientWidth($hWnd) $iBorder = Int((_WinAPI_GetWindowWidth($hWnd)-$iWidth)/2) $iHeight = _WinAPI_GetClientHeight($hWnd) $iTitle = Int(_WinAPI_GetWindowHeight($hWnd)-$iHeight-$iBorder) $X = $Pos[0] $Y = $Pos[1] $Width = $Pos[2] $Height = $Pos[3] If not $PreferWidth Then $Style = _PropList_ItemGetStyle($Proplist, $ItemID) If BitAND($Style, $PL_BROWSEBUTTON) Then $Width += 19 EndIf EndIf $GUI = GUICreate("",$Width, $PreferHeight, $win[0]+$x+$iBorder,$win[1]+$y+$iTitle+$Height, $WS_POPUP,$WS_EX_TOPMOST, $hWnd) $listv = GUICtrlCreateList("",0,0,$Width,$PreferHeight) GUICtrlSetData(-1,$ListItems,$ListDefault) GUISetState() While 1 $cInfo = GUIGetCursorInfo($GUI) If not @error Then If $cInfo[2] Then If $cInfo[0] >= 0 and $cInfo[1] >= 0 and $cInfo[0] <= $Width And $cInfo[1] <= $PreferHeight Then ; If clicked inside the window $Read = GUICtrlRead($listv) If Not $Read Then $Read = $ListDefault ExitLoop Else ; Outside the window $Read = GUICtrlRead($listv) If Not $Read Then $Read = $ListDefault ExitLoop EndIf Else If _IsPressed("0D",$User32) Then $Read = GUICtrlRead($listv) If Not $Read Then $Read = $ListDefault ExitLoop EndIf EndIf Else $Read = GUICtrlRead($listv) If Not $Read Then $Read = $ListDefault ExitLoop EndIf WEnd GUIDelete($GUI) Return $Read EndFunc $Image_State should have the $PL_BROWSEBUTTON style Edited May 17, 2008 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Kip Posted May 17, 2008 Author Share Posted May 17, 2008 (edited) I've got _PropList_CreateSelectionList() working without any bugs (so it's added) Edited May 17, 2008 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
ProgAndy Posted May 19, 2008 Share Posted May 19, 2008 (edited) Theres still a bug. If you press Escape, The Script breaks with an Error. An easier way, where I found no bugs would be: CODEFunc _PropList_CreateSelectionList($PropControl, $Proplist, $ItemID, $ListItems, $ListDefault, $PreferHeight=60, $PreferWidth=0) Local $Read=$ListDefault, $pos, $Style, $win, $hWnd,$y,$Width,$Height,$SelectionGui,$listv,$cInfo,$nMsg $Pos = _PropList_ItemGetValuePos($Proplist,$ItemID) Local $Style = _PropList_ItemGetStyle($Proplist, $ItemID) If BitAND($Style, $PL_INPUT) Or BitAND($Style, $PL_LABEL) Then Local $win = WinGetPos(GUICtrlGetHandle($Proplist[$ItemID][0])) Else Local $win = WinGetPos(GUICtrlGetHandle($Proplist[$ItemID][1])) EndIf $hWnd = $PropControl[6] $Y = $Pos[3] $Width = $Pos[2] $Height = $Pos[3] If not $PreferWidth Then If BitAND($Style, $PL_BROWSEBUTTON) Then $Width += 19 EndIf Else $Width = $PreferWidth EndIf Local $SelectionGui = GUICreate("",$Width, $PreferHeight, $win[0],$win[1]+$y, $WS_POPUP,$WS_EX_TOOLWINDOW, $hWnd) Local $listv = GUICtrlCreateList("",0,0,$Width,$PreferHeight) GUICtrlSetData(-1,$ListItems,$ListDefault) GUISetState(@SW_SHOW,$SelectionGui) Local $cInfo ,$nMsg While WinActive($SelectionGui) $cInfo = GUIGetCursorInfo($SelectionGui) $nMsg = GUIGetMsg(1) Select Case $cInfo[2] While $cInfo[2] $nMsg = GUIGetMsg(1) If $nMsg[0] = $listv And $cInfo[2] And $nMsg[1] = $SelectionGui Then $Read = GUICtrlRead($listv) ExitLoop 2 EndIf $cInfo = GUIGetCursorInfo($SelectionGui) Sleep(100) WEnd Case _IsPressed("0D",$User32) $Read = GUICtrlRead($listv) If Not $Read Then $Read = $ListDefault ExitLoop Case $nMsg[0] = $GUI_EVENT_CLOSE ExitLoop Case $nMsg[1] > 0 And $nMsg[1] <> $SelectionGui ExitLoop EndSelect WEnd GUIDelete($SelectionGui) Return $Read EndFunc Here are no GUIRegisterMsg needed and I found a way to Replace the _WIN_GetTitlebarheight etc. Simply use WinGetPos with the ControlHanlde, and you get it's screen-Coords. Edited May 19, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Kip Posted May 19, 2008 Author Share Posted May 19, 2008 (edited) And see what happens if you move the gui with the popup open. GUIRegisterMsg(0x0216,"Moving") ... Func Moving($hWnd, $Msg, $wParam, $lParam) GUIDelete($SelectionGui) EndFunc Edited May 19, 2008 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
ProgAndy Posted May 19, 2008 Share Posted May 19, 2008 (edited) OK, So just add this, make a global Variable, that is the Same for All PopUps and then all is fine //Edit: No, use GUIRegisterMsg(0x0216,"Moving") ... Func Moving($hWnd, $Msg, $wParam, $lParam) GUISetState(@SW_HIDE,$SelectionGui) EndFunc otherwise, the Results of the Funcs are Sometimes Not Correct. Edited May 19, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Kip Posted May 19, 2008 Author Share Posted May 19, 2008 Better! MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
James Posted May 20, 2008 Share Posted May 20, 2008 Impressive! I can't wait to see this in its full beauty Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Kip Posted May 24, 2008 Author Share Posted May 24, 2008 Added:_PropList_Dropdown_Check()_PropList_Dropdown_Style()_PropList_ListState()Renamed:_PropList_SelectionList() to _PropList_Dropdown_List()_PropList_CreateList() to _PropList_ListCreate()_PropList_UpdateList() to _PropList_ListUpdate()Impressive! I can't wait to see this in its full beauty I don't think I can get any more beauty out of it :) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
ivan Posted May 25, 2008 Share Posted May 25, 2008 Can´t wait to try it! Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
ProgAndy Posted May 25, 2008 Share Posted May 25, 2008 You should add a parameter for FontWeight to you SetFont Funcs, like: Func _PropList_ItemSetNameFont($Proplist, $ItemID, $font = "MS Sans Serif", $Size = 8.5, $Attribute = 0, $Weight = 400) Return GUICtrlSetFont($Proplist[$ItemID][3], $Size, $Weight, $Attribute, $font) EndFunc ;==>_PropList_ItemSetNameFont *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
MerkurAlex Posted July 7, 2008 Share Posted July 7, 2008 This is for your visual autoit project isn't it? [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
therks Posted July 7, 2008 Share Posted July 7, 2008 Did you notice this thread was over a month old? muttley My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
MerkurAlex Posted July 8, 2008 Share Posted July 8, 2008 Did you notice this thread was over a month old? muttleyNot really :/ my bad lol.There i go reviving an old post i knew this would happen some day. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] 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