Hey scripters;
I am having ttrouble with this script. When I save the desktop it will not save the email login info.
Is there away to just hard code the login informetion so I don't have the fill it out.
If you know how to do this please set the code areas so I can fill them in.
The Code is below: I don't use the second email section so I would just as oon get rid of it...
Code beginning:
Dim sLogin
Dim sPass
Dim sServer
Dim sType
Dim sLogin2
Dim sPass2
Dim sServer2
Dim sType2
Dim bPrompting
Dim bChecking
'Called when the script is executed
Sub Object_OnScriptEnter
Dim i
Dim PrefName
bPrompting = False
bChecking = False
Widget.AddPreference "Language"
Widget.Preference("Language").Type = "ComboList"
Widget.Preference("Language").DefaultValue = "English"
Widget.Preference("Language").Caption = "Lang./Sprache :"
Widget.Preference("Language").AddValue "English"
i = 1
For i = 1 To 2
Prefname = "Account" & i
c242AddTxtPreference(Prefname)
Prefname = "User"& i
c242AddTxtPreference(Prefname)
Prefname = "Password" & i
Widget.AddPreference Prefname
Widget.Preference(Prefname).Type = "Password"
Widget.Preference(Prefname).DefaultValue = ""
Widget.Preference(Prefname).Caption = "Password " & i
Prefname = "Server" & i
c242AddTxtPreference(Prefname)
Next
object.settimer 123, 60000
RefreshData
LanguageSettings
CheckMail
End Sub
Sub c242AddTxtPreference(PrefnameN)
Widget.AddPreference PrefnameN
Widget.Preference(PrefnameN).Type = "Text"
Widget.Preference(PrefnameN).DefaultValue = PrefnameN
Widget.Preference(PrefnameN).Caption = PrefnameN
End Sub
Sub RefreshData
Dim Accounts
sLogin = Widget.Preference("User1").Value 'object.localstorage("MailLogin")
sPass = Widget.Preference("Password1").Value 'object.localstorage("MailPass")
sServer = Widget.Preference("Server1").Value 'object.localstorage("MailServer")
sType = "POP3"
Object.Height = 60 + Accounts * 15
End Sub
Sub LanguageSettings
If Widget.Preference("Language").Value = "Deutsch" Then
Desktopx.Object("mail_btn_configure").text = "@Mail"
Desktopx.Object("mail_btn_configure").Tooltiptext = "Zum Konfigurieren klicken"
Else
Desktopx.Object("mail_btn_configure").text = "@Mail"
Desktopx.Object("mail_btn_configure").Tooltiptext = ""
End If
End Sub
Sub Widget_OnPreferencesChange
RefreshData
LanguageSettings
CheckMail
End Sub
Sub object_ontimer123
CheckMail
End Sub
Sub CheckMail
If bPrompting Or sLogin = "" Then Exit Sub
If bChecking Then Exit Sub
bChecking = True
desktopx.Object("mail_info").text = ""
ltype = 0
If stype = "IMAP" Then ltype = 1
Mail.CheckMail "1", sLogin, sPass, sServer, ltype
bChecking = False
End Sub
Sub CheckMail2
If bPrompting Or sLogin2 = "" Then Exit Sub
If bChecking Then Exit Sub
bChecking = True
desktopx.Object("mail_info2").text = ""
ltype = 0
If stype2 = "IMAP" Then ltype2 = 1
Mail.CheckMail "2", sLogin2, sPass2, sServer2, ltype2
bChecking = False
End Sub
Sub Object_OnLButtonUpEx(obj, x,y,

name = obj.name
If b= False Then
If name = "mail_btn_configure" Then
Widget.OpenProperties
End If
End If
End Sub
'method OnMailEvent
Sub Mail_OnMailEvent(requestID, mails)
If mails Then
strailing = ""
If requestID = "1" Then
If mails = 1 Then
strailing = " "
Else
strailing = " "
End If
desktopx.Object("mail_info").text = mails & strailing
Else
If requestID = "2" Then
If mails = 1 Then
strailing = " @-Mail"
Else
strailing = " @-Mails"
End If
desktopx.Object("mail_info2").text = mails & strailing
End If
End If
Else
If requestID = "1" Then
desktopx.Object("mail_info").text = "0 "
Else
If requestID = "2" Then
desktopx.Object("mail_info2").text = "0 "
End If
End If
End If
End Sub