Accueil > > > COMMENT FAIRE UN INSTALLATEUR EN SCRIPTING? :D
COMMENT FAIRE UN INSTALLATEUR EN SCRIPTING? :D
Information sur la source
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!
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
L'INTERFACE NATURELLE DE WINDOWS PHONE 7 SERIESL'INTERFACE NATURELLE DE WINDOWS PHONE 7 SERIES par odewit
La tendance est aux interfaces naturelles (NUI), et le keynote de Bill Buxton au MIX l'a bien souligné.
La charte graphique et ergonomique de Windows Phone 7 a donc été entièrement repensée en vue d'obtenir un maximum d'efficacité sur ce point. En re...
Cliquez pour lire la suite de l'article par odewit COMMENT MAPPER UNE VUE SQL SUR UNE COLLECTION DE COMPLEX TYPE?COMMENT MAPPER UNE VUE SQL SUR UNE COLLECTION DE COMPLEX TYPE? par Matthieu MEZIL
Avec EF, les vues doivent être mappées sur des entity types. Le problème c'est que les entity types doivent avoir une clé. Avec EF, nous avons les complex type qui n'ont pas de clé mais les vues ne peuvent pas être mappées dessus. Avec EF4, il est possibl...
Cliquez pour lire la suite de l'article par Matthieu MEZIL [WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL?[WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL? par JeremyJeanson
Certain d'entre vous on peut être vécu cette situation embarrassante après quelques temps passer avec WF4 : Au début avec mon " ActivityDesigner" , tout allait bien. Et puis un jour j'ai au des problèmes de " Binding" . Alors nous sommes allé sur le site ...
Cliquez pour lire la suite de l'article par JeremyJeanson
Logiciels
Academy System (10.9.4.0)ACADEMY SYSTEM (10.9.4.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Xilisoft Convertisseur Vidéo Ultimate (5.1.39.0305)XILISOFT CONVERTISSEUR VIDéO ULTIMATE (5.1.39.0305)Xilisoft Convertisseur Vidéo Ultimate est un outil puissant de conversion vidéo, facile à utilise... Cliquez pour télécharger Xilisoft Convertisseur Vidéo Ultimate Xilisoft DVD Ripper Ultimate (5.0.64.0304)XILISOFT DVD RIPPER ULTIMATE (5.0.64.0304)Xilisoft DVD Ripper Ultimate est un logiciel excellent pour copier et convertir DVD vers presque ... Cliquez pour télécharger Xilisoft DVD Ripper Ultimate Rigs of Rods (63.3)RIGS OF RODS (63.3)c'est un jeu de multi-simulation camions,autobus voitures, avions, bateaux, hélicoptère avec défo... Cliquez pour télécharger Rigs of Rods
|