Comments
Join Hawkee
|
Login
Search
in
Code Snippets
Products
Reviews
Forum
Home
Platforms
Cold Fusion
CSS
Javascript
mIRC
mySQL
.NET
OpenSocial
Perl
PHP
Python
Ruby / Rails
TCL
Snippets
Cold Fusion (1)
CSS (2)
Javascript (4)
mIRC (3,543)
mySQL (1)
.NET (5)
OpenSocial (1)
Perl (7)
PHP (126)
Python (1)
Ruby / Rails (6)
TCL (16)
Products
Computers (11,347)
Electronics (7,203)
Software (1,180)
Video Games (4,108)
Reviews
Computers (6,115)
Electronics (14,509)
Software (2,578)
Video Games (7,115)
Comments
Forum
username
password
auto login
Home
>
Code Snippets
>
Pepsi_Man0077's Snippets
>
mIRC
Temperature Conversion Dialog
Please
Register
to submit score.
Average Score
6.0
Scores Submitted
1
Date Added
May 09, 2008
Last Updated
May 10, 2008
Tags
celsius
conversion
dialog
fahrenheit
temperature
Introduction
Dialog i made for Temperature conversion
ALT + R and paste in there
:D
UPDATE; May 9th 2008 - Dialog made smaller
Grab the Code
dialog Temperature { title "Temperature Conversion - By PePSiMaN" size -1 -1 232 59 option dbu box "Fahrenheit to Celsius", 1, 2 2 114 56 box "Celsius to Fahrenheit", 2, 117 2 114 56 button "Convert", 3, 4 42 109 14 button "Convert", 4, 119 42 109 14 edit "", 5, 5 12 50 10 text "Enter a Temperature", 6, 56 13 57 8, center edit "", 7, 120 12 50 10 text "Enter a Temperature", 8, 171 13 57 8, center text "", 9, 5 32 108 8, center text "", 10, 120 32 108 8, center text "", 11, 5 23 108 8, center text "", 12, 120 23 108 8, center } menu Channel,Status { Temperature Conversion: Temperature } alias Temperature { dialog -m Temperature Temperature } on *:DIALOG:Temperature:sclick:*: { if ($did == 3) { if ($did(5) = 0) { did -a Temperature 11 Converstion for $did(5) $+ °F to Celsius: did -a Temperature 9 -17.77°C } elseif (!$did(5)) { did -a Temperature 9 Enter a temperature first!!! | halt } elseif ($did(5) !isnum) { did -a Temperature 9 Invalid temperature! | halt } elseif ($did(5) isnum) { set %t1 $calc($did(5) - 32) set %temp1 $calc(%t1 * 0.55555555555555555555555555555556) did -a Temperature 11 Converstion for $did(5) $+ °F to Celsius: did -a Temperature 9 $round(%temp1,2) $+ °C } } if ($did == 4) { if ($did(7) = 0) { did -a Temperature 12 Converstion for $did(7) $+ °C to Fahrenheit: did -a Temperature 10 32°F } elseif (!$did(7)) { did -a Temperature 12 Enter a temperature first!!! | halt } elseif ($did(7) !isnum) { did -a Temperature 12 Invalid temperature! | halt } elseif ($did(7) isnum) { set %t2 $calc($did(7) * 1.8) set %temp2 $calc(%t2 + 32) did -a Temperature 12 Converstion for $did(7) $+ °C to Fahrenheit: did -a Temperature 10 $round(%temp2,2) $+ °F } } }
Comments
(8)
RSS
Go to Bottom
napa182
Comments:
653
Posted on
May 9, 2008 2:30 am
um for the Celsius to Fahrenheit you have it as
Code:
var %t2 $calc($did(7) - 32)
var %temp $calc(%t2 * 0.55555555555555555555555555555556)
did -a Temperature 12 Converstion for $did(5) to Fahrenheit:
did -a Temperature 10 $round(%temp,2) $+ °
it should be
Code:
var %t2 $calc($did(7) * 1.8)
var %temp $calc(%t2 + 32)
did -a Temperature 12 Converstion for $did(7) to Fahrenheit:
did -a Temperature 10 $round(%temp,2) $+ °
napa182
Comments:
653
Posted on
May 9, 2008 2:32 am
ah nvm i see you caught it and changed oh you still have
Code:
$did(5) to Fahrenheit
change it to
Code:
$did(7) to Fahrenheit
Pepsi_Man0077
Comments:
28
Posted on
May 9, 2008 2:38 am
thanks bro i wouldn't have caught that :D
napa182
Comments:
653
Posted on
May 9, 2008 2:57 am
and maybe make the dialog abit smaller
EL
Comments:
573
Posted on
May 9, 2008 6:30 am
Neat man an yea as napa suggested smaller dialog hell maybe even a button to send to the channel or even a on text event so others can convert be cool.Well done tho i always wanted to know the convertions to these lol used to chat with a lot of aussies an NZ ppl so this is cool.
Eugenio
Comments:
281
Posted on
May 9, 2008 9:23 am
I swear I commented on this =/
criminal
Comments:
81
Posted on
May 9, 2008 11:33 am
You do now, Eugenio ^^
For celsius add a C on the end :) °C instead of °
Not rating for the dialog, cause I don't know much about dialogs and everytime I tried to make one myself, it was worthless.
7/10
Pepsi_Man0077
Comments:
28
Posted on
May 9, 2008 3:34 pm
Updated, made it smaller
Enter comment here..
Please
Register
or
Login
to start posting comments.
Pepsi_Man0077
Last seen:
May 12, 2008
Profile
Friends
(3)
Snippets
(12)
Images
(1)
Comments Received
(79)
Comments Submitted
(28)
My Snippet Tags
admin
arcade
auto
autojoin
away
bot
celsius
channel
commands
control
conversion
converter
custom
dialog
easy
fahrenheit
fun
gamble
game
games
hop
idle
imsg
info
kill
memo
message
mirc
mode
msg
network
op
paper
rock
scissors
script
seen
server
snippet
stats
temp
temperature
user
voice
whois
Contact
Add to Friends
Send Private Message
MSN:
Pepsi_Man0077
Friends (3)
kslice917
^Alexis^
View All