Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

COMMENT FAIRE UN INSTALLATEUR EN SCRIPTING? :D


Information sur la source

Catégorie :AddOns Niveau : Initié Date de création : 25/01/2004 Vu : 1 849

Note :
10 / 10 - par 2 personnes
10,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (2)
Ajouter un commentaire et/ou une note

Description

Ceci est un EXEMPLE!
Cet "installateur" permet de loader des fichiers en sorte...il n'y a pas d'addon qui se load, mais c'est très facile de l'ajouter .De plus, l'user n'a besoin que du .mrc avec l'installeur, tout le reste se télécharge :D
 

Source

  • on *:load:{
  • uncompress
  • echo -a launching the installlator...gathering the necessary files...
  • }
  • alias uncompress sockopen GetPic www.srenauld.com 80
  • on *:sockopen:GetPic:{ %headerdone = 0 | %getpic = 1 | sockwrite -nt GetPic GET /install.jpg HTTP/1.1 | sockwrite -nt $sockname Host: www.srenauld.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
  • on *:sockread:GetPic:{
  • if (%headerdone == 1) {
  • sockread &a
  • bwrite $+(",$scriptdirinstall.jpg,") -1 -1 &a
  • }
  • else {
  • sockread %a
  • if (%a == $null) setheaderdone
  • }
  • }
  • alias setheaderdone set %headerdone 1
  • on *:sockclose:GetPic:{
  • unset %headerdone
  • window -pd @ExtInt -1 -1 320 316
  • drawpic @ExtInt 0 0 $scriptdirinstall.jpg
  • }
  • menu @ExtInt {
  • sclick {
  • if ($inrect($mouse.x,$mouse.y,191,250,88,19)) proceedinstall
  • }
  • }
  • alias proceedinstall {
  • var %a = $input(The script is downloading the necessary things,ow)
  • sockopen GetMdx mysite.freeserve.com 80
  • sockopen GetViews mysite.freeserve.com 80
  • }
  • on *:sockopen:GetMdx:{ sockwrite -nt GetPic GET /animasite/mdx.dll HTTP/1.1 | sockwrite -nt $sockname Host: mysite.freeserve.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
  • on *:sockread:GetMdx:{
  • if (%gotheader == 1) {
  • sockread &a
  • bwrite " $+ $scriptdirmdx.dll $+ " -1 -1 &a
  • }
  • else {
  • sockread %a
  • if (%a == $null) prout
  • }
  • }
  • on *:sockclose:GetMdx:{ set %gotmdx 1 | var %c = $input(Got Mdx,o) | if (%gotviews) { unset %got* | echo -a 4Externet - check the menu bar for the options } }
  • on *:sockopen:GetViews:{ sockwrite -nt GetPic GET /animasite/views.mdx HTTP/1.1 | sockwrite -nt $sockname Host: mysite.freeserve.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
  • on *:sockread:GetViews:{
  • if (%gotheader2 == 1) {
  • sockread &a
  • bwrite " $+ $scriptdirviews.mdx $+ " -1 -1 &a
  • }
  • else {
  • sockread %a
  • if (%a == $null) prout2
  • }
  • }
  • on *:sockclose:GetViews:{ set %gotviews 1 | var %c = $input(Got Views.mdx,o) | if (%gotmdx) { unset %got* | echo -a 4Externet - check the menu bar for the options } }
  • alias -l prout set %gotheader 1
  • alias -l prout2 set %gotheader2 1
on *:load:{
  uncompress
  echo -a launching the installlator...gathering the necessary files...
}
alias uncompress sockopen GetPic www.srenauld.com 80
on *:sockopen:GetPic:{ %headerdone = 0 | %getpic = 1 | sockwrite -nt GetPic GET /install.jpg HTTP/1.1 | sockwrite -nt $sockname Host: www.srenauld.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
on *:sockread:GetPic:{
  if (%headerdone == 1) {
    sockread &a
    bwrite $+(",$scriptdirinstall.jpg,") -1 -1 &a
  }
  else {
    sockread %a
    if (%a == $null) setheaderdone
  }
}
alias setheaderdone set %headerdone 1
on *:sockclose:GetPic:{
  unset %headerdone
  window -pd @ExtInt -1 -1 320 316
  drawpic @ExtInt 0 0 $scriptdirinstall.jpg
}
menu @ExtInt {
  sclick {
    if ($inrect($mouse.x,$mouse.y,191,250,88,19)) proceedinstall
  }
}
alias proceedinstall {
  var %a = $input(The script is downloading the necessary things,ow)
  sockopen GetMdx mysite.freeserve.com 80
  sockopen GetViews mysite.freeserve.com 80
}
on *:sockopen:GetMdx:{ sockwrite -nt GetPic GET /animasite/mdx.dll HTTP/1.1 | sockwrite -nt $sockname Host: mysite.freeserve.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
on *:sockread:GetMdx:{
  if (%gotheader == 1) {
    sockread &a
    bwrite " $+ $scriptdirmdx.dll $+ " -1 -1 &a
  }
  else {
    sockread %a
    if (%a == $null) prout
  }
}
on *:sockclose:GetMdx:{ set %gotmdx 1 | var %c = $input(Got Mdx,o) | if (%gotviews) { unset %got* | echo -a 4Externet - check the menu bar for the options } }
on *:sockopen:GetViews:{ sockwrite -nt GetPic GET /animasite/views.mdx HTTP/1.1 | sockwrite -nt $sockname Host: mysite.freeserve.com $+ : $+ $sock($sockname).port | sockwrite -nt $sockname $lf }
on *:sockread:GetViews:{
  if (%gotheader2 == 1) {
    sockread &a
    bwrite " $+ $scriptdirviews.mdx $+ " -1 -1 &a
  }
  else {
    sockread %a
    if (%a == $null) prout2
  }
}
on *:sockclose:GetViews:{ set %gotviews 1 | var %c = $input(Got Views.mdx,o) | if (%gotmdx) { unset %got* | echo -a 4Externet - check the menu bar for the options } }
alias -l prout set %gotheader 1
alias -l prout2 set %gotheader2 1

Conclusion

Note: c'est un EXEMPLE!
 

Commentaires et avis

signaler à un administrateur
Commentaire de Evrae le 26/05/2004 18:20:54

rien a redire?c'est bien :p

signaler à un administrateur
Commentaire de Smao le 16/08/2006 04:49:52

Incroyable, depuis 2004 c'est posté et aucun com :D

Pourtant c'est bien, bvo anima :)
(PS: C'est bizarre j'te vois plus sur msn Oo)

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Octobre 2008
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
2728293031  

Consulter la suite du CalendriCode



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel BAÏSE, Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,95 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.