Creates an e-mail to send to tech support, including the users OS, CPU type, CPU speed, & Ammount of RAM.
Call like this...
eMailTecSupport(theEmailAddress, theSubjectLine, theNameOfWhoToSendTo)
on eMailTecSupport myEmail, subject, myName
set spaces = " "
case baCpuInfo( "type" ) of
0 : set CPU = "unknown"
3 : set CPU = "386"
4 : set CPU = "486"
5 : set CPU = "Pentium"
6 : set CPU = "PentiumPro"
end case
set system = spaces & "OS = " & baVersion( "os" ) & return & spaces & "CPU = " & CPU && string(baCpuInfo( "speed" )) & return & spaces & "RAM" & string(baMemoryInfo( "ram" )/(1048576)) & "MB"
sendMail myEmail, subject, "Dear" && myName & "," & return && "My system specs are." & return & system & return & "My problem is"
end
on sendmail emailAddress, subString, bodyText
set addressString = emailAddress
set subjectString = subString
set messageString = urlEncode(bodyText)
gotonetpage "mailto:"&addressString&"?subject="&subjectString&"&body="&messageString
end
on urlEncode whichString
if NOT stringP(whichString) then exit
set reservedListASCII = [32, 123, 125, 124, 92, 94, 126, 91, 93, 39,35, 37, 60, 62, 34, 59, 44, 47, 63, 58, 64, 61, 38, 13]
set replaceList = ["%20", "%7B", "%7D", "%7C", "%5C", "%5E", "%7E", "%5B", "%5D", "%27", "%23", "%25", "%3C", "%3E", "%22", "%3B", "%2C", "%2F", "%3F", "%3A", "%40", "%3D", "%26","%0D"]
set sLength = the number of chars in whichString
repeat with i = 1 to sLength
set currentChar = charToNum(char i of whichString)
set replaceLoc = getOne(reservedListASCII,currentChar)
if replaceLoc then
put getAt(replaceList,replaceLoc) into char i of whichString
set i = i + 2
set sLength = sLength + 2
end if
end repeat
return whichString
end
on getBehaviorDescription me
describe = "Creates an e-mail to send to tech support, including the users OS, CPU type, CPU speed, & Ammount of RAM." & return & "Call like this..." & return & "eMailTecSupport(theEmailAddress, theSubjectLine, theNameOfWhoToSendTo)"
return describe
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA