Sign in to follow this  
Followers 0
robiezhou

TaskDaemon

7 posts in this topic

Hi,

I wrote this script to daemon one or more tasks.

Any comments are welcomed and appreciated.

Robie

TaskDaemonEn.au3

Share this post


Link to post
Share on other sites



I have a question.

How to get a exe file's icon?

In this script, when create a program daemon, I want to use the same icon as the program, how to do this?

Thanks a lot

Robie

Share this post


Link to post
Share on other sites

@robiezhou, just tried your script. Very interesting. There are a lot of possiblities with it.

Regarding your question of how to get the icon from an exe I will have to look into I know that people in this forum have created such things but I will have to do a little back track research..

Cheers.. B)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Oh, my fault.... :">

You could try Irfan View , it works for me (on *.exe & *.dll files)...

Edited by dabus

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hi robiezhou,

I believe you want to get the default icon for the program you have selected to keep running? If so, see the following code:

#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 622, 448, 192, 125)
$Icon1 = GUICtrlCreateIcon("C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE", 0, 16, 16)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

As you can see, this part ("C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE", 0) contains the filename of the program and the default icon index to load.

Hope this helps

Edited by sandyd

----[ SandyD ]---

Share this post


Link to post
Share on other sites

Thank you all above. :P

@dabus

Yes, it's a good tool. It can be used to convert a file to icon file.

@sandyd

I want to get an icon file, and use this icon file to convert .au3 file to .exe file. :lmao:

Share this post


Link to post
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
Sign in to follow this  
Followers 0