Jump to content

poll exe for icons?


Recommended Posts

I want to type a path to exe them poll it for icons

and list them in listview..

Hard coded example below

#include <GUIConstants.au3>

$Form1 = GUICreate("EXE Icons", 138, 237, 193, 115)
$EXEPATH = GUICtrlCreateLabel("Exe Path", 8, 8, 47, 17)
; hard coded just for example
$Input1 = GUICtrlCreateInput("C:\Program Files\Internet Explorer\iexplore.exe", 8, 32, 121, 21)
$Label1 = GUICtrlCreateLabel("List of icons in exe", 8, 64, 86, 17)
$listView = GUICtrlCreateListView("Icons", 8, 88, 121, 97)
GUICtrlSetStyle( $listView , ($LVS_SMALLICON) )
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")

; Hard coded these to show what i want
$listViewItem1 = GUICtrlCreateListViewItem("0", $listView)
GUICtrlSetImage($listViewItem1, "C:\Program Files\Internet Explorer\iexplore.exe",0)
$listViewItem1 = GUICtrlCreateListViewItem("1", $listView)
GUICtrlSetImage($listViewItem1, "C:\Program Files\Internet Explorer\iexplore.exe",1)

$Show = GUICtrlCreateButton("Show Icons", 32, 200, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Show
            $path2exe = GUICtrlRead($Input1)
            ;poll the exe for icons 
            ;and add the icon and index number to listview
            
    EndSwitch
WEnd

Thanks

I know reshacker is installed but can it be used in a script ?

Edited by figgler
Link to comment
Share on other sites

I want to type a path to exe them poll it for icons

and list them in listview..

Hard coded example below

#include <GUIConstants.au3>

$Form1 = GUICreate("EXE Icons", 138, 237, 193, 115)
$EXEPATH = GUICtrlCreateLabel("Exe Path", 8, 8, 47, 17)
; hard coded just for example
$Input1 = GUICtrlCreateInput("C:\Program Files\Internet Explorer\iexplore.exe", 8, 32, 121, 21)
$Label1 = GUICtrlCreateLabel("List of icons in exe", 8, 64, 86, 17)
$listView = GUICtrlCreateListView("Icons", 8, 88, 121, 97)
GUICtrlSetStyle( $listView , ($LVS_SMALLICON) )
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")

; Hard coded these to show what i want
$listViewItem1 = GUICtrlCreateListViewItem("0", $listView)
GUICtrlSetImage($listViewItem1, "C:\Program Files\Internet Explorer\iexplore.exe",0)
$listViewItem1 = GUICtrlCreateListViewItem("1", $listView)
GUICtrlSetImage($listViewItem1, "C:\Program Files\Internet Explorer\iexplore.exe",1)

$Show = GUICtrlCreateButton("Show Icons", 32, 200, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Show
            $path2exe = GUICtrlRead($Input1)
            ;poll the exe for icons 
            ;and add the icon and index number to listview
            
    EndSwitch
WEnd

Thanks

I know reshacker is installed but can it be used in a script ?

GUICtrlSetImage ?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

IconFileScanner.au3 wont run !!

AutoIt Version: 3.2.4.9

And the script is way to complicated for me (newbie)

to extract the bits i would need ....

But thanks Holger

I need some thing like

$EXE = "C:\myprog.exe"

For each Icon in $EXE

GUICtrlCreateListViewItem("Index of icon", $listView)

GUICtrlSetImage("dont know how to declare this?", $EXE, Index of icon", )

Next

Edited by figgler
Link to comment
Share on other sites

Just take a look in my signature - "IconFileScanner".

Greets

Holger

You need to delete the incorrect Dim statements in that script Holger. Also, it appears to scans the directory for files with icons in the registry, it doesn't find the icons in the files. That would be a good addition to it.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Thank you so much

Its great if you know where to look :whistle:

Does that script use GuiCtrlSetImage by any chance? :lmao:

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...