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
TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko [FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : AIDERE : AIDE par Nico26000
Cliquez pour lire la suite par Nico26000 RE : AIDERE : AIDE par WorldDMT
Cliquez pour lire la suite par WorldDMT AIDEAIDE par Nico26000
Cliquez pour lire la suite par Nico26000
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|