jlorenz1 Posted December 21, 2006 Posted December 21, 2006 I deleted the combobox and created a new one - but still the same problems I restarted the PC - but still the same problems I can change the content of this combobox, but i can't highlight the content and I can't expand the combobox by clicking the right arrow. Has anyone an idea? Thanks Johannes expandcollapse popup#include <GUIConstants.au3> Global $sMyPic ='' Global $sMyFol1 ='' Global $sMyFol2 ='' Global $aPic [101] Global $fPic [101][2] Global $cPic = '' Global $aGn = StringSplit('Die Urheberrechts-Schutzdauer des hier abgebildeten flächigen Kunstwerks ist weltweit abgelaufen, da der Künstler bereits seit über 70 Jahren tot ist. Es ist somit gemeinfrei (»public domain«) |Ich bin Inhaber bzw. Fotograf des hier abgebildeten flächigen Werkes und erlaube es unter der freien Lizenz (»public domain«) zu veröffentlichen. ' & @MDAY & '.' & @Mon & '.' & @Year, '|') Global $aGni = 1 GUICreate('WikipediaAusfüller', 320, 555, @Desktopwidth - 325, @DesktopHeight - 590, -1,$WS_EX_TOPMOST) $filemenu = GUICtrlCreateMenu ("&Datei") $fileitem = GUICtrlCreateMenuitem ("Ö&ffnen",$filemenu) $tab=GUICtrlCreateTab (10, 5, 300, 480) $tab0=GUICtrlCreateTabitem ('Eingabe') GUICtrlCreateLabel('Ordner mit den hochzuladenden Bildern',20,35,200,15) $c01 = GUICtrlCreateCombo('', 20, 50,255, 60) $b01 = GUICtrlCreateButton('', 280, 48, 24, 24, $BS_ICON) GUICtrlSetImage ($b01, @ScriptDir & '\wiki.dll', 7) GUICtrlSetTip($b01, 'Ordner mit den hochzuladenden Bildern auswählen') $pic = GUICtrlCreatePic ( '', 212, 75 , 90, 90, -1, $SS_WHITEFRAME ) GUICtrlSetImage (-1, @ScriptDir & '\wiki2.jpg') GUICtrlSetTip(-1, 'Ordner mit den hochzuladenden Bildern auswählen') $c02 = GUICtrlCreateLabel('Bild in Bearbeitung', 20, 75, 190, 80) ;********************************************************************* ; I CAN CHANGE THE CONTENT OF THIS COMBOBOX, BUT I CAN'T HIGHLIGHT THE ; CONTENT OR EXPAND THE COMBOBOX BY CLICKLING THE ARROW AT THE RIGHT SIDE ; Try it first with a new combobox. I've gotten the same results.strange $c03 = GUICtrlCreateCombo('wewretgwtwstwtetwew', 20, 90, 190, 80) ;***************************************************************** $c04 = GUICtrlCreateLabel('Maße', 20, 118, 27, 15) $c05 = GUICtrlCreateInput (' ', 50, 115, 80, 20, $ES_READONLY) GUICtrlCreateLabel('%', 135, 118, 10, 20) $prg = GUICtrlCreateProgress (145,115,64,20,$PBS_SMOOTH) $c06 = GUICtrlCreateLabel ('Status Textbausteine', 20, 145, 100, 20) $b03 = GUICtrlCreateButton ('', 150,140,25,25, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 3) GUICtrlSetTip(-1, 'Bildpfad in den Zwischenspeicher') $b04 = GUICtrlCreateButton ('', 184,140,25,25, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 2) GUICtrlSetTip(-1, 'Bildangaben in den Zwischenspeicher') GUICtrlCreateGroup ( "Angaben zum Bild", 15, 170, 290, 310) GUICtrlCreateLabel ('Beschreibung', 22, 185, 100, 15) $eBs = GUICtrlCreateEdit ('', 22, 200, 275, 30, $ES_MULTILINE) GUICtrlCreateLabel ('Urheber', 22, 230, 100, 15) $eUh = GUICtrlCreateEdit ('', 22, 245, 275, 30, $ES_MULTILINE) GUICtrlCreateLabel ('Anmerkungen', 22, 275, 100, 15) $eAm = GUICtrlCreateEdit ('', 22, 290, 275, 30, $ES_MULTILINE) GUICtrlCreateLabel ('Quelle', 22, 320, 100, 15) $eQl = GUICtrlCreateEdit ('', 22, 335, 275, 30, $ES_MULTILINE) GUICtrlCreateLabel ('Seite/n', 180, 320, 35, 15) $eSt = GUICtrlCreateInput ('', 217, 320, 80, 15) GUICtrlCreateLabel ('Genehmigung', 22, 365, 100, 15) $b05 = GUICtrlCreateButton ('', 280, 365, 16, 16, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 8, 0) GUICtrlSetTip(-1, 'Andere Genehmigungsart laden') $eGn = GUICtrlCreateEdit ('', 22, 380, 275, 60, $ES_MULTILINE) GUICtrlCreateLabel ('Andere Versionen', 22, 440, 100, 15) $eAV = GUICtrlCreateInput ('', 22, 455, 245, 20) $b06 = GUICtrlCreateButton ('', 273, 452, 24, 24, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 4) GUICtrlSetTip(-1, 'Duplikate manuell finden') $tab1=GUICtrlCreateTabitem ('Einstellungen') $tab1=GUICtrlCreateTabitem ('Ausfüllen') GUICtrlCreateTabitem ('') $b07 = GUICtrlCreateButton ('', 90, 490, 32, 32, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 0) GUICtrlSetTip(-1, 'Beenden') $b08 = GUICtrlCreateButton ('', 129, 490, 32, 32, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 1) GUICtrlSetTip(-1, 'Textdatei mit den Bildangaben öffnen') $b09 = GUICtrlCreateButton ('', 168, 490, 32, 32, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 9) GUICtrlSetTip(-1, 'Auf Standardeinstellungen zurücksetzen') $b10 = GUICtrlCreateButton ('', 240, 490, 32, 32, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 5) GUICtrlSetTip(-1, 'Bildangaben aufnehmen') $b11 = GUICtrlCreateButton ('', 279, 490, 32, 32, $BS_ICON) GUICtrlSetImage (-1, @ScriptDir & '\wiki.dll', 6) GUICtrlSetTip(-1, 'Nach Wikipedia übertragen') _Standard() GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE;OR $b07 Exit Case $msg = $c01 Case $msg = $b01 ;_FolderMyPic() Case $msg = $b05 $aGni = $aGni + 1 If $aGni > $aGn[0] then $aGni = 1 GUICtrlSetData($eGn,$aGn[$aGni]) Case $msg = $b06 _Doublette() EndSelect Wend Func _ComboWiz($sEntry) $sMyPic = $sEntry & '|' & $sMyPic GUICtrlSetData($c01,'','') GUICtrlSetData($c01,$sMyPic, $sEntry) EndFunc Func _Doublette() $Dbl = FileOpenDialog ( 'Andere Versionen eines Bildes suchen', $sMyPic, 'Bilder (*.jpg;*.gif; *.png)', 3) If NOT @error Then $aDbl = StringSplit($Dbl,'\') $Dbl = $aDbl[$aDbl[0]] GUICtrlSetData($eAV, $Dbl) EndIf EndFunc Func _FolderMyPic() $sWahl = FileSelectFolder ( 'Ordner der hochzuladenden Bilder', '' , 7 , $sMyPic ) If NOT @error then _ComboWiz($sWahl) RunWait(@ComSpec & ' /c ' & 'dir "' & $sWahl & '\*.jpg";"' & $sWahl & '\*.gif";"' & $sWahl & '\*.png" /B > "' & @ScriptDir & '\dir.tmp"','', @SW_HIDE) $h1 = FileOpen(@ScriptDir & '\dir.tmp',0) $iMax = 0 For $i = 1 to 101 $sZeile = FileReadLine($h1, $i) If @error = -1 Then ExitLoop $iMax = $iMax + 1 $aPic[$i] = $sWahl & '\' & $sZeile $fPic[$i][0] = $sZeile $cPic = $cPic & $sZeile & '|' Next FileClose($h1) FileDelete(@ScriptDir &'\dir.tmp') $cPic = StringTrimRight($cPic, 1) $fPic[0][0] = $iMax $aPic[0] = $iMax ReDim $aPic[$iMax + 1] GUICtrlSetImage ($pic, $aPic[1]) ;GUICtrlSetData($c03,'','') Sleep(200) $y=GUICtrlSetData($c03, $cPic, $fPic[1][0]) $aSize = _XGetImageSize($aPic[1]) MsgBox(4160,'$cPic',$cPic & @CRLF & @CRLF & $y) GUICtrlSetData($c05,$aSize[0] & ' x ' & $aSize[1] & ' Px') ;GUICtrlSetData ($prg,Round((100/$aPic[0])*1)) EndFunc Func _Pic() For $i = 1 to $aPic[0] GuiCtrlCreateListViewItem($aPic[$i], $lvw) Next EndFunc Func _Standard() $sMyPic=RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders','My Pictures') GUICtrlSetData($c01,$sMyPic,$sMyPic);$b05 GUICtrlSetData($eGn,$aGn[1]) EndFunc Func _XGUICtrlComboGetCurSel($h_combobox) If IsHWnd($h_combobox) Then Local $a_ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_combobox, "int", $CB_GETCURSEL, "int", 0, "int", 0) Return $a_ret[0] Else Return GUICtrlSendMsg($h_combobox, $CB_GETCURSEL, 0, 0) EndIf EndFunc Func _XGetImageSize($file) Local $header = _XFileReadAtOffsetHEX($file, 1, 8); Get header bytes Local $ident = StringSplit("FFD8 424D 89504E470D0A1A 4749463839 4749463837 4D4D 4949", " ") Local $size = "" For $ic = 1 To $ident[0] If StringInStr($header, $ident[$ic]) = 1 Then Select Case $ic = 1; JPEG $size = _XGetJpegSize($file) Exitloop Case $ic = 2; BMP $size = _XGetSimpleSize($file, 19, 23, 0) Exitloop Case $ic = 3; PNG $size = _XGetSimpleSize($file, 19, 23, 1) Exitloop Case ($ic = 4) or ($ic = 5); GIF $size = _XGetSimpleSize($file, 7, 9, 0) Exitloop Case ($ic = 6) or ($ic = 7); TIFF $size = _XGetTIFFSize($file) Exitloop EndSelect Endif Next if not IsArray ($size) Then SetError(1) Return($size) EndFunc ;; Functions Func _XGetSimpleSize($file, $xoff, $yoff, $ByteOrder) Local $size[2] $size[0] = _Dec(_XFileReadAtOffsetHEX($file, $xoff, 2), $ByteOrder) $size[1] = _Dec(_XFileReadAtOffsetHEX($file, $yoff, 2), $ByteOrder) Return ($size) EndFunc Func _XGetJpegSize($file) Local $size[2] Local $fs, $pos = 3 $fs = FileGetSize($file) While $pos < $fs $data = _XFileReadAtOffsetHEX ($file, $pos, 4) if StringLeft($data, 2) = "FF" then; Valid segment start if StringInStr("C0 C2 CA C1 C3 C5 C6 C7 C9 CB CD CE CF", StringMid($data, 3, 2)) then; Segment with size data $seg = _XFileReadAtOffsetHEX ($file, $pos+5, 4) $size[1] = Dec(StringLeft($seg, 4)) $size[0] = Dec(StringRight($seg, 4)) Return($size) else $pos = $pos + Dec(StringRight($data, 4)) + 2 endif else exitloop endif Wend Return("") EndFunc Func _XGetTIFFSize($file) Local $pos = 3, $ByteOrder = 0, $size[2] $id = _XFileReadAtOffsetHEX ($file, 1, 2) If $id = "4D4D" then $ByteOrder = 1 $offset = _Dec(_XFileReadAtOffsetHEX($file, 5, 4), $ByteOrder) + 1 $fields = _Dec(_XFileReadAtOffsetHEX($file, $offset, 2), $ByteOrder) For $ic = 0 To $fields-1 $field = _XFileReadAtOffsetHEX($file, $offset + 2 + 12 * $ic, 12) $tag = StringLeft($field, 4) If $ByteOrder Then $tag = StringRight($tag, 2) & StringLeft($tag, 2) Select Case $tag = "0001" $size[0] = _XParseField($file, $field, $ByteOrder) Case $tag = "0101" $size[1] = _XParseField($file, $field, $ByteOrder) EndSelect Next If ($size[0] = 0) or ($size[1] = 0) Then Return("") Return($size) Endfunc ;; Parse TIFF fields Func _XParseField($file, $tag, $ByteOrder) Local $type = _Dec(StringMid($tag, 5, 4), $ByteOrder) If $type < 5 Then Return (_Dec(StringRight($tag, 8), $ByteOrder)) Local $count = _Dec(StringMid($tag, 9, 8), $ByteOrder) Local $offset = _Dec(StringRight($tag, 8), $ByteOrder) Local $tStr = _XFileReadAtOffsetHEX ($file, $offset, $count) Local $oStr = "" While StringLen($tStr) > 0 $oStr = $oStr & Chr(Dec(StringLeft($tStr, 2))) $tStr = StringTrimLeft($tStr, 2) WEnd Return($oStr) EndFunc Func _XDec($input, $ByteOrder) If $ByteOrder then Return(Dec($input)) Local $tStr = "" While StringLen($input) > 0 $tStr = $tStr & StringRight($input, 2) $input = StringTrimRight($input, 2) WEnd Return (Dec($tStr)) EndFunc Func _XFileReadAtOffsetHEX ($file, $offset, $bytes) Local $tfile = FileOpen($file, 0) Local $tstr = "" FileRead($tfile, $offset-1) For $i = $offset To $offset + $bytes - 1 $tstr = $tstr & Hex(Asc(FileRead($tfile, 1)), 2) Next FileClose($tfile) Return ($tstr) Endfunc Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
Valuater Posted December 21, 2006 Posted December 21, 2006 You have....$c02 = GUICtrlCreateLabel('Bild in Bearbeitung', 20, 75, 190, 80)Change it to....$c02 = GUICtrlCreateLabel('Bild in Bearbeitung', 20, 75, 190, 20)the label was "covering" the combo's area8)
jlorenz1 Posted December 22, 2006 Author Posted December 22, 2006 Oh, thankx.How stupid I can be? Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
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