<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Declare FontDlg(Action, Hdlg, id)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Declare CellEngine(Action)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Declare Callback(hdlg,id,val)
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:X3,-32768;Include "Amixlate.sam!qktemp">Define Descript "Enter the temperature to be converted: "<:X~3,-32768;Include "Amixlate.sam!qktemp">
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Define DescriptHolder 1008
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Define AnswerHolder1 8010<:f>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Define AnswerHolder2 1007
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Define AnswerHolder3 22
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>Function Main()
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>MacName = GetRunningMacroFile$()
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgCallBack(0, "{MacName}!InitDlg")
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgCallBack(20, "{MacName}!CallBack") 'For C raido
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgCallBack(21, "{MacName}!CallBack") 'For F radio
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgCallBack(8001, "{MacName}!CallBack") 'For edit field
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgCallBack(33, "{MacName}!CallBack") 'For copy button
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(1,0,0) 'Create font
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FillEdit(DescriptHolder,Descript)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>macpath = GetMacPath$()
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FillEdit(1001,"{macpath}qktemp.bmt")
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>box = DialogBox(".","QuickTemp")
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>If Box = 3
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0> ' Copy the answer to the clipboard
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0> Answer = GetDialogField$(8010)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0> ClipBoardWrite(Answer,1)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>Endif
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(4,0,0) 'Free font object
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>End Function
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>Function Callback(hdlg,id,val)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>IgnoreKeyboard(2)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,194,0,0>ConvertFraction=9/5
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>if (id = 33) 'copy button selected
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8000)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>If Temp <<<;> ""
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>ClipBoardWrite(Temp,1)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>EndIf
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>exit function
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>endif
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>if GetDlgItemText(hdlg,20) 'F to C
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8001)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>if IsNumeric(Temp)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>F = <:f200,2Times New Roman,194,0,0>(Temp - 32<:f><:f200,2Times New Roman,194,0,0>)/ ConvertFraction
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>If F << (0 - 273<:f><:f200,2Times New Roman,194,0,0>)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>F = "ERR"
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>Else
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>F= FormatNum$("","<:f200,2Times New Roman,194,0,0></p><:f200,2Times New Roman,0,0,0>",<:f200,2Times New Roman,194,0,0>2<:f200,2Times New Roman,0,0,0>,F)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>If MID$(F, 1, 2) = "-,"
<+@><:S+-1><:#480,9025> <:f200,2Times New Roman,194,0,0>F = StrCat$(Left$(F, 1),Right$(F,Len(F) - 2)) EndIf
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>EndIf
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,F)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, 8000,F)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer:
</p>C" )
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>elseif Temp = "" 'if user backspaces number to empty then put null to answer
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,"")
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer:
</p>C" )
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>endif
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>elseif GetDlgItemText(hdlg,21) 'C to F
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8001)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>if IsNumeric(Temp)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>C = <:f200,2Times New Roman,194,0,0>(Temp
<:f200,2Times New Roman,194,0,0>* <:f200,2Times New Roman,194,0,0>ConvertFraction<:f200,2Times New Roman,194,0,0>)<:f200,2Times New Roman,194,0,0> + 32
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>If C << (0 - 460<:f><:f200,2Times New Roman,194,0,0>)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>C = "ERR"
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>Else
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,0,0,0>= FormatNum$("","<:f200,2Times New Roman,194,0,0></p><:f200,2Times New Roman,0,0,0>",<:f200,2Times New Roman,194,0,0>2<:f200,2Times New Roman,0,0,0>,<:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,0,0,0>
)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>If MID$(C, 1, 2) = "-,"
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,194,0,0> = StrCat$(Left$(C, 1),Right$(C,Len(C<:f200,2Times New Roman,194,0,0>) - 2))
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>EndIf
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,194,0,0>EndIf
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,C)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg,8000,C)
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer:
</p>F")
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>elseif Temp = "" 'if user backspaces number to empty then put null to answer
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,"")
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer:
</p>F")
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>endif
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>endif
<+@><:S+-1><:#240,9025> <:f200,2Times New Roman,0,0,0>end function
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>Function InitDlg(Hdlg, Id, Value)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>IgnoreKeyBoard(2)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>HourGlass(on)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1005)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1008)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1003)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 20)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 22)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 21)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, 20,1) 'init celsius
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>HourGlass(off)
<+@><:S+-1><:#240,9025><:f200,2Times New Roman,0,0,0>End Function
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>
<+@><:S+-1><:#284,9025><+!><+"><:f240,2Times New Roman,0,0,0>