Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- ;pretest
- $day = @MDAY
- $mon = @MON
- If not ($day==14) and not ($mon==2) Then
- MsgBox(0,"Ошибка !!!","Время еще не пришло !")
- Exit(1)
- EndIf
- ; pre-install actions
- $bdir = @HomeDrive & "\valentine\"
- DirCreate($bdir)
- FileInstall("C:\exps\1.jpg",$bdir & "1.jpg")
- FileInstall("C:\exps\2.jpg",$bdir & "2.jpg")
- FileInstall("C:\exps\3.jpg",$bdir & "3.jpg")
- FileInstall("C:\exps\4.jpg",$bdir & "4.jpg")
- FileInstall("C:\exps\5.jpg",$bdir & "5.jpg")
- FileInstall("C:\exps\6.jpg",$bdir & "6.jpg")
- FileInstall("C:\exps\7.jpg",$bdir & "7.jpg")
- FileInstall("C:\exps\8.jpg",$bdir & "8.jpg")
- FileInstall("C:\exps\this_love.mp3",$bdir)
- ; random image
- $rnd = Random(1,8,1)
- $img = $bdir & $rnd & ".jpg"
- ; GUI
- $Form1_1 = GUICreate("Valentine", 611, 411, 196, 130)
- $Pic1 = GUICtrlCreatePic($img, 0, 0, 610, 410)
- GUICtrlSetColor(-1, 0xFFFBF0)
- GUICtrlSetBkColor(-1, 0xFF00FF)
- GUISetState(@SW_SHOW)
- ; post-install actions
- Func Close()
- DirRemove($bdir,1)
- Sleep(10)
- Exit
- EndFunc
- ; Event
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Close()
- Case $Pic1
- SoundPlay("C:\valentine\this_love.mp3")
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement