Busti Posted July 18, 2007 Posted July 18, 2007 Heres the script, but i cant create a icon , file is there. i dont know why, please help^^ #include <IE.au3> #include <GuiConstants.au3> #include <String.au3> #include <GuiTreeView.au3> Global $PictureFolder = @ScriptDir & "\tmp" GuiCreate("* finder", 392, 312,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $aSearch = GuiCtrlCreateInput("", 4, 5, 301, 17) $gSearch = GuiCtrlCreateButton("Search", 307, 5, 82, 17) $aList = GUICtrlCreateListView("", 6, 28, 381, 279) GUICtrlSetStyle( $aList , ($LVS_ICON) ) ;GUICtrlSetStyle with the styles $LVS_ICON, $LVS_LIST or $LVS_SMALLICON. GuiSetState(@SW_SHOW) ;GUICtrlCreateListViewItem( $PictureFolder & "tmp1.JPG" , $aList ) ;GUICtrlCreateListViewItem( $PictureFolder & "tmp1.JPG" , $aList ) $test=GUICtrlCreateListViewItem( $PictureFolder & "\tmp1.JPG" , $aList ) GUICtrlSetImage( $test , $PictureFolder & "\tmp1.JPG" ) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Zedna Posted July 18, 2007 Posted July 18, 2007 Maybe try to add at least one column: $aList = GUICtrlCreateListView("column1", 6, 28, 381, 279) Resources UDF ResourcesEx UDF AutoIt Forum Search
Busti Posted July 19, 2007 Author Posted July 19, 2007 #include <IE.au3> #include <GuiConstants.au3> #include <String.au3> #include <GuiTreeView.au3> Global $PictureFolder = @ScriptDir & "\tmp" GuiCreate("foo finder", 392, 312,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $aSearch = GuiCtrlCreateInput("", 4, 5, 301, 17) $gSearch = GuiCtrlCreateButton("Search", 307, 5, 82, 17) $aList = GUICtrlCreateListView("test", 6, 28, 381, 279) GUICtrlSetStyle( $aList , ($LVS_ICON) ) ;GUICtrlSetStyle with the styles $LVS_ICON, $LVS_LIST or $LVS_SMALLICON. GuiSetState(@SW_SHOW) ;GUICtrlCreateListViewItem( $PictureFolder & "tmp1.JPG" , $aList ) ;GUICtrlCreateListViewItem( $PictureFolder & "tmp1.JPG" , $aList ) $test=GUICtrlCreateListViewItem( $PictureFolder & "\tmp1.JPG" , $aList ) GUICtrlSetImage( $test , $PictureFolder & "\tmp1.JPG" ) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit doesnt work.. My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Busti Posted July 20, 2007 Author Posted July 20, 2007 *push* My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
mikehunt114 Posted July 20, 2007 Posted July 20, 2007 What is your problem exactly? Bumping a thread where you haven't explained yourself clearly is pretty silly. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Busti Posted July 20, 2007 Author Posted July 20, 2007 (edited) he is not displaying an icon -.-^^ only the text Edited July 20, 2007 by Busti My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
mikehunt114 Posted July 20, 2007 Posted July 20, 2007 I'm feeling a lack of effort here.... #include <GuiConstants.au3> Opt("GUIOnEventMode", 1) $myGUI = GUICreate("Example", 400, 250) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") $listView = GUICtrlCreateListView("", 10, 10, 300, 200, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_SMALLICON)) $listViewItem = GUICtrlCreateListViewItem("Hurrah", $listView) GUICtrlSetImage($listView, "shell32.dll", 22) GuiSetState() While 1 Sleep(10) WEnd Func Quit() Exit 0 EndFunc IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Busti Posted July 20, 2007 Author Posted July 20, 2007 ok,this is what i want : #include <GuiConstants.au3> Opt("GUIOnEventMode", 1) $myGUI = GUICreate("Example", 400, 250) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") $listView = GUICtrlCreateListView("erg", 10, 10, 300, 200) GUICtrlSetStyle( $listView , ($LVS_ICON) ) $listViewItem = GUICtrlCreateListViewItem("Hurrah", $listView) GUICtrlSetImage($listView, "shell32.dll", 22) GuiSetState() While 1 Sleep(10) WEnd Func Quit() Exit 0 EndFunc thx 2 mikeyhunt. How can i extract a Icon from a File ? My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
mikehunt114 Posted July 20, 2007 Posted July 20, 2007 Use a resource hacker. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Busti Posted July 20, 2007 Author Posted July 20, 2007 i want to display "mini JPEG's". The small icon of a JPEG. My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Kogmedia Posted July 20, 2007 Posted July 20, 2007 I have tried to do this before I couldn't do it and hence I don't think is possible apart from a icon, I think the closest that you can do is have a picture (gui picture object) and have it update when you click on an item in your list box. [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search
Busti Posted July 21, 2007 Author Posted July 21, 2007 so, no way? My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Sardith Posted July 21, 2007 Posted July 21, 2007 Busti, are you trying to get a icon of a file in a directory and or a icon of a running file? It's all possible, just if you can be a bit more specific. You can search and find some info on it. I've made a UDF for both of the above if thats what your interested in. [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Busti Posted July 22, 2007 Author Posted July 22, 2007 i want that the Picture will be displayed in a miniformat in the listview item, and on double click it will be resized big. the only part i need is the 1 to display them My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Sardith Posted July 22, 2007 Posted July 22, 2007 Still not sure about what you want, hope this is along the lines. Give it a run. I get the icon from a .exe in the windows folder, and then use string/array's to modify it to get a name to go after the Icon. If you want to check another file just change the path at the top of the file. What I did to create a list view of a file is. expandcollapse popup;Includes #include <GUIConstants.au3> #include <GuiListView.au3> #include <Array.au3> ;Path to the file, in which you want the icon to be displayed. $Path = "C:\WINDOWS\setdebug.exe" ;GUI creation $hGUI = GUICreate("Picture Icon", 300, 300, 100, 200, -1) ;ListView creation $PictureList = GUICtrlCreateListView("Picture name(s)", -1, -1, 300, 300, $LVS_ICON) ;GUI State GUISetState(@SW_SHOW) ;STRING MODIFICATION;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Removes the strings last three letters for name sake. $Removed = StringTrimRight($Path, 4) ;Splits the given path '\' $Name = StringSplit($Removed, '\', 1) ;Gets the max array vaule, the last '\' and what proceeds after it. $Var = _ArrayMax($Name, 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $Name[$Var] ;Create item for the listView $Item = GUICtrlCreateListViewItem($Name[$Var], $PictureList) GUICtrlSetImage($Item, $Path, 0, 1); Sets Icon, for a specific file in the listview. Do $Msg = GUIGetMsg () Until $Msg = $GUI_EVENT_CLOSE [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Busti Posted July 23, 2007 Author Posted July 23, 2007 if you open a JPEG, its big and you can view it in a editor, i want to see a minisize in the listview, to see what picture will come if i open it. lal, how should i explane it ? My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Sardith Posted July 23, 2007 Posted July 23, 2007 (edited) Yeah I understand what your looking for now. I'll look in to it; I have my doubts but we'll see. Edited July 23, 2007 by Sardith [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
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