Версия AutoIt: v3.3.6.1
Описание:
Есть форма с Input полями. Необходимо что бы после заполнения полей и нажатия кнопки - открывался txt файл(со сгенерированным html кодом) со вставленными значениями.(все время вылазиет такое:"неправильное количество параметров в вызове функции - строка 59").
Примечания:
Описание:
Есть форма с Input полями. Необходимо что бы после заполнения полей и нажатия кнопки - открывался txt файл(со сгенерированным html кодом) со вставленными значениями.(все время вылазиет такое:"неправильное количество параметров в вызове функции - строка 59").
Примечания:
Код:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 561, 433, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 304, 8, 241, 21)
$Input2 = GUICtrlCreateInput("Input2", 304, 40, 241, 21)
$Input3 = GUICtrlCreateInput("Input3", 304, 72, 241, 21)
$Input4 = GUICtrlCreateInput("Input4", 304, 104, 241, 21)
$Input5 = GUICtrlCreateInput("Input5", 304, 136, 241, 21)
$Input6 = GUICtrlCreateInput("Input6", 304, 168, 241, 21)
$Input7 = GUICtrlCreateInput("Input7", 304, 200, 241, 21)
$Input8 = GUICtrlCreateInput("Input8", 304, 232, 241, 21)
$Input9 = GUICtrlCreateInput("Input9", 304, 264, 241, 21)
$Input10 = GUICtrlCreateInput("Input10", 304, 296, 241, 21)
$Input11 = GUICtrlCreateInput("Input11", 304, 328, 241, 21)
$Input12 = GUICtrlCreateInput("Input12", 304, 360, 241, 21)
$Label1 = GUICtrlCreateLabel("Изображения.", 8, 232, 109, 17)
$Input13 = GUICtrlCreateInput("Input13", 8, 264, 241, 21)
$Input14 = GUICtrlCreateInput("Input14", 8, 296, 241, 21)
$Input15 = GUICtrlCreateInput("Input15", 8, 328, 241, 21)
$Input16 = GUICtrlCreateInput("Input16", 8, 360, 241, 21)
$Input17 = GUICtrlCreateInput("Input17", 8, 392, 241, 21)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\...\Мои документы\2.JPG", 16, 168, 161, 41, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("Сгенерировать", 457, 392, 87, 33, $WS_GROUP)
$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\...\Мои документы\3.JPG", 16, 8, 161, 161, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Write()
Exit
EndSwitch
WEnd
Func Write()
Run ("notepad.exe")
WinWaitActive ("Безымянный - Блокнот")
Send ("<div align=center>")
Send("<img height=697 src=", $Input1, "style=vertical-align: middle; margin: 4px; weight=490/></div>")
Send("<ul class=listing>")
Send("<li>")
Send("<span><b>Название фильма:</b>", $Input2, "
")
Send("</span></li>")
Send("<li>")
Send("<span><b>Оригинальное название фильма:</b></span>", $Input3,"</li>")
Send("<li>")
Send("<span><b>Год выхода:</b>", $Input4, "</span></li>")
Send("<li>")
Send("<span><b>Жанр:</b> </span>", $Input5,"</li>")
Send("<li>")
Send("<span><b>В ролях:</b> </span>", $Input6,"</li>")
Send("<li>")
Send("<span><b>Режиссер:</b><span style=""text-decoration: underline""> </span></span>", $Input7,"</li>")
Send("<li>")
Send("<span><b>Страна:</b>", $Input8, "
")
Send("</span></li>")
Send("<li>")
Send("<b>Формат: </b>", $Input9, "</li>")
Send("<li>")
Send("<b>Качество: </b>", $Input10, "</li>")
Send("<li>")
Send("<b>Размер: </b>", $Input11, "</li>")
Send("</ul>")
Send("<ul class=listing>")
Send("</ul>")
Send("<p>")
Send("<b>О фильме:</b>" , $Input12, "</p>")
Send("<p>")
Send("<a href=", $Input13, "><img border=0 src=""http://rudb.org/img/2010_11/i4cdeb4e92d229.gif""valign=top/></a></p>")
Send("<p>")
Send("<img height=68 rel=nohsimage src=", $Input14, " width=160 /></a>")
Send("<img height=68 rel=nohsimage src=", $Input15, " width=160 /></a>")
Send("<img height=68 rel=nohsimage src=", $Input16, " width=160 /></a></p>")
Send("<img height=68 rel=nohsimage src=", $Input17, " width=160 /></a></p>")
Send("<img height=68 rel=nohsimage src=", $Input18, "width=160 /></a></p>" )
EndFunc