Что нового

не работает скрипт на другом компьютере

D

dreamorder

Гость
Доброго времени суток гос-да.
Написал скрипт, состоит из 2х частей, т.е. при работе первой части в нужный момент(нажатие кнопки в окне GUI) запускаю вторую скомпилированную часть скрипта:

Код:
#include <ButtonConstants.au3>
#requireadmin
#NoTrayIcon
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <DateTimeConstants.au3>
#Include <Array.au3>


$Form1 = GUICreate("///", 522, 170, -1, -1)
GUISetIcon("C:\Program Files\logo.ico", -1)
$Label1 = GUICtrlCreateLabel(" .....", 296, 8, 218, 27, $WS_BORDER) ; $WS_EX_CLIENTEDGE
GUICtrlSetFont(-1, 13, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(3, 0xF0F8FF)
$Label2 = GUICtrlCreateLabel("  ......  ", 152, 8, 141, 27, $WS_BORDER ); $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 13, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(4, 0xF0F8FF)
$Label3 = GUICtrlCreateLabel("  ....... ", 8, 8, 140, 27, $WS_BORDER ) ; $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 13, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(5, 0xF0F8FF)
$R = GUICtrlCreateEdit("", 8, 40, 225, 49, BitOR($ES_UPPERCASE,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetData(-1, "***")
GUICtrlSetBkColor(6, 0x1C6B72)
GUICtrlSetFont(-1, 20, 400, 0, "@Arial Unicode MS")
$Button1 = GUICtrlCreateButton("Отправ", 240, 40, 145, 49, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 16, 400, 0, "Vrinda")
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Отмена", 392, 40, 121, 49, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 12, 400, 0, "Vrinda")
GUICtrlSetCursor (-1, 0)
$Label4 = GUICtrlCreateLabel("   ................................................................................   ", 8, 96, 508, 17)
GUICtrlSetColor(9, 0xF0F8FF)
$Label5 = GUICtrlCreateLabel("  .................................................................................", 16, 112, 479, 17)
GUICtrlSetColor(10, 0xF0F8FF)
$Label6 = GUICtrlCreateLabel("  ..................................................................................  ", 24, 128, 463, 17)
GUICtrlSetColor(11, 0xF0F8FF)
$Label7 = GUICtrlCreateLabel("...............................................................................", 96, 144, 337, 17)
GUICtrlSetColor(12, 0xF0F8FF)
GUISetBkColor(0x0A0A0A)
GUISetState(@SW_SHOW)


While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $Button2
			Exit
        Case $Button1
			Call('_send')
			_send("......", "........", "")
		Exit
	EndSwitch
WEnd


Func _send($Body, $Subject, $Attachment)
$Text = GUICtrlRead($R, 1) ; возвращает текст пункта меню
$FromAddress = '[email protected]'
$ToAddress = '[email protected]'
$Body = $Text
$SMTPServer = 'smtp.yandex.ru'
$Username = '[email protected]'
$Password = ".........."
$Port = '25'

$str = "http://schemas.microsoft.com/cdo/configuration/"
$hMAIL = ObjCreate ("CDO.Message")
    With $hMAIL
        .From = $FromAddress
        .To = $ToAddress
        .Subject = $Subject
        .TextBody = $Body
        .AddAttachment ($Attachment)
    EndWith
    With $hMAIL.Configuration.Fields
        .Item ($str & "sendusing") = 2
        .Item ($str & "smtpserver") = $SMTPServer
        .Item ($str & "smtpauthenticate") = 1
        .Item ($str & "sendusername") = $Username
        .Item ($str & "sendpassword") = $Password
        .Item ($str & "smtpserverport") = $Port
        .Update
    EndWith
$hMAIL.Send

EndFunc


проблема в том что на одном из 2х компьютеров вот эта вторая часть не срабатывает на полпути, вот такая ошибка выходит :

Line 1685 (File "C\Windows\AppPatch\man\man2.exe")
--------------------------------------------------------
Error: The requested action with this object has failed.

откуда вообще 1685 строка взялась :stars:
на 1й машине(подключение к инету через неё) всё отлично работает, как на физической машине и так же на любой виртуальной.

Прошу пожалуйста, подскажите в чём причина? :blink:
Заранее благодарю всех откликнувшихся.
 

Mur

Осваивающий
Сообщения
132
Репутация
32
Почему бы вам не объединить свои усилия?
Делаете ведь одно и то же.
 
Автор
D

dreamorder

Гость
Да, это мой сосед, но к сожалению он тоже новичок :'(


Добавлено:
Сообщение автоматически объединено:

Спасибо всем ! :IL_AutoIt_1:
 
Верх