Bonjour,
Voilà j'aimerais connaître votre avis sur mon infosytem, mon premier dialog (et uais je débute), puis voilà en espérant qu'il vous plaise...
/load -rs infosystem.mrc
/infosystem pour le lancer
Notez, il faut bien sur moo.dll pour pouvoir utiliser cette infosystem...
Source / Exemple :
dialog infosystem {
title "Infos Système"
size -1 -1 344 126
option dbu
text "Ce menu te permet de connaître certaines < informations > sur ton PC ", 2, 48 6 185 9, center
box "Group Box", 1, -29 -68 536 295
text "Carte Graphique", 3, 11 25 45 8, center
text "Clavier", 4, 11 38 45 8, center
text "Connection", 5, 11 51 45 8, center
text "CPU", 6, 11 64 45 8, center
text "Disque Dur", 7, 11 77 45 8, center
text "OS", 8, 179 51 45 8, center
text "Ecran", 9, 11 90 45 8, center
text "Uptime", 10, 180 90 45 8, center
text "RAM", 11, 179 64 45 8, center
text "Souris", 12, 179 77 45 8, center
text "IP", 13, 179 38 45 8, center
text "HOST", 14, 179 25 45 8, center
edit "", 15, 63 24 75 10, autohs
edit "", 17, 63 37 75 10, autohs
edit "", 18, 63 50 75 10, autohs
edit "", 19, 63 63 75 10, autohs
edit "", 20, 63 76 75 10, autohs
edit "", 21, 63 89 75 10, autohs
edit "", 22, 231 24 75 10, read autohs
edit "", 23, 231 37 75 10, read autohs
edit "", 24, 231 50 75 10, autohs
edit "", 25, 231 63 75 10, autohs
edit "", 26, 231 76 75 10, autohs
edit "", 27, 231 89 75 10, autohs
button "Tout annoncer", 16, 218 108 55 12
button "Fermer", 28, 289 108 42 12, ok
button "Say", 29, 143 25 17 10
button "Say", 30, 143 37 17 10
button "Say", 31, 143 50 17 10
button "Say", 32, 143 63 17 10
button "Say", 33, 143 76 17 10
button "Say", 34, 143 89 17 10
button "Say", 35, 311 24 17 10
button "Say", 36, 311 37 17 10
button "Say", 37, 311 89 17 10
button "Say", 38, 311 76 17 10
button "Say", 39, 311 63 17 10
button "Say", 40, 311 50 17 10
text "By NiCeOn3-_`", 41, 3 116 41 8, disable center
}
alias infosystem dialog -m infosystem infosystem
on 1:dialog:infosystem:init:0:{
did -ar infosystem 15 $dll(moo.dll,gfxinfo,_) avec une résolution de $window(-1).w x $window(-1).h
did -ar infosystem 17 $readini c:\windows\system.ini boot.description keyboard.typ
did -ar infosystem 18 $dll($mircdirmoo.dll,connection,_)
did -ar infosystem 19 $dll($mircdirmoo.dll,cpuinfo,_)
did -ar infosystem 20 $round($calc(($disk(c:).size + $disk(d:).size + $disk(e:).size + $disk(f:).size) / 1024 / 1024 / 1024),2) $+ go au total dont $round($calc(($disk(c:).free + $disk(d:).free + $disk(e:).free + $disk(f:).free) / 1024 / 1024 / 1024),2) $+ go libre(s)
did -ar infosystem 21 $dll($mircdirmoo.dll,screeninfo,_)
did -ar infosystem 22 $host
did -ar infosystem 23 $ip
did -ar infosystem 24 $dll($mircdirmoo.dll,osinfo,_)
did -ar infosystem 25 $dll($mircdirmoo.dll,meminfo,_)
did -ar infosystem 26 $readini c:\windows\system.ini boot.description mouse.drv
did -ar infosystem 27 $duration($calc($ticks / 1000))
}
alias host { /msg $active 15Host » $host }
alias ip { /msg $active 15IP » $ip }
alias os { /msg $active 15OS » $dll($mircdirmoo.dll,osinfo,_) }
alias uptime { /msg $active 15Uptime » $duration($calc($ticks / 1000)) }
alias carte { /msg $active 15CarteGrafique » $dll(moo.dll,gfxinfo,_) 15Résolution » $window(-1).w x $window(-1).h }
alias cpu { /msg $active 15CPU » $dll($mircdirmoo.dll,cpuinfo,_) }
alias RAM { /msg $active 15RAM » $dll($mircdirmoo.dll,meminfo,_) }
alias connection { /msg $active 15Connection » $dll($mircdirmoo.dll,connection,_) }
alias dd { /msg $active 15DisqueDur » $round($calc(($disk(c:).size + $disk(d:).size + $disk(e:).size + $disk(f:).size) / 1024 / 1024 / 1024),2) $+ go 15Espace libre » $round($calc(($disk(c:).free + $disk(d:).free + $disk(e:).free + $disk(f:).free) / 1024 / 1024 / 1024),2) $+ go }
alias ecran { /msg $active 15Ecran » $dll($mircdirmoo.dll,screeninfo,_) }
alias souris { msg $active 15Souris » $readini c:\windows\system.ini boot.description mouse.drv }
alias clavier { msg $active 15Clavier » $readini c:\windows\system.ini boot.description keyboard.typ }
on 1:dialog:infosystem:sclick:29 { carte }
on 1:dialog:infosystem:sclick:30 { clavier }
on 1:dialog:infosystem:sclick:31 { connection }
on 1:dialog:infosystem:sclick:32 { cpu }
on 1:dialog:infosystem:sclick:33 { dd }
on 1:dialog:infosystem:sclick:34 { ecran }
on 1:dialog:infosystem:sclick:35 { host }
on 1:dialog:infosystem:sclick:36 { ip }
on 1:dialog:infosystem:sclick:40 { os }
on 1:dialog:infosystem:sclick:39 { ram }
on 1:dialog:infosystem:sclick:38 { souris }
on 1:dialog:infosystem:sclick:37 { uptime }
alias complet {
msg $active 15CarteGrafique » $dll(moo.dll,gfxinfo,_) 15Résolution » $window(-1).w x $window(-1).h
msg $active 15Clavier » $readini c:\windows\system.ini boot.description keyboard.typ
msg $active 15Connection » $dll($mircdirmoo.dll,connection,_)
msg $active 15CPU » $dll($mircdirmoo.dll,cpuinfo,_)
msg $active 15DisqueDur » $round($calc(($disk(c:).size + $disk(d:).size + $disk(e:).size + $disk(f:).size) / 1024 / 1024 / 1024),2) $+ go 15Espace libre » $round($calc(($disk(c:).free + $disk(d:).free + $disk(e:).free + $disk(f:).free) / 1024 / 1024 / 1024),2) $+ go
msg $active 15Ecran » $dll($mircdirmoo.dll,screeninfo,_)
msg $active 15OS » $dll($mircdirmoo.dll,osinfo,_)
msg $active 15RAM » $dll($mircdirmoo.dll,meminfo,_)
msg $active 15Souris » $readini c:\windows\system.ini boot.description mouse.drv
msg $active 15Uptime » $duration($calc($ticks / 1000))
}
on 1:dialog:infosystem:sclick:16 { complet }
29 mai 2004 à 14:26
28 mai 2004 à 10:00
25 mai 2004 à 01:27
* $dll: unable to open 'E:\SCRIPT\6.14\moo.dll' (line 51, script12.ini)
* $dll: unable to open 'E:\SCRIPT\6.14\moo.dll' (line 69, script12.ini)
.....
24 mai 2004 à 22:22
sinon tu aurais pu regrouper tous les event du dialogue en un seul, c'estun commentaire assez recurent et le site regorge d'exemple
fait gaffe aussi a ton msg $active, tu devrais verifier que tu es bien en privée ou sur un salon sinon tu pourrais avoir des bugs génants.
tu peux enlever les / devant les commandes ils sont inutiles.
aussi , je pense que tu pourrais avoir une façon plus astucieuse de remonter a la taille totale des disk en utilisant les tokken et une while astucieuse
%disc a:,b:,c:,d:,e:,f:,:g ...,%i 0,%taille = 0
while ($gettok(%disc,%i,44)) {
if ( $disk($ifmatch).size ) { %taille = $calc(%taille + $ifmatch ) }
inc %i
}
a la fin de cette boucle tu met %total sous le format que tu veux et tout ira bien.
sinon c'est une source deja vu et c'est dommage
certain te diront que tu devrait mettre moo.dll en zip ;)
24 mai 2004 à 22:07
C'est vrai tu tes po fais aidé
:p
7/10
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.