Jump to content

Change Title Picture


Recommended Posts

Ah, sorry!

You want to use the script to change a icon for another program ?

Im to fresh in the scripting world to help with that.

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

Google first result:

How To Change the Application Icon with Visual Basic

http://support.microsoft.com/kb/259673/en-us?fr=1

SendMessage & WM_SETICON

As I said this example does exactly what you want, it's easy to convert that code to Autoit.

You need just WinGetHandle() + LoadIcon and SendMessage (WM_SETICON) API functions.

Search this forum for examples with these API functions.

Edited by Zedna
Link to comment
Share on other sites

bucause i don`t know how is a handle of an icon or how to get it i try to retrieve one using _sendmessage() with WM_GETICON as msg, but i don´t get anything...

#include <SendMessage.au3>
Const $WM_SETICON = 0x0080 ; http://msdn.microsoft.com/en-us/library/ms632643
Const $WM_GETICON = 0x007F ; already declared if you use WinApiEx.au3 ;P ups!
Const $ICON_BIG = 1
Const $ICON_SMALL = 0
$winhndl = WinGetHandle("[CLASS:SciTEWindow]")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $winhndl = ' & $winhndl & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
$autoiticon = _SendMessage($winhndl, $WM_GETICON, $ICON_SMALL)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $autoiticon = ' & $autoiticon & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

sorry but still don´t get it... :huh2:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "F:\Agustin\autoit\Foro Autoit\sendicon.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams    
+>01:16:06 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0C0A  Keyboard:0000040A  OS:WIN_7/  CPU:X64 OS:X64)
>Running AU3Check (1.54.19.0)  from:C:\Program Files (x86)\AutoIt3
+>01:16:06 AU3Check ended.rc:0
>Running:(3.3.6.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "F:\Agustin\autoit\Foro Autoit\sendicon.au3"    
@@ Debug(7) : $winhndl = 0x00000000001103BA
>Error code: 0
@@ Debug(9) : $autoiticon = 0
>Error code: 0
+>01:16:06 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 1.343

Also i found this but i don´t know how to implement a VB.NET native method to autoit ;)

http://msdn.microsoft.com/en-us/library/system.drawing.icon.extractassociatedicon.aspx

Edited by monoscout999
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...