| [Script] Changer l'icone de l'exe de GM IG | |
|
|
| Auteur | Message |
|---|
PhoenixD Utilisateur confirmé: Rang *

Inscrit le : 22 Aoû 2006 Messages : 283 Localisation : Bonne question! : ────────── : Projet Actuel : Kingdom Hearts :: Animaniac Avancement :
   (30/100)
| Sujet: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 21:15 | |
| Ma passion c'est me ballader sur les forums de GameMaker pour vous trouver des scripts intéréssants. YA-HA
Script par Christian
| Code: | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> Creator: Christian // -> Version: 4 // -> CT/TechID: 72 // -> Description: Change a GM exe's icon with one from a file. Please read the // warnings below carefully. // -> Table of contents: General info, usage info, precautions, error codes, credits, licence agreement. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> Usage: // argument0 - [STRING] Exe path // argument1 - [STRING] Ico path // argument2 - [BOOL] true=Slower/full error detect // false=Fast/no error detect // returns - [REAL] 1 = success or negative number = fail // check below for error codes // -> Example: exe_ch_ico("myapp.exe","myicon.ico",true) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> Precautions: // The icon file must contain one 32*32 icon. [if not, when argument2 is false, it is detected] // The script may handle true color icons. // WARNING MAY NOT WORK WITH EXE's NOT MADE WITH GAMEMAKER6 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> ERROR CODES // Errors are detectable by reading the resulting number given by this script. Errors always // return a negative number while when the script is successfull it returns 1. // The error code consists of two digits, the first telling were the error occured and the second // why it occured. Example -10 means it has something to do with the icon (1) and the file wasn't // found (0). When the first digit is 1 it is about the icon, 2 about the executable and 3 generic error. // Full error code List: // -10 icon file not found // -11 invalid ico file // -12 more then one icon or none // -13 icon is smaller then 32*32 // -14 icon is larger then 32*32 // -15 unknown cause // -20 exe file not found /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> Special thanks to: // TGMG - Gave the exact exe co-ords (even though i found them before him but // he confirmed them) // Sindarin - Some generic help with GM executables and icons // cdm319 - Offered help by looking/finding resources // Vladimir - Original c/c++ code for changing the icons using UpdateResource /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -> Usage Licence Agreement // This agreement gives you the permition to use this script in any way you want. // Christian Sciberras or Covac Software are not to be held responsible for // malfunctions and/or data loses of this script. // Credit to the creator (or Covac Software) is not to be ommited. // In the case that this script is to be redistributed, it is necessary that this agreement // is distributed with it. // Termination // If you disagree with any of these terms please remove and do not use this or // copies of this script. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// var ff1,ff2,buf,nm,sig; if file_exists(argument0)=false then return -20 if file_exists(argument1)=false then return -10 ff2=file_bin_open(argument0,2) ff1=file_bin_open(argument1,0) if argument2=true { sig='' repeat(8){sig+=string(file_bin_read_byte(ff1))} file_bin_seek(ff1,0) if !(sig='0010103232') { if string_copy(sig,0,4)!='0010' {return -11} if string_copy(sig,5,2)!='10' {return -12} if real(string_copy(sig,7,2))+real(string_copy(sig,9,2))<=63 {return -13} if real(string_copy(sig,7,2))+real(string_copy(sig,9,2))>=65 {return -14} return -15 } } buf='' file_bin_seek(ff1,22) do { file_bin_seek(ff1,file_bin_position(ff1)) buf+=chr(file_bin_read_byte(ff1)) } until (file_bin_position(ff1)=file_bin_size(ff1)) nm=1 do { if string_length(buf)>=4265 then buf=string_copy(buf,0,4264) if string_length(buf)<=4263 then buf+=chr(255) } until (string_length(buf)=4264) file_bin_seek(ff2,486668) repeat (string_length(buf)) {file_bin_write_byte(ff2,ord(string_char_at(buf,nm))) file_bin_seek(ff2,file_bin_position(ff2)) nm+=1} return 1
|
Dernière édition par le Mer 31 Oct - 23:32, édité 1 fois |
|
 | |
M@d_Doc Modérateur 'Programmation'

Age : 18 Inscrit le : 12 Fév 2005 Messages : 3942 Localisation : 47°44'8.04 : ────────── : Projet Actuel : trouver un contrat Avancement :
  (100/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 22:06 | |
| impressionant celui là! Voilà qui peut être... euh... utile ^^ _________________ Click for a free cookie |
|
 | |
shm31 *Excellent utilisateur*

Age : 16 Inscrit le : 16 Jan 2006 Messages : 8410 Localisation : 2 bad for u m8 : ────────── : Projet Actuel : warhammer Avancement :
   (14/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 22:18 | |
| p***** comment a t'il chopé l'adresse hexa de l'icone 
mais je trouve que ça peut etre utile pour les maker-makers _________________ Rambotioner : Night of the living abla : DONE I am an in the GM Quiz! |
|
 | |
Ragdoll *Excellent utilisateur*

Age : 16 Inscrit le : 02 Juil 2005 Messages : 4909 Localisation : entre mon pc et mon baton du diable : ────────── : Projet Actuel : Hard pac III Avancement :
   (1/100)
| |
 | |
M@d_Doc Modérateur 'Programmation'

Age : 18 Inscrit le : 12 Fév 2005 Messages : 3942 Localisation : 47°44'8.04 : ────────── : Projet Actuel : trouver un contrat Avancement :
  (100/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 22:59 | |
| là c'est pour changer ingame ^^ _________________ Click for a free cookie |
|
 | |
Nic353 Utilisateur confirmé: Rang ****

Age : 17 Inscrit le : 08 Fév 2006 Messages : 840 Localisation : Je suis partout : ────────── : Projet Actuel : 2Day of Defeat Avancement :
   (21/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 23:31 | |
| Il y a ressource hacker sinon;p _________________
 |
|
 | |
PhoenixD Utilisateur confirmé: Rang *

Inscrit le : 22 Aoû 2006 Messages : 283 Localisation : Bonne question! : ────────── : Projet Actuel : Kingdom Hearts :: Animaniac Avancement :
   (30/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 23:32 | |
| Na c'est pour changer pendant le jeu pas avant  |
|
 | |
Pepsy Utilisateur confirmé: Rang ***

Age : 16 Inscrit le : 28 Fév 2007 Messages : 542 Localisation : Devant mon ordinateur à écrire des lignes de codes : ────────── : Projet Actuel : RPG Avancement :
   (2/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mer 31 Oct - 23:47 | |
| | PhoenixD a écrit: | Na c'est pour changer pendant le jeu pas avant  |
Ni apres
Mais c vrai que c vraiment impressionant _________________
 |
|
 | |
Topaze22 *Excellent utilisateur*

Age : 22 Inscrit le : 22 Déc 2006 Messages : 3977 Localisation : Pas loin de Playboy et Bubu : ────────── : Projet Actuel : Paper Mario (intermédiaire) Avancement :
  (100/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Jeu 1 Nov - 13:31 | |
| | M@d_Doc a écrit: | | là c'est pour changer ingame ^^ |
Costaud le gard _________________
 |
|
 | |
edi9999 Utilisateur confirmé: Rang *****

Age : 16 Inscrit le : 27 Jan 2006 Messages : 2158 Localisation : partout et nulle part : ────────── : Projet Actuel : un mario rigolo et theatre flashy Avancement :
   (25/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Jeu 1 Nov - 13:36 | |
| Super le script ca fait qu on peut changer l icone si on a finit le jeu par exemple Bien joué  _________________ I am an in the GM Quiz!
tuto gamemaker integral disponible sur mon site: http://gameplay.c.la Uploadez vos exemples, images, zip ou rar et ne faites pas attendre les personnes qui telechargent grace a Ceci |
|
 | |
master47 Utilisateur confirmé: Rang *****

Age : 16 Inscrit le : 16 Nov 2006 Messages : 1577 Localisation : Bruxelles, Belgique @ Louise Gallery : ────────── : Projet Actuel : PacWars Avancement :
   (35/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Dim 4 Nov - 19:16 | |
| il a chopé l'adresse binaire de l'ico, astucieux...  _________________
| Spoiler: | | | Hahaha tu pensais que ça allait être interessant ?? bah nan t'as perdu ton temps pour rien |
 |
|
 | |
daminetreg - Administrateur -

Age : 18 Inscrit le : 11 Fév 2005 Messages : 16209 Localisation : Siege du CBNA! : ────────── : Projet Actuel : Game Maker Human Input Avancement :
   (60/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Lun 5 Nov - 9:47 | |
| C'est pas mal, et toujours intéressant les petits scripts comme ça.  _________________
 Mon CV
Tous Ensemble! Réalisons! I want (and I need) to show you my work, but the time is against me. |
|
 | |
Christia Invité
| Sujet: re: Sam 17 Nov - 18:34 | |
| | Merci! |
|
 | |
[TheDarkTiger] Modérateur 'Programmation'

Age : 21 Inscrit le : 08 Juin 2005 Messages : 5452 Localisation : Essonne : ────────── : Avancement :
  (0/100)
| |
 | |
Death_egg Utilisateur confirmé: Rang *****

Age : 14 Inscrit le : 28 Juin 2007 Messages : 2985 Localisation : undefined : ────────── : Projet Actuel : ChuChu Rocket for Windows Avancement :
   (45/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Lun 19 Nov - 22:20 | |
| Woaw, ca c'est du script  Mais l'icone ne redevient-elle pas normale une fois le jeu fermé? Si on, ca pourrait être trés interessant pour mon Corbeille 2.0, avec l'icône qui change à chaque niveau de bonus débloqué  _________________

 |
|
 | |
limiri1 Plutôt bien

Age : 16 Inscrit le : 03 Sep 2006 Messages : 42 Localisation : Devant l'ordi generalement ! ^^ : ────────── : Avancement :
  (0/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Mar 18 Déc - 11:05 | |
| Désolé mais j'ai pas bien compris le script... quelqu'un peut m'expliquer svp ? ça m'a l'air utile...
Merci !  _________________ Petit débutant qui débute en Game Maker qui trouve ce logiciel vraiment pratique mais à toujours des petits problèmes... 
LA FRANCE C'EST LE + BEAUX PAYS DU MONDE ! |
|
 | |
gosc Utilisateur confirmé: Rang ****

Age : 13 Inscrit le : 09 Fév 2008 Messages : 811 Localisation : juste devant ton nez, prêt à te manger : ────────── : Projet Actuel : Fantomeuh ! Avancement :
   (55/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Dim 24 Aoû - 20:20 | |
| cool 
c'est quoi le nom a donner au script ? car sinon je ne peux pas l'utiliser ...
merci  _________________ chien bouffer par un chat ici
bonne chance pour la continuation de ton projet Topaze

| Spoiler: | | |  |
Dernière édition par gosc le Dim 24 Aoû - 20:26, édité 1 fois |
|
 | |
shm31 *Excellent utilisateur*

Age : 16 Inscrit le : 16 Jan 2006 Messages : 8410 Localisation : 2 bad for u m8 : ────────── : Projet Actuel : warhammer Avancement :
   (14/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Dim 24 Aoû - 20:23 | |
|
fake pourri. _________________ Rambotioner : Night of the living abla : DONE I am an in the GM Quiz! |
|
 | |
edi9999 Utilisateur confirmé: Rang *****

Age : 16 Inscrit le : 27 Jan 2006 Messages : 2158 Localisation : partout et nulle part : ────────── : Projet Actuel : un mario rigolo et theatre flashy Avancement :
   (25/100)
| Sujet: Re: [Script] Changer l'icone de l'exe de GM IG Dim 24 Aoû - 20:27 | |
| | Death_egg a écrit: | Woaw, ca c'est du script  Mais l'icone ne redevient-elle pas normale une fois le jeu fermé? Si on, ca pourrait être trés interessant pour mon Corbeille 2.0, avec l'icône qui change à chaque niveau de bonus débloqué  |
lol i'm nostalgic of Corbeille 2.0 _________________ I am an in the GM Quiz!
tuto gamemaker integral disponible sur mon site: http://gameplay.c.la Uploadez vos exemples, images, zip ou rar et ne faites pas attendre les personnes qui telechargent grace a Ceci |
|
 | |
| [Script] Changer l'icone de l'exe de GM IG | |
|