
non ti avevo chiesto con chi l'hai fatto

Ti avevo chiesto se aveva le stesse funzioni di uno script che era stato creato in precedenza da suxsem

Vabbè, quando poi ho tempo verifico il codice...
Ho guardato adesso...hanno le stesse funzioni
function OnEvent_Signin()
{
ult=""
var Shell = new ActiveXObject("WScript.Shell");
url = Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\url");
tempo = Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\tempo");
ultimo = Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\ultimo");
filtro = Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\filtro");
attDis = Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\attDis");
if(ultimo=="-1"){
ultimo = true
}
if(ultimo=="0"){
ultimo = false
}
Agg()
ult=postDesc
if(ultimo==true){
MsgPlus.DisplayToast(NOME,"----------------------")
MsgPlus.DisplayToast(NOME,"di:\n"+di,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,postTitle,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,"Nuovo messaggio:\n\n"+ora,"","OnSomethingHappenedClick", 42)
}
MsgPlus.AddTimer("agg",tempo);
}
function OnEvent_Initialize(MessengerStart)
{
var objfile=new ActiveXObject("Scripting.FileSystemObject");
var pathfile=objfile.OpenTextFile(MsgPlus.ScriptFilesPath+"\\inf.txt" ,1);
NOME=pathfile.ReadLine()
INDRSS=pathfile.ReadLine()
SALTDISC=Number(pathfile.ReadLine())
VECCHIOS=pathfile.ReadLine()
if(MessengerStart==false){
//rimuovi vecchia versione
var fileSys = new ActiveXObject("Scripting.FileSystemObject");
if(fileSys.FileExists(MsgPlus.ScriptFilesPath.replace(/\\/g,"\\\\").substring(0,MsgPlus.ScriptFilesPath.replace(/\\/g,"\\\\").length-NOME.length)+VECCHIOS+"\\\\ScriptInfo.xml")==true){
fileSys.DeleteFolder(MsgPlus.ScriptFilesPath.replace(/\\/g,"\\\\").substring(0,MsgPlus.ScriptFilesPath.replace(/\\/g,"\\\\").length-NOME.length)+VECCHIOS,true);
var RegistryPath = (MsgPlus.ScriptRegPath.substring(0,MsgPlus.ScriptRegPath.length-(NOME.length+10))+VECCHIOS).substr(5); //Remove "HKCU\" prefix
var HKEY_CURRENT_USER = 0x80000001;
Registry_DeleteTree(HKEY_CURRENT_USER, RegistryPath);
Interop.Call("User32.dll", "MessageBoxW", 0, "E' necessario chiudere messenger, premere OK per proseguire",NOME, 0);
new ActiveXObject("WScript.Shell").Run("\""+MsgPlus.ScriptFilesPath.replace(/\\/g,"\\\\")+"\\close_msg.exe\"")
}
raccDi = new Array
raccCosa = new Array
raccOra = new Array
raccLink = new Array
url = INDRSS
tempo = 30000
ultimo = false
filtro = ""
attDis = "true"
var Shell = new ActiveXObject("WScript.Shell");
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\url", url);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\tempo", tempo);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\ultimo", ultimo);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\filtro", filtro);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\attDis", attDis);
Agg()
ult=postDesc
MsgPlus.AddTimer("agg",tempo);
MsgPlus.DisplayToast(NOME,"Impostazioni resettate")
}
}
function Registry_DeleteTree(lKeyLocation, sKey){
return Interop.Call('shlwapi.dll', 'SHDeleteKeyW', lKeyLocation, sKey) === 0;
}
function OnEvent_Timer(sTimerId){
if(sTimerId=="agg"){
MsgPlus.AddTimer("agg",tempo);
Ver()
if(attDis=="true"){
if(filtro!=di){
if(nuovo==true){
MsgPlus.DisplayToast(NOME,"----------------------")
MsgPlus.DisplayToast(NOME,"di:\n"+di,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,postTitle,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,"Nuovo messaggio:\n\n"+ora,"","OnSomethingHappenedClick", 42)
}
}
}
}
}
function OnSomethingHappenedClick()
{
var Shell = new ActiveXObject("WScript.Shell");
Shell.run(postLink);
}
function Agg(){
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
if(xmlDoc.load(url)==false){
MsgPlus.DisplayToast(NOME,"Errore durante l'aggiornamento dei feed RSS. Riprovare o controllare l'url inserito")
}
elePosts = xmlDoc.getElementsByTagName("item");
var readLink = elePosts[SALTDISC].getElementsByTagName("link");
postLink = readLink[0].firstChild.nodeValue;
var readTitle = elePosts[SALTDISC].getElementsByTagName("title");
postTitle = readTitle[0].firstChild.nodeValue;
var readDesc = elePosts[SALTDISC].getElementsByTagName("description");
postDesc = readDesc[0].firstChild.nodeValue;
di = postDesc.indexOf("blank")
di = postDesc.substring(di+7,postDesc.length-4)
ora = postDesc.substring(0,postDesc.indexOf(",")+10)
}
function Ver(){
Agg()
if(ult==postDesc){
nuovo = false
}else{
ult=postDesc
nuovo = true
raccDi[raccDi.length] = di
raccCosa[raccCosa.length] = postTitle
raccOra[raccOra.length] = ora
raccLink[raccLink.length] = postLink
try{
if(vt.Visible == true){
vt.Close(1)
apriVT()
}
}catch(e){
}
}
}
function OnGetScriptMenu(nLocation){
var ScriptMenu = "<scriptMenu>\n";
ScriptMenu += "Aggiorna";
ScriptMenu += "Visualizza ultimo";
ScriptMenu += "";
ScriptMenu += "Visualizza tutti";
ScriptMenu += "";
if(attDis=="true"){
ScriptMenu += "Disattiva script";
}
if(attDis=="false"){
ScriptMenu += "Attiva script";
}
ScriptMenu += "Configurazione";
ScriptMenu += "by Suxsem - v" + VERSIONE + "
ScriptMenu += "</scriptMenu>";
return ScriptMenu;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
if(MenuItemId=="AG"){
Ver()
if(nuovo==false){
MsgPlus.DisplayToast(NOME,"Nessun nuovo messaggio")
}else{
if(filtro!=di){
MsgPlus.DisplayToast(NOME,"----------------------")
MsgPlus.DisplayToast(NOME,"di:\n"+di,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,postTitle,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,"Nuovo messaggio:\n\n"+ora,"","OnSomethingHappenedClick", 42)
}else{
MsgPlus.DisplayToast(NOME,"Nessun nuovo messaggio")
}
}
}
if(MenuItemId=="VU"){
Ver()
MsgPlus.DisplayToast(NOME,"----------------------")
MsgPlus.DisplayToast(NOME,"di:\n"+di,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,postTitle,"","OnSomethingHappenedClick", 42)
MsgPlus.DisplayToast(NOME,"Nuovo messaggio:\n\n"+ora,"","OnSomethingHappenedClick", 42)
}
if(MenuItemId=="VT"){
apriVT()
}
if(MenuItemId=="IM"){
im=MsgPlus.CreateWnd("windows.xml","configurazione")
if(url==INDRSS){
im.Button_SetCheckState("sorgenteRadio1",true)
im.Button_SetCheckState("sorgenteRadio2",false)
im.SetControlText("sorgenteText","Inserire indirizzo feed RSS")
}else{
im.Button_SetCheckState("sorgenteRadio2",true)
im.Button_SetCheckState("sorgenteRadio1",false)
im.SetControlText("sorgenteText",url)
}
im.SetControlText("tempoText",tempo/1000)
im.SetControlText("filtroText",filtro)
im.Button_SetCheckState("ultimoCB",ultimo)
}
if(MenuItemId=="DI"){
attDis = "false"
var Shell = new ActiveXObject("WScript.Shell");
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\attDis", attDis);
MsgPlus.DisplayToast(NOME,"Script disattivato")
}
if(MenuItemId=="AT"){
attDis = "true"
var Shell = new ActiveXObject("WScript.Shell");
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\attDis", attDis);
MsgPlus.DisplayToast(NOME,"Script attivato")
}
if(MenuItemId=="CO"){
co=MsgPlus.CreateWnd("windows.xml","informazioni")
}
}
function apriVT(){
vt=MsgPlus.CreateWnd("windows.xml","ultimi")
for(a=0;a
var item =vt.LstView_AddItem("lstDisplay", a);
vt.LstView_SetItemText("lstDisplay", item, 0, raccOra[a]);
vt.LstView_SetItemText("lstDisplay", item, 1, raccDi[a]);
vt.LstView_SetItemText("lstDisplay", item, 2, raccCosa[a]);
vt.LstView_SetItemText("lstDisplay", item, 3, raccLink[a]);
vt.SendControlMessage("lstDisplay", /* LVM_ENSUREVISIBLE */ 0x1013, a, false)
}
}
function OninformazioniEvent_CtrlClicked(PlusWnd, ControlId){
if(ControlId=="exit"){
PlusWnd.Close(1)
}
}
function OnultimiEvent_CtrlClicked(PlusWnd, ControlId){
if(ControlId=="chiudiUltimi"){
vt.Close(1)
}
if(ControlId=="chiudiUltimi"){
vt.Close(1)
}
if(ControlId=="aggSep"){
raccDi[raccDi.length] = "-"
raccCosa[raccCosa.length] = "-"
raccOra[raccOra.length] = "-"
raccLink[raccLink.length] = "-"
vt.Close(1)
apriVT()
}
}
function OnultimiEvent_LstViewDblClicked(PlusWnd,ControlId,ItemIdx){
linkTemp = vt.LstView_GetItemText("lstDisplay", ItemIdx, 3)
var Shell = new ActiveXObject("WScript.Shell");
Shell.run(linkTemp);
}
function OnconfigurazioneEvent_CtrlClicked(PlusWnd, ControlId){
if(ControlId=="conferma"){
filtro=im.GetControlText("filtroText")
tempo=im.GetControlText("tempoText")
tempo=tempo.replace(/,/g,".")
tempo=Number(tempo)
if(String(tempo)=="NaN"){
Interop.Call("User32.dll", "MessageBoxW", 0, "Nel campo | Aggiorna ogni: | è possibile inserire solo un valore numerico",NOME, 0);
}else{
tempo=tempo*1000
if(im.Button_IsChecked("sorgenteRadio1")==true){
url = INDRSS
}
if(im.Button_IsChecked("sorgenteRadio2")==true){
url = im.GetControlText("sorgenteText")
}
if(im.Button_IsChecked("ultimoCB")==true){
ultimo = true
}else{
ultimo = false
}
var Shell = new ActiveXObject("WScript.Shell");
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\ultimo", ultimo);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\url", url);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\tempo", tempo);
Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\filtro", filtro);
im.Close(1)
MsgPlus.DisplayToast(NOME,"Impostazioni salvate")
Agg()
ult=postDesc
}
}
if(ControlId=="notaBene"){
Interop.Call("User32.dll", "MessageBoxW", 0, "Nei circuiti forumfree e forumcommunity non è possibile ricevere feed RSS per messaggi scritti nelle sezioni protette con password o con restrizioni di accesso",NOME, 0);
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}