Автор: AZJIO
Дата сообщения: 10.07.2010 06:00
[more=Секундомер]
Код: #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_OutFile=Stopwatch.exe
#AutoIt3Wrapper_icon=Stopwatch.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Comment=-
#AutoIt3Wrapper_Res_Description=Stopwatch.exe
#AutoIt3Wrapper_Res_Fileversion=0.5.0.0
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=n
#AutoIt3Wrapper_Res_LegalCopyright=AZJIO
#AutoIt3Wrapper_Res_Language=1049
#AutoIt3Wrapper_Run_AU3Check=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; @AZJIO 2.09.2010 (AutoIt3_v3.2.12.1+)
#NoTrayIcon
; En
$LngTitle='Stopwatch'
$LngStart='Start'
$LngSp='Stop'
$LngPs='Pause'
$LngRe='Reset'
$LngMem='Memory'
$LngSig='Signal'
$LngAbout='About'
$LngVer='Version'
$LngSite='Site'
$LngHK='HotKey'
$LngHKMsg= 'Start - Enter, UP'&@CRLF&'Pause - Down, Pause-Break'&@CRLF&'Reset - Delete, 0, Numpad0'&@CRLF&'Memory - Space'&@CRLF&'Signal - Numpad., Alt+.'
$LngSgTx='Will Enter time, in which'&@CRLF&'must sound signal'
$LngTm='Hour | Minute | Seconds'
$LngSpk='1. Speaker'
$LngMSpk='2. Tune Speaker'
$LngCn='Cancel'
$LngErr='Error'
$LngErrMsg='Time must be not installed in 0,'&@CRLF&'a name of the conservation must be incorporated,'&@CRLF&'in name must not be a symbol "|"'
$LngErrMsg2='Path not exist.'
$LngErrMsg3='Choose other name of the save'
$LngErrMsg4='Time must be not installed in 0'
$LngSl="Select File"
$LngType="Media-File"
$LngNx='Next'
$LngCm='3. Select path'
$LngMP='internal device for mp3'
; Ru
; если есть русский в раскладках клавиатуры, то использовать его
For $i = 1 to 5
$LngN = RegEnumVal("HKCU\Keyboard Layout\Preload", $i)
If @error <> 0 Then ExitLoop
If RegRead("HKCU\Keyboard Layout\Preload", $LngN) = 00000419 Then
$LngTitle='Секундомер'
$LngStart='Старт'
$LngSp='Стоп'
$LngPs='Пауза'
$LngRe='Сброс'
$LngMem='Память'
$LngSig='Сигнал'
$LngAbout='О программе'
$LngVer='Версия'
$LngSite='Сайт'
$LngHK='Горячие клавиши'
$LngHKMsg= 'Старт - Enter, UP'&@CRLF&'Пауза - Down, Pause-Break'&@CRLF&'Сброс - Delete, 0, Numpad0'&@CRLF&'Память - Space'&@CRLF&'Сигнал - Numpad., Alt+.'
$LngSgTx='Введите время, в которое'&@CRLF&'должен прозвучать сигнал'
$LngTm='Часы | Минуты | Секунды'
$LngSpk='1. Динамик ПК'
$LngMSpk='2. Мелодия динамика ПК'
$LngCn='Отмена'
$LngErr='Мелкая ошибка'
$LngErrMsg='Время не должно быть установлено в 0,'&@CRLF&'должно быть введено имя сохранения,'&@CRLF&'в имени не должно быть символа "|"'
$LngErrMsg2='Путь не существует.'
$LngErrMsg3='Запись с таким именем уже существует'
$LngErrMsg4='Время не должно быть установлено в 0'
$LngSl="Указать файл"
$LngType="Медиа-файл"
$LngNx='Далее'
$LngCm='3. Укажите путь'
$LngMP='внутренее устройство для mp3'
ExitLoop
EndIf
Next
Global $Pause, $iTime, $L=0, $iStart, $s=0, $iTimeSig, $nSig0, $combo=$LngCm, $Bold = 700
Global $Tr1 = 0, $Tr2 = 0, $Tr3 = 0, $n=1, $pid, $sLabel, $trMp=0
Global $IniText, $aIniText, $ini=@ScriptDir&'\Stwh.ini'
If FileExists($ini) Then
$file = FileOpen($ini, 0)
$IniText = FileRead($file)
FileClose($file)
EndIf
; Case 'WIN_2000', 'WIN_XP', 'WIN_2003'
Switch @OSVersion
Case 'WIN_VISTA', 'WIN_7'
$Bold = 400
EndSwitch
$Gui = GUICreate($LngTitle, 230, 185)
If @compiled=0 Then GUISetIcon("Stopwatch.ico",-2)
GUICtrlCreateLabel ("", 3,3,144,34,0x12)
$hLabel1 = GUICtrlCreateLabel(' 00', 5, 5, 35, 30,0xC)
_bk()
GUICtrlCreateLabel(':', 40, 5, 10, 30)
_bk()
$hLabel2 = GUICtrlCreateLabel('00', 50, 5, 28, 30)
_bk()
GUICtrlCreateLabel(':', 78, 5, 10, 30)
_bk()
$hLabel3= GUICtrlCreateLabel('00', 88, 5, 33, 30)
_bk()
GUICtrlCreateLabel('.', 116, 5, 7, 30)
_bk()
$hLabel4= GUICtrlCreateLabel('0', 123, 5, 22, 30)
_bk()
$hM1 = GUICtrlCreateLabel('M1 - 00:00:00.0', 30, 45, 110, 25, 0xC)
GUICtrlSetFont(-1, 10, $Bold)
$hM2 = GUICtrlCreateLabel('M2 - 00:00:00.0', 30, 65, 110, 25, 0xC)
GUICtrlSetFont(-1, 10, $Bold)
$hM3 = GUICtrlCreateLabel('M3 - 00:00:00.0', 30, 85, 110, 25, 0xC)
GUICtrlSetFont(-1, 10, $Bold)
$hM4 = GUICtrlCreateLabel('M4 - 00:00:00.0', 30, 105, 110, 25, 0xC)
GUICtrlSetFont(-1, 10, $Bold)
$hM5 = GUICtrlCreateLabel('M5 - 00:00:00.0', 30, 125, 110, 25, 0xC)
GUICtrlSetFont(-1, 10, $Bold)
$hSg = GUICtrlCreateLabel('', 30, 160, 110, 25)
GUICtrlSetFont(-1, 10, $Bold)
GUICtrlSetColor(-1, 0x3db03a)
$Start = GUICtrlCreateButton($LngStart, 161, 5, 60, 25)
GUICtrlSetTip(-1, 'Enter'&@CRLF&'Up')
$Pause0 = GUICtrlCreateButton($LngPs, 161, 35, 60, 25)
GUICtrlSetState(-1,128)
GUICtrlSetTip(-1, 'Down'&@CRLF&'Pause')
;$Stop = GUICtrlCreateButton("Стоп", 161, 65, 60, 25)
$Reset = GUICtrlCreateButton($LngRe, 161, 65, 60, 25)
GUICtrlSetTip(-1, 'NumPad 0'&@CRLF&'Del'&@CRLF&'0')
$Mem = GUICtrlCreateButton($LngMem, 161, 95, 60, 25)
GUICtrlSetTip(-1, 'Space')
$Signal = GUICtrlCreateButton($LngSig, 161, 125, 60, 25)
GUICtrlSetTip(-1, 'Alt+.'&@CRLF&'NumPad Del')
$About = GUICtrlCreateButton("@", 161, 155, 27, 25)
$HotKey = GUICtrlCreateButton("?", 193, 155, 27, 25)
$nStop1 = GUICtrlCreateButton($LngSp, 235, 160, 32, 23)
$n=1
$sLabel=' 00:00:00.0'
$iHour='00'
$iMin='00'
$iSec='00'
$iMsec='0'
Dim $AccelKeys[10][2]=[["{Enter}", $Start], ["{UP}", $Start], ["{SPACE}", $Mem], ["{DEL}", $Reset], ["0", $Reset], ["{NUMPAD0}", $Reset], ["{DOWN}", $Pause0], ["{PAUSE}", $Pause0], ["!{.}", $Signal], ["{NUMPADDOT}", $Signal]]
GUISetAccelerators($AccelKeys)
GUISetState()
$iHourTmp=''
$iMinTmp=''
$iSecTmp=''
$iMsecTmp=''
While 1
$msg = GUIGetMsg()
If $Tr1 = 1 Then
$iTime = Int(TimerDiff($iStart)/100)/10-$L
$iHour=Int($iTime/3600)
$iMin = Int(($iTime-$iHour*3600)/60)
$iSec = Int($iTime)-$iHour*3600-$iMin*60
$iMsec = Int(($iTime-Int($iTime))*10)
If $iHour < 10 Then $iHour='0'&$iHour
If $iMin < 10 Then $iMin='0'&$iMin
If $iSec < 10 Then $iSec='0'&$iSec
;If $iMsec < 10 Then $iMsec='0'&$iMsec
If $iHourTmp<>$iHour Then GUICtrlSetData($hLabel1, " " &$iHour)
If $iMinTmp<>$iMin Then GUICtrlSetData($hLabel2, $iMin)
If $iSecTmp<>$iSec Then GUICtrlSetData($hLabel3, $iSec)
If $iMsecTmp<>$iMsec Then GUICtrlSetData($hLabel4, $iMsec)
$iHourTmp=$iHour
$iMinTmp=$iMin
$iSecTmp=$iSec
$iMsecTmp=$iMsec
;Sleep(20)
EndIf
If $s = 1 And $iTimeSig<=$iTime Then
$s = 0
GUICtrlSetData($hSg,'')
$nSig=StringLeft($nSig0, 1)
Switch $nSig
Case 1
Beep(500, 1000)
Case 2
_melodia()
Case 3
;ShellExecute(StringTrimLeft($nSig0, 3))
If $trMp=1 And StringInStr(';mp3;wav;wma;',';'&StringRegExpReplace($nSig0, '.*\.(\S+)', '\1')&';')<>0 Then
_MP($nSig0)
Else
_StartFile($nSig0)
EndIf
Case Else
_melodia()
EndSwitch
EndIf
If $pid<>0 And ProcessExists($pid) Then
GUICtrlSetPos($nStop1, 5, 160)
Else
GUICtrlSetPos($nStop1, 235, 160)
$pid=0
EndIf
Select
Case $msg = $About
_About()
Case $msg = $HotKey
MsgBox(0, $LngHK, $LngHKMsg)
Case $msg = $nStop1
If $pid<>0 And ProcessExists($pid) Then
ProcessClose($pid)
$pid=0
EndIf
Case $msg = $Start
_Start()
Case $msg = $Pause0
If $Tr3 = 0 Then ContinueLoop
If $Tr1 = 1 Then
$Tr1 = 0
$Tr2 = 1
GUICtrlSetData($Pause0,$LngNx)
GUICtrlSetState($Start,128)
Else
$L=Int(TimerDiff($iStart)/100)/10-$iTime
$Tr1 = 1
$Tr2 = 2
GUICtrlSetData($Pause0, $LngPs)
GUICtrlSetState($Start,64)
EndIf
Case $msg = $Mem
If $n = 6 Then
For $n = 1 to 5
GUICtrlSetColor(Eval("hM"&$n), 0x000000)
Next
$n = 1
EndIf
$sLabel = " " &$iHour & ":" & $iMin & ":" & $iSec & "." &$iMsec
GUICtrlSetData(Eval("hM"&$n), 'M'&$n&' -'&$sLabel)
If $sLabel<>' 00:00:00.0' Then
GUICtrlSetColor(Eval("hM"&$n), 0xc03d3a)
$n+=1
EndIf
Case $msg = $Reset
_Reset()
Case $msg = $Signal
_Signal()
Case $msg = -3
Exit
EndSelect
WEnd
Func _Signal()
$GuiPos = WinGetPos($Gui)
$Gui1 = GUICreate($LngSig, 243, 200,$GuiPos[0], $GuiPos[1], -1, 0x00000080)
GUICtrlCreateLabel($LngSgTx, 20, 5, 200, 34)
GUICtrlCreateLabel($LngTm, 15, 38, 170, 17)
$nHour = GUICtrlCreateInput("0", 10, 55, 50, 22)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1, 24, 0)
$nMin = GUICtrlCreateInput("0", 65, 55, 50, 22)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1, 60, 0)
$nSec = GUICtrlCreateInput("0", 120, 55, 50, 22)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1, 60, 0)
$nSig = GUICtrlCreateCombo ('', 10,83,160,25)
GUICtrlSetData(-1,$LngSpk&'|'&$LngMSpk&'|'&$combo,$LngSpk)
$nFolder = GUICtrlCreateButton("...", 172, 83, 32, 23)
GUICtrlSetFont(-1, 14)
$nPlay = GUICtrlCreateButton("Play", 205, 83, 32, 23)
$nStop = GUICtrlCreateButton("Stop", 245, 55, 32, 23)
$nSection = GUICtrlCreateCombo ('', 10,113,160,25)
$nSave = GUICtrlCreateButton("Save", 172, 113, 32, 23)
$nOpen = GUICtrlCreateButton("Open", 248, 113, 32, 23)
If FileExists($ini) Then GUICtrlSetPos($nOpen, 205, 113)
_IniText()
If $IniText<>'' Then
For $i = 1 to UBound($aIniText) - 1
If $aIniText[$i]<>'' Then
If StringInStr(StringRegExpReplace ($aIniText[$i],'(.*)(3\. .*)','\2'), '|')=0 Then GUICtrlSetData($nSig,StringRegExpReplace ($aIniText[$i],'(.*)(3\. .*)','\2'),'')
GUICtrlSetData($nSection,StringRegExpReplace ($aIniText[$i],'(.*?)\|(.*)','\1'),'')
EndIf
Next
EndIf
$nMP = GUICtrlCreateCheckbox($LngMP, 10, 138, 180, 25)
If $trMp=1 Then GUICtrlSetState(-1,1)
$nOK = GUICtrlCreateButton("OK", 59, 165, 60, 25)
$nCancel = GUICtrlCreateButton($LngCn, 124, 165, 60, 25)
$pid=0
GUISetState(@SW_SHOW, $Gui1)
GUISetState(@SW_HIDE, $Gui)
$msg = $Gui1
While 1
$msg = GUIGetMsg()
If $pid<>0 And ProcessExists($pid) Then
GUICtrlSetPos($nStop, 205, 55)
Else
GUICtrlSetPos($nStop, 245, 55)
$pid=0
EndIf
Select
Case $msg = $nMP
If GUICtrlRead($nMP) = 1 Then
$trMp=1
Else
$trMp=0
EndIf
Case $msg = $nStop
If $pid<>0 And ProcessExists($pid) Then
ProcessClose($pid)
$pid=0
EndIf
Case $msg = $nOpen
ShellExecute($ini)
Case $msg = $nPlay
$nSi0=GUICtrlRead($nSig)
If StringLeft($nSi0, 1)='3' And Not FileExists(StringTrimLeft($nSi0, 3)) Then
MsgBox(0,$LngErr, $LngErrMsg2)
ContinueLoop
EndIf
Switch StringLeft($nSi0, 1)
Case 1
Beep(500, 1000)
Case 2
_melodia()
Case 3
If GUICtrlRead($nMP) = 1 And StringInStr(';mp3;wav;wma;',';'&StringRegExpReplace($nSi0, '.*\.(\S+)', '\1')&';')<>0 Then
_MP($nSi0)
Else
_StartFile($nSi0)
EndIf
EndSwitch
Case $msg = $nSection
$nSection0=GUICtrlRead($nSection)
$combotmp=''
For $i = 1 to UBound($aIniText) - 1
If StringRegExpReplace ($aIniText[$i],'(.*?)\|(.*)','\1')=$nSection0 Then
$combotmp=StringSplit($aIniText[$i], '|')
GUICtrlSetData($nHour, $combotmp[2])
GUICtrlSetData($nMin, $combotmp[3])
GUICtrlSetData($nSec, $combotmp[4])
GUICtrlSetData($nSig, $combotmp[5])
EndIf
Next
If StringLeft($combotmp[5], 1)='3' And Not FileExists(StringTrimLeft($combotmp[5], 3)) Then MsgBox(0, $LngErr,$LngErrMsg2)
Case $msg = $nSave
$nSection0=GUICtrlRead($nSection)
$nHour0=GUICtrlRead($nHour)
$nMin0=GUICtrlRead($nMin)
$nSec0=GUICtrlRead($nSec)
$nSi0=GUICtrlRead($nSig)
If $nHour0+$nMin0+$nSec0 = 0 or StringInStr($nSection0,'|')<>0 or $nSection0='' Then
MsgBox(0, $LngErr, $LngErrMsg)
ContinueLoop
EndIf
If StringLeft($nSi0, 1)='3' And Not FileExists(StringTrimLeft($nSi0, 3)) Then
MsgBox(0, $LngErr,$LngErrMsg2)
ContinueLoop
EndIf
If StringInStr($IniText, $nSection0&'|')<>0 Then
MsgBox(0, $LngErr, $LngErrMsg3)
ContinueLoop
EndIf
$ReadTmp=$nSection0&'|'&$nHour0&'|'&$nMin0&'|'&$nSec0&'|'&$nSi0&@CRLF
;If StringRegExp($IniText, '(?s)(^.*)\n$', 0)=0 Then $ReadTmp&=@CRLF&$ReadTmp
$file = FileOpen($ini,1)
FileWrite($file, $ReadTmp)
$IniText&=$ReadTmp
FileClose($file)
_IniText()
If StringLeft($nSi0, 1)='3' Then GUICtrlSetData($nSig,$nSi0,$nSi0)
GUICtrlSetData($nSection,$nSection0,$nSection0)
GUICtrlSetPos($nOpen, 205, 113)
Case $msg = $nCancel
$s=0
GUICtrlSetData($hSg,'')
$msg = $Gui
$GuiPos = WinGetPos($Gui1)
GUIDelete($Gui1)
WinMove($Gui, "", $GuiPos[0], $GuiPos[1])
GUISetState(@SW_SHOW, $Gui)
ExitLoop
Case $msg = $nFolder
$tmp = FileOpenDialog($LngSl, @WorkingDir & "", $LngType&" (*.*)", 1 + 4)
If @error Then ContinueLoop
GUICtrlSendMsg($nSig, 0x14B, 0, 0)
$combo="3. "&$tmp
GUICtrlSetData($nSig,$LngSpk&'|'&$LngMSpk&'|'&$combo, $combo)
Case $msg = $nOK
$s=1
$nHour0=GUICtrlRead($nHour)
$nMin0=GUICtrlRead($nMin)
$nSec0=GUICtrlRead($nSec)
$nSig0=GUICtrlRead($nSig)
If $nHour0+$nMin0+$nSec0 = 0 Then
MsgBox(0, $LngErr, $LngErrMsg4)
ContinueLoop
EndIf
$iTimeSig=$nHour0*3600+$nMin0*60+$nSec0
If $nHour0 < 10 Then $nHour0='0'&$nHour0
If $nMin0 < 10 Then $nMin0='0'&$nMin0
If $nSec0 < 10 Then $nSec0='0'&$nSec0
GUICtrlSetData($hSg,'Sg - '&$nHour0&':'&$nMin0&':'&$nSec0&'.0')
_Reset()
_Start()
ContinueCase
Case $msg = -3
$msg = $Gui
$GuiPos = WinGetPos($Gui1)
GUIDelete($Gui1)
WinMove($Gui, "", $GuiPos[0], $GuiPos[1])
GUISetState(@SW_SHOW, $Gui)
ExitLoop
EndSelect
WEnd
EndFunc
Func _IniText()
If $IniText<>'' Then
;UDF File.au3
If StringInStr($IniText, @LF) Then
$aIniText = StringSplit(StringStripCR($IniText), @LF)
ElseIf StringInStr($IniText, @CR) Then
$aIniText = StringSplit($IniText, @CR)
Else
If StringLen($IniText) Then
Dim $aIniText[2] = [1, $IniText]
Else
MsgBox(0, $LngErr, "Error ini")
Exit
EndIf
EndIf
EndIf
EndFunc
Func _bk()
GUICtrlSetFont(-1, 20, $Bold, -1, 'Arial')
GUICtrlSetColor(-1, 0xc03d3a)
GUICtrlSetBkColor(-1, 0xffffff)
EndFunc
Func _Start()
If $Tr2 = 1 Then Return
If $Tr1 = 0 Then
$Tr1 = 1
$Tr3 = 1
$L=0
GUICtrlSetData($Start, $LngSp)
GUICtrlSetState($Pause0,64)
$iStart = TimerInit()
Else
$Tr1 = 0
$Tr3 = 0
GUICtrlSetData($Start, $LngStart)
GUICtrlSetState($Pause0,128)
EndIf
EndFunc
Func _Reset()
$sLabel=' 00:00:00.0'
$Tr1 = 0
$Tr2 = 0
$Tr3 = 0
$iTime=0
$L=0
GUICtrlSetData($hLabel1, ' 00')
GUICtrlSetData($hLabel2, '00')
GUICtrlSetData($hLabel3, '00')
GUICtrlSetData($hLabel4, '0')
For $n = 1 to 5
GUICtrlSetColor(Eval("hM"&$n), 0x000000)
GUICtrlSetData(Eval("hM"&$n), 'M'&$n&' - 00:00:00.0')
Next
$n = 1
GUICtrlSetData($Start, $LngStart)
GUICtrlSetState($Start,64)
GUICtrlSetData($Pause0, $LngPs)
GUICtrlSetState($Pause0,128)
EndFunc
Func _MP($nSi2)
$nSi2=StringTrimLeft($nSi2, 3)
$melod= '#NoTrayIcon' & @CRLF & _
'SoundPlay("'&$nSi2&'", 0)' & @CRLF & _
'MsgBox(0, "Message", "Stop?")'
$file = FileOpen(@TempDir&'\Beepfile.au3',2)
FileWrite($file, $melod)
FileClose($file)
$pid=Run(@AutoItExe&' /AutoIt3ExecuteScript "'&@TempDir&'\Beepfile.au3"', '', @SW_HIDE)
EndFunc
Func _StartFile($nSi2)
$type=StringRegExpReplace($nSi2, '.*\.(\S+)', '\1')
$astype = RegRead('HKEY_CLASSES_ROOT\.' & $type, "")
$astype = RegRead('HKEY_CLASSES_ROOT\' & $astype & '\shell\open\command', "")
$nSi2=StringTrimLeft($nSi2, 3)
If @error = 1 Then
ShellExecute($nSi2)
Return
EndIf
$aPathexe=StringRegExpReplace($astype, '(^.*)exe(.*)$', '\1')
If @error = 1 Then
ShellExecute($nSi2)
Return
EndIf
$aPathexe = StringReplace($aPathexe, '"', '')
If FileExists($aPathexe & 'exe') Then
$filename=StringRegExpReplace($aPathexe & 'exe', '(^.*)\\(.*)$', '\2')
If ProcessExists($filename) Then
$aProsname=ProcessList ($filename)
$pid=$aProsname[1][1]
Run('"'&$aPathexe&'exe" "'&$nSi2&'"')
Else
$pid=Run('"'&$aPathexe&'exe" "'&$nSi2&'"')
EndIf
Else
ShellExecute($nSi2)
Return
EndIf
EndFunc
Func _melodia()
$melod= '#NoTrayIcon' & @CRLF & _
'Global $nTempo=0.8'&@CRLF&'Global $iTone=0'&@CRLF&'HotKeySet("{ESC}", "_Quit")'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100,100)' & @CRLF & _
'_Beep(1,5,100,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100,100)'&@CRLF&'_Beep(12,4,100,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(6,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(6,4,100)'&@CRLF&'_Beep(5,4,100)'&@CRLF&'_Beep(4,4,200,300)'&@CRLF&'_Beep(1,5,100)' & @CRLF & _
'_Beep(12,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(1,5,100,100)' & @CRLF & _
'_Beep(6,5,100,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)' & @CRLF & _
'_Beep(8,4,100)'&@CRLF&'_Beep(1,5,100,100)'&@CRLF&'_Beep(4,5,100,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(3,4,100)' & @CRLF & _
'_Beep(7,4,100)'&@CRLF&'_Beep(10,4,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(3,5,250,250)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100,100)' & @CRLF & _
'_Beep(1,5,100,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100,100)'&@CRLF&'_Beep(12,4,100,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(7,4,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(6,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(6,4,100)'&@CRLF&'_Beep(5,4,100)'&@CRLF&'_Beep(4,4,200,300)'&@CRLF&'_Beep(1,5,100)' & @CRLF & _
'_Beep(12,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(1,5,100,100)' & @CRLF & _
'_Beep(6,5,100,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)' & @CRLF & _
'_Beep(8,4,100)'&@CRLF&'_Beep(1,5,100,100)'&@CRLF&'_Beep(4,5,100,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(12,4,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(8,5,100)'&@CRLF&'_Beep(6,5,100)' & @CRLF & _
'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,300,200)'&@CRLF&'_Beep(3,5,100)' & @CRLF
$melod&= _
'_Beep(1,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(4,4,100)' & @CRLF & _
'_Beep(8,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(4,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(11,4,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(1,5,150,150)'&@CRLF&'_Beep(9,4,200,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(11,4,100)' & @CRLF & _
'_Beep(3,4,100)'&@CRLF&'_Beep(6,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(3,4,100)' & @CRLF & _
'_Beep(6,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(1,5,150,150)' & @CRLF & _
'_Beep(8,4,200,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(6,5,100)' & @CRLF & _
'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(3,5,150,150)' & @CRLF & _
'_Beep(11,4,300,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(3,5,100)' & @CRLF & _
'_Beep(1,5,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(11,4,400,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(11,4,100)' & @CRLF & _
'_Beep(4,4,100)'&@CRLF&'_Beep(8,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(4,4,100)' & @CRLF & _
'_Beep(8,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(1,5,150,150)' & @CRLF & _
'_Beep(9,4,200,100)'&@CRLF&'_Beep(3,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(12,4,100)' & @CRLF & _
'_Beep(11,4,100)'&@CRLF&'_Beep(3,4,100)'&@CRLF&'_Beep(6,4,100)'&@CRLF&'_Beep(11,4,100)' & @CRLF & _
'_Beep(3,4,100)'&@CRLF&'_Beep(6,4,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(12,4,100)' & @CRLF & _
'_Beep(1,5,150,150)'&@CRLF&'_Beep(8,4,150,150)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)' & @CRLF & _
'_Beep(2,5,100)'&@CRLF&'_Beep(1,5,100)'&@CRLF&'_Beep(12,4,100)'&@CRLF&'_Beep(1,5,100)' & @CRLF & _
'_Beep(3,5,100)'&@CRLF&'_Beep(6,5,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)' & @CRLF & _
'_Beep(1,5,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(4,5,100)' & @CRLF & _
'_Beep(8,5,100)'&@CRLF&'_Beep(11,5,100)'&@CRLF&'_Beep(10,5,100)'&@CRLF&'_Beep(9,5,100)' & @CRLF & _
'_Beep(8,5,100)'&@CRLF&'_Beep(6,5,100)'&@CRLF&'_Beep(4,5,100)'&@CRLF&'_Beep(3,5,100)' & @CRLF & _
'_Beep(1,5,100)'&@CRLF&'_Beep(11,4,100)'&@CRLF&'_Beep(9,4,100)'&@CRLF&'_Beep(8,4,100)' & @CRLF & _
'_Beep(6,4,100)'&@CRLF&'_Beep(4,4,200)' & @CRLF & _
'Func _Beep($iNote,$iOctave=4,$iDuration=200,$iPause=0)' & @CRLF & _
' $iFrequency=440*2^(($iNote+$iTone)/12+$iOctave+1/6-4)' & @CRLF & _
' Beep($iFrequency, $iDuration/$nTempo)' & @CRLF & _
' If $iPause<>0 Then Sleep($iPause/$nTempo)' & @CRLF & _
'EndFunc' & @CRLF & _
'Func _Quit()' & @CRLF & _
' Exit' & @CRLF & _
'EndFunc'
$file = FileOpen(@TempDir&'\Beepfile.au3',2)
FileWrite($file, $melod)
FileClose($file)
$pid=Run(@AutoItExe&' /AutoIt3ExecuteScript "'&@TempDir&'\Beepfile.au3"', '', @SW_HIDE)
EndFunc
Func _About()
$GuiPos = WinGetPos($Gui)
GUISetState(@SW_HIDE, $Gui)
$font="Arial"
$Gui1 = GUICreate($LngAbout, 270, 180,$GuiPos[0], $GuiPos[1], -1, 0x00000080)
GUISetBkColor (0xf8c848)
GUICtrlCreateLabel($LngTitle, 0, 20, 270, 33, 0x01)
GUICtrlSetFont (-1,15, 600, -1, $font)
GUICtrlSetColor(-1,0xa21a10)
GUISetFont (9, 600, -1, $font)
GUICtrlCreateLabel($LngVer&' 0.5 2.09.2010', 55, 100, 210, 17)
GUICtrlCreateLabel($LngSite&':', 55, 115, 40, 17)
$url=GUICtrlCreateLabel('http://azjio.ucoz.ru', 92, 115, 170, 17)
GUICtrlSetCursor(-1, 0)
GUICtrlSetColor(-1, 0x0000ff)
GUICtrlCreateLabel('WebMoney: R939163939152', 55, 130, 210, 17)
GUICtrlCreateLabel('Copyright AZJIO © 2010', 55, 145, 210, 17)
GUISetState(@SW_SHOW, $Gui1)
$msg = $Gui1
While 1
$msg = GUIGetMsg()
Select
Case $msg = $url
ShellExecute ('http://azjio.ucoz.ru')
Case $msg = -3
$msg = $Gui
GUIDelete($Gui1)
GUISetState(@SW_SHOW, $Gui)
ExitLoop
EndSelect
WEnd
EndFunc