Accueil > > > DIALOG DE COULEURS :|
DIALOG DE COULEURS :|
Information sur la source
Description
Mon code sert à configurer ses couleurs.. le titre en dit assez
Source
- dialog colors {
- title "Colors par Mrud"
- size -1 -1 142 164
- option dbu
- text "Fond du text:", 1, 6 16 35 8
- text "Couleur du text :", 2, 6 30 43 8
- combo 3, 50 15 52 50, size drop
- combo 4, 50 29 52 50, size drop
- box "Couleur banal (chan..)", 5, 2 2 138 46
- check "Gras", 6, 104 16 24 8
- check "Souligné", 7, 104 32 32 8
- button "ok", 8, 32 148 25 10
- button "no", 9, 84 148 25 10, cancel
- box "Options 1ere lettre (Privé..)", 10, 2 50 138 44
- check "Gras", 11, 105 78 22 10
- check "Souligné", 12, 73 78 30 10
- check "Majuscule", 13, 14 78 34 10
- combo 14, 33 63 52 50, size drop
- text "Couleur :", 15, 6 64 25 8
- combo 17, 86 63 52 50, size drop
- check "rand", 18, 49 78 22 10
- check "", 19, 132 6 7 8
- check "", 20, 132 54 7 8
- box "Restant du text (Privé..)", 21, 2 96 138 46
- check "Souligné", 22, 106 125 32 10
- check "Gras", 23, 106 109 24 10
- combo 24, 52 123 52 50, size drop
- combo 25, 52 109 52 50, size drop
- text "Fond du text:", 26, 8 110 35 8
- text "Couleur du text :", 27, 8 124 43 8
- check "Maj 1er L", 16, 104 24 34 8
- }
- on 1:dialog:colors:*:*: {
- if ($devent = init) {
- var %i 1, %cool blanc,noir,bleu-foncé,vert-foncé,rouge,marron,violet,orange,jaune,vert-clair,cyan,bleu-clair,bleu,rose,gris-foncé,gris-clair
- while (%i <= 16) { did -i colors 3,4,14,17,24,25 %i $calc(%i -1) - $gettok(%cool,%i,44) | inc %i }
- if (!%mgs2) { did -b colors 1,2,3,4,6,7,16 } | if ($gettok(%mgs2,$matchtok(%mgs2,,1,46),46)) { did -c colors 19 } | if ($matchtok(%mgs2,,1,46)) { did -c colors 6 } | if ($matchtok(%mgs2,,1,46)) { did -c colors 7 } | if ($gettok(%mgs2,$findtok(%mgs2,1,1,46),46)) { did -c colors 16 } | did -c colors 4 $calc($remove($gettok($matchtok(%mgs2,,1,46),1,44),$left($gettok($matchtok(%mgs2,,1,46),1,44),1)) +1) | did -c colors 3 $calc($gettok($matchtok(%mgs2,,1,46),2,44) +1)
- if (%randomz1) || (%randomz2) { did -c colors 18 | did -c colors 17 $calc(%randomz2 +1) } | if (%caouleur1) { did -c colors 20 | did -c colors 14 $calc($remove($gettok(%caouleur1,1,44),$left($gettok(%caouleur1,1,44),1)) +1) | did -c colors 25 $calc($gettok(%caouleur1,2,44) +1) }
- if (%caouleur2) { did -c colors 24 $calc($remove($gettok(%caouleur2,1,44),$left($gettok(%caouleur2,1,44),1)) +1) } | if (!%caouleur1) && (!%caouleur2) && (!%randomz1) && (!%randomz2) { did -b colors 10,11,12,13,14,15,17,18,22,23,24,25,26,27 } | if (!%randomz1) && (!%randomz2) { did -b colors 17 }
- if ($gettok(%smgs,$findtok(%smgs,,1,46),46)) { did -c colors 23 } | if ($gettok(%smgs,$findtok(%smgs,,1,46),46)) { did -c colors 22 } | if ($gettok(%mgs,$findtok(%mgs,1,1,46),46)) { did -c colors 13 } | if ($gettok(%mgs,$findtok(%mgs,,1,46),46)) { did -c colors 11 } | if ($gettok(%mgs,$findtok(%mgs,,1,46),46)) { did -c colors 12 }
- }
- if ($devent = sclick) {
- if ($did = 20) && (!$did(20).state) { did -b colors 10,11,12,13,14,15,17,18,22,23,24,25,26,27 }
- if ($did = 20) && ($did(20).state) { did -e colors 10,11,12,13,14,15,18,22,23,24,25,26,27 }
- if ($did = 19) && (!$did(19).state) { did -b colors 1,2,3,4,6,7,16 }
- if ($did = 19) && ($did(19).state) { did -e colors 1,2,3,4,6,7,16 }
- if ($did = 18) && (!$did(18).state) { did -b colors 17 }
- if ($did = 18) && ($did(18).state) { did -e colors 17 }
- if ($did = 8) {
- $iif(!$did(6).state || !$did(19).state,set %mgs2 $remtok(%mgs2,,1,46),set %mgs2 $addtok(%mgs2,,46)) | $iif(!$did(7).state || !$did(19).state,set %mgs2 $remtok(%mgs2,,1,46),set %mgs2 $addtok(%mgs2,,46)) | $iif(!$did(19).state,unset %mgs2,$iif(!%mgs2,set %mgs2 $addtok(%mgs2,$+(,$calc($did(4).sel -1),$chr(44),$calc($did(3).sel -1)),46),set %mgs2 $puttok(%mgs2,$+(,$calc($did(4).sel -1),$chr(44),$calc($did(3).sel -1)),$findtok(%mgs2,$matchtok(%mgs2,,1,46),1,46),46)))
- set %caouleur1 $+ $calc($did(14).sel -1) $+ , $+ $calc($did(25).sel -1) | set %caouleur2 $+ $calc($did(24).sel -1) $+ , $+ $calc($did(25).sel -1)
- if ($did(18).state) { set %randomz1 $calc($did(14).sel -1) | set %randomz2 $calc($did(17).sel -1) } | if (!$did(18).state) { unset %randomz1 %randomz2 } | $iif(!$did(16).state || !$did(19).state,set %mgs2 $remtok(%mgs2,1,1,46),set %mgs2 $addtok(%mgs2,1,46))
- $iif(!$did(22).state,set %smgs $remtok(%smgs,,1,46),set %smgs $addtok(%smgs,,46)) | $iif(!$did(23).state,set %smgs $remtok(%smgs,,1,46),set %smgs $addtok(%smgs,,46)) | $iif(!$did(13).state,set %mgs $remtok(%mgs,1,1,46),set %mgs $addtok(%mgs,1,46)) | $iif(!$did(11).state,set %mgs $remtok(%mgs,,1,46),set %mgs $addtok(%mgs,,46)) | $iif(!$did(12).state,set %mgs $remtok(%mgs,,1,46),set %mgs $addtok(%mgs,,46)) | if (!$did(20).state) { unset %caouleur1 %caouleur2 %randomz1 %randomz2 %mgs %smgs }
- dialog -x colors
- }
- }
- }
- on 1:input:*:{
- if (/ == $left($1,1)) { return }
- if ($left($active,2) = #!) { say $matchtok(%mgs2,,1,46) $+ $matchtok(%mgs2,,1,46) $+ $matchtok(%mgs2,,1,46) $+ $iif(!$gettok(%mgs2,$findtok(%mgs2,1,1,46),46),$left($1-,1),$upper($left($1-,1))) $+ $mid($1-,2) }
- if ($left($active,2) != #!) { say $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $+ $instok($iif(%randomz1 && %randomz2,$iif($rand(1,2) = 1,%randomz1,%randomz2),$gettok(%caouleur1,1,44)),$gettok(%caouleur2,2,44),2,44) $+ $iif(!$gettok(%mgs,$findtok(%mgs,1,1,46),46),$left($1-,1),$upper($left($1-,1))) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ %caouleur2 $+ $gettok(%smgs,$findtok(%smgs,,1,46),46) $+ $gettok(%smgs,$findtok(%smgs,,1,46),46) $+ $mid($1-,2) }
- }
dialog colors {
title "Colors par Mrud"
size -1 -1 142 164
option dbu
text "Fond du text:", 1, 6 16 35 8
text "Couleur du text :", 2, 6 30 43 8
combo 3, 50 15 52 50, size drop
combo 4, 50 29 52 50, size drop
box "Couleur banal (chan..)", 5, 2 2 138 46
check "Gras", 6, 104 16 24 8
check "Souligné", 7, 104 32 32 8
button "ok", 8, 32 148 25 10
button "no", 9, 84 148 25 10, cancel
box "Options 1ere lettre (Privé..)", 10, 2 50 138 44
check "Gras", 11, 105 78 22 10
check "Souligné", 12, 73 78 30 10
check "Majuscule", 13, 14 78 34 10
combo 14, 33 63 52 50, size drop
text "Couleur :", 15, 6 64 25 8
combo 17, 86 63 52 50, size drop
check "rand", 18, 49 78 22 10
check "", 19, 132 6 7 8
check "", 20, 132 54 7 8
box "Restant du text (Privé..)", 21, 2 96 138 46
check "Souligné", 22, 106 125 32 10
check "Gras", 23, 106 109 24 10
combo 24, 52 123 52 50, size drop
combo 25, 52 109 52 50, size drop
text "Fond du text:", 26, 8 110 35 8
text "Couleur du text :", 27, 8 124 43 8
check "Maj 1er L", 16, 104 24 34 8
}
on 1:dialog:colors:*:*: {
if ($devent = init) {
var %i 1, %cool blanc,noir,bleu-foncé,vert-foncé,rouge,marron,violet,orange,jaune,vert-clair,cyan,bleu-clair,bleu,rose,gris-foncé,gris-clair
while (%i <= 16) { did -i colors 3,4,14,17,24,25 %i $calc(%i -1) - $gettok(%cool,%i,44) | inc %i }
if (!%mgs2) { did -b colors 1,2,3,4,6,7,16 } | if ($gettok(%mgs2,$matchtok(%mgs2,,1,46),46)) { did -c colors 19 } | if ($matchtok(%mgs2,,1,46)) { did -c colors 6 } | if ($matchtok(%mgs2,,1,46)) { did -c colors 7 } | if ($gettok(%mgs2,$findtok(%mgs2,1,1,46),46)) { did -c colors 16 } | did -c colors 4 $calc($remove($gettok($matchtok(%mgs2,,1,46),1,44),$left($gettok($matchtok(%mgs2,,1,46),1,44),1)) +1) | did -c colors 3 $calc($gettok($matchtok(%mgs2,,1,46),2,44) +1)
if (%randomz1) || (%randomz2) { did -c colors 18 | did -c colors 17 $calc(%randomz2 +1) } | if (%caouleur1) { did -c colors 20 | did -c colors 14 $calc($remove($gettok(%caouleur1,1,44),$left($gettok(%caouleur1,1,44),1)) +1) | did -c colors 25 $calc($gettok(%caouleur1,2,44) +1) }
if (%caouleur2) { did -c colors 24 $calc($remove($gettok(%caouleur2,1,44),$left($gettok(%caouleur2,1,44),1)) +1) } | if (!%caouleur1) && (!%caouleur2) && (!%randomz1) && (!%randomz2) { did -b colors 10,11,12,13,14,15,17,18,22,23,24,25,26,27 } | if (!%randomz1) && (!%randomz2) { did -b colors 17 }
if ($gettok(%smgs,$findtok(%smgs,,1,46),46)) { did -c colors 23 } | if ($gettok(%smgs,$findtok(%smgs,,1,46),46)) { did -c colors 22 } | if ($gettok(%mgs,$findtok(%mgs,1,1,46),46)) { did -c colors 13 } | if ($gettok(%mgs,$findtok(%mgs,,1,46),46)) { did -c colors 11 } | if ($gettok(%mgs,$findtok(%mgs,,1,46),46)) { did -c colors 12 }
}
if ($devent = sclick) {
if ($did = 20) && (!$did(20).state) { did -b colors 10,11,12,13,14,15,17,18,22,23,24,25,26,27 }
if ($did = 20) && ($did(20).state) { did -e colors 10,11,12,13,14,15,18,22,23,24,25,26,27 }
if ($did = 19) && (!$did(19).state) { did -b colors 1,2,3,4,6,7,16 }
if ($did = 19) && ($did(19).state) { did -e colors 1,2,3,4,6,7,16 }
if ($did = 18) && (!$did(18).state) { did -b colors 17 }
if ($did = 18) && ($did(18).state) { did -e colors 17 }
if ($did = 8) {
$iif(!$did(6).state || !$did(19).state,set %mgs2 $remtok(%mgs2,,1,46),set %mgs2 $addtok(%mgs2,,46)) | $iif(!$did(7).state || !$did(19).state,set %mgs2 $remtok(%mgs2,,1,46),set %mgs2 $addtok(%mgs2,,46)) | $iif(!$did(19).state,unset %mgs2,$iif(!%mgs2,set %mgs2 $addtok(%mgs2,$+(,$calc($did(4).sel -1),$chr(44),$calc($did(3).sel -1)),46),set %mgs2 $puttok(%mgs2,$+(,$calc($did(4).sel -1),$chr(44),$calc($did(3).sel -1)),$findtok(%mgs2,$matchtok(%mgs2,,1,46),1,46),46)))
set %caouleur1 $+ $calc($did(14).sel -1) $+ , $+ $calc($did(25).sel -1) | set %caouleur2 $+ $calc($did(24).sel -1) $+ , $+ $calc($did(25).sel -1)
if ($did(18).state) { set %randomz1 $calc($did(14).sel -1) | set %randomz2 $calc($did(17).sel -1) } | if (!$did(18).state) { unset %randomz1 %randomz2 } | $iif(!$did(16).state || !$did(19).state,set %mgs2 $remtok(%mgs2,1,1,46),set %mgs2 $addtok(%mgs2,1,46))
$iif(!$did(22).state,set %smgs $remtok(%smgs,,1,46),set %smgs $addtok(%smgs,,46)) | $iif(!$did(23).state,set %smgs $remtok(%smgs,,1,46),set %smgs $addtok(%smgs,,46)) | $iif(!$did(13).state,set %mgs $remtok(%mgs,1,1,46),set %mgs $addtok(%mgs,1,46)) | $iif(!$did(11).state,set %mgs $remtok(%mgs,,1,46),set %mgs $addtok(%mgs,,46)) | $iif(!$did(12).state,set %mgs $remtok(%mgs,,1,46),set %mgs $addtok(%mgs,,46)) | if (!$did(20).state) { unset %caouleur1 %caouleur2 %randomz1 %randomz2 %mgs %smgs }
dialog -x colors
}
}
}
on 1:input:*:{
if (/ == $left($1,1)) { return }
if ($left($active,2) = #!) { say $matchtok(%mgs2,,1,46) $+ $matchtok(%mgs2,,1,46) $+ $matchtok(%mgs2,,1,46) $+ $iif(!$gettok(%mgs2,$findtok(%mgs2,1,1,46),46),$left($1-,1),$upper($left($1-,1))) $+ $mid($1-,2) }
if ($left($active,2) != #!) { say $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $+ $instok($iif(%randomz1 && %randomz2,$iif($rand(1,2) = 1,%randomz1,%randomz2),$gettok(%caouleur1,1,44)),$gettok(%caouleur2,2,44),2,44) $+ $iif(!$gettok(%mgs,$findtok(%mgs,1,1,46),46),$left($1-,1),$upper($left($1-,1))) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ $gettok(%mgs,$findtok(%mgs,,1,46),46) $+ %caouleur2 $+ $gettok(%smgs,$findtok(%smgs,,1,46),46) $+ $gettok(%smgs,$findtok(%smgs,,1,46),46) $+ $mid($1-,2) }
}
Conclusion
donc j'ai eu l'idée de coder ça a cause d'une source poser il y a pas longtemp sur le site :
http://www.ircfr.com/code.aspx?ID=27365 le 1er cmt de PaDa surtout qui ma fait un déclik Ôô Bref, j'en ai pas terminer avec ce code ^ ^
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
PRATIQUE DE SILVERLIGHT PAR ERIC AMBROSIPRATIQUE DE SILVERLIGHT PAR ERIC AMBROSI par MPOWARE
Je viens de finir la lecture du dernier livre d'
Eric Ambrosi
éditions PEARSON
Son livre donne une approche pratique de Silverlight qui sera aussi bien comprise par le développeur que par le designeur.
Tous les aspects du développement RIA sont abor...
Cliquez pour lire la suite de l'article par MPOWARE APPRENDRE à DéVELOPPER POUR LES MOBILES AVEC LA NOUVELLE GéNéRATION .NETAPPRENDRE à DéVELOPPER POUR LES MOBILES AVEC LA NOUVELLE GéNéRATION .NET par odewit
2 déclinaisons de Silverlight et 2 déclinaisons de Mono permettent dorénavant (ou permettront prochainement) de développer des applications .NET mobiles pour les principales plates-formes du marché :
Silverlight pour Symbian, basé sur Silverlight 2...
Cliquez pour lire la suite de l'article par odewit ZUNE : NOUVELLE VERSION DU ZUNE SOFTWARE - V 4.2ZUNE : NOUVELLE VERSION DU ZUNE SOFTWARE - V 4.2 par ROMELARD Fabrice
Avec la dernière génération du lecteur MP3 de Microsoft, le ZUNE HD, Microsoft a publié une nouvelle version du logiciel pour PC. Ainsi, je me suis décidé à installer celle-ci sur mon Tablet PC ACER, comme toujours le logiciel est donc tél...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice 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
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
|