#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
Local $hGui, $OptionsBtn, $OptionsDummy, $OptionsContext, $OptionsCommon, $OptionsFile, $msg
Global $GUI_Button_Back, $GUI_Button_Forward,$Command , $Enable
Global Const $CSC_NAVIGATEFORWARD = 0x00000001
Global Const $CSC_NAVIGATEBACK = 0x00000002
Local $oIE, $GUIActiveX
Local $GUI_Button_Home, $GUI_Button_Stop, $msg
$oIE = ObjCreate("Shell.Explorer.2")
$hGui= GUICreate("", @DesktopWidth, @DesktopHeight-68,0,0,$WS_OVERLAPPEDWINDOW)
$OptionsBtn = GUICtrlCreateButton("", 963, 4, 28, 22, $BS_FLAT+$BS_BITMAP)
FileInstall('set.bmp', @TempDir & '\set.bmp')
GUICtrlSetImage(-1, @TempDir & '\set.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\set.bmp')
$OptionsDummy = GUICtrlCreateDummy()
$OptionsContext = GUICtrlCreateContextMenu($OptionsDummy)
$OptionsCommon = GUICtrlCreateMenuItem("Brown", $OptionsContext)
$OptionsFile = GUICtrlCreateMenuItem("Beige", $OptionsContext)
$OptionsExit = GUICtrlCreateMenuItem("Grey", $OptionsContext)
GuiCtrlCreateMenuitem ("", $OptionsDummy )
$configuration = GUICtrlCreateMenuItem("Config. PC", $OptionsContext)
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 32, @DesktopWidth-20, @DesktopHeight-115)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 4, 28, 23,$BS_BITMAP)
FileInstall('back.bmp', @TempDir & '\back.bmp')
GUICtrlSetImage(-1, @TempDir & '\back.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\back.bmp')
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 80, 4, 28,23,$BS_BITMAP)
FileInstall('front.bmp', @TempDir & '\front.bmp')
GUICtrlSetImage(-1, @TempDir & '\front.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\front.bmp')
$GUI_Button_Home = GUICtrlCreateButton("Home", 45, 4, 28, 23,$BS_BITMAP)
FileInstall('update.bmp', @TempDir & '\update.bmp')
GUICtrlSetImage(-1, @TempDir & '\update.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\update.bmp')
$Search=GUICtrlCreateInput("",115,5,215,23)
GUICtrlSetFont(-1, 14, 400, 2, "")
GUICtrlSetCursor (-1, 5)
$GUI_Button_Search = GUICtrlCreateButton("Search",340, 4, 73, 23,$BS_BITMAP)
FileInstall('Search.bmp', @TempDir & '\Search.bmp')
GUICtrlSetImage(-1, @TempDir & '\Search.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\Search.bmp')
$GUI_Button_www = GUICtrlCreateButton("RUN",705, 4, 73, 23,$BS_BITMAP)
FileInstall('run.bmp', @TempDir & '\run.bmp')
GUICtrlSetImage(-1, @TempDir & '\run.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\run.bmp')
GUICtrlCreateLabel("|", 420, 0, 10, 30)
GUICtrlSetColor(-1, 0xcbcbcb)
GUICtrlSetFont(-1, 18, 400, 2, "")
ObjEvent($oIE, "IEEvent_")
$www=GUICtrlCreateInput("",485,5,210,23)
GUICtrlSetFont(-1, 14, 400, 2, "")
$htt=GUICtrlCreateLabel("http://", 430, 5, 50, 24)
$htt= GUICtrlSetFont(-1, 14, 400, 0, "")
$htt=GUICtrlSetColor(-1, 0xcbcbcb)
$oIE.navigate("http://www.google.ru/")
$tube = GUICtrlCreateButton("", 800, 4, 28,23,$BS_BITMAP)
FileInstall('tube.bmp', @TempDir & '\tube.bmp')
GUICtrlSetImage(-1, @TempDir & '\tube.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\tube.bmp')
GUICtrlCreateLabel("|", 945, 0, 10, 30)
GUICtrlSetColor(-1, 0xcbcbcb)
GUICtrlSetFont(-1, 18, 400, 2, "")
GUICtrlSetFont(-1, 18, 400, 2, "")
$wik = GUICtrlCreateButton("", 835, 4, 28,23,$BS_BITMAP)
FileInstall('w.bmp', @TempDir & '\w.bmp')
GUICtrlSetImage(-1, @TempDir & '\w.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\w.bmp')
$mail = GUICtrlCreateButton("", 870, 4, 28,23,$BS_BITMAP)
FileInstall('@.bmp', @TempDir & '\@.bmp')
GUICtrlSetImage(-1, @TempDir & '\@.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\@.bmp')
$v = GUICtrlCreateButton("", 905, 4, 28,23,$BS_BITMAP)
FileInstall('v.bmp', @TempDir & '\v.bmp')
GUICtrlSetImage(-1, @TempDir & '\v.bmp', -1)
GUISetState()
FileDelete(@TempDir & '\v.bmp')
GUICtrlCreateLabel("|", 785, 0, 10, 30)
GUICtrlSetFont(-1, 18, 400, 2, "")
GUICtrlSetColor(-1, 0xcbcbcb)
ControlDisable("","",$GUI_Button_Back)
ControlDisable("","",$GUI_Button_Forward )
GUISetState()
ObjEvent($oIE, "IEEvent_")
while 1
$msg = GUIGetMsg()
Select
Case $msg = $OptionsCommon
$Gui=GUISetBkColor(0x8B4513)
Case $msg = $OptionsFile
$Gui=GUISetBkColor(0xF5F5DC)
Case $msg = $OptionsExit
$Gui=GUISetBkColor(0x9C9C9C)
Case $msg = $OptionsBtn
ShowMenu($hGui, $msg, $OptionsContext)
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg =$mail
$oIE.navigate("http://mail.ru")
Case $msg =$v
$oIE.navigate("http://vk.com")
Case $msg = $wik
$oIE.navigate("http://ru.wikipedia.org")
Case $msg = $GUI_Button_Home
Send('{F5}')
Case $msg = $GUI_Button_Back
$oIE.GoBack
Case $msg = $GUI_Button_Forward
$oIE.GoForward
Case $msg = $tube
$oIE.navigate("http://www.youtube.com/")
case $msg = $GUI_Button_www
$oIE.navigate("http://www."&GUICtrlRead($www))
Case $msg = $GUI_Button_Search
$oIE.navigate("http://www.google.com/search?aq=UTF-8&q="&GUICtrlRead($Search))
Case $msg = $configuration
_Main()
Func _Main()
Local $VOL, $SERIAL, $TOTAL, $FREE
Local $Input_ComputerName, $Input_CurrentUserName, $Input_OperatingSystem
Local $Input_ServicePack, $Input_VolumeLabel, $Input_SerialNumber
Local $Input_TotalSpace, $Input_FreeSpace, $Input_IpAddress, $Input_StartupDirectory
Local $Input_WindowsDirectory, $Input_SystemFolderDirectory, $Input_DesktopDirectory
Local $Input_MyDocumentsDirectory, $Input_ProgramFilesDirectory, $Input_StartMenuDirectory
Local $Input_TemporaryFileDirectory, $Input_DesktopWidth, $Input_DesktopHeight
Local $Input_Date, $Input_Time, $msg2
GUICreate("PC Configuration", 469, 639, (@DesktopWidth - 469) / 2, (@DesktopHeight - 639) / 2, $WS_SYSMENU)
$VOL = DriveGetLabel("C:\")
$SERIAL = DriveGetSerial("C:\")
$TOTAL = DriveSpaceTotal("C:\")
$FREE = DriveSpaceFree("C:\")
GUICtrlCreateLabel("Computer Name", 10, 10, 150, 20)
GUICtrlCreateLabel("Current User Name", 10, 40, 150, 20)
GUICtrlCreateLabel("Operating System", 10, 70, 150, 20)
GUICtrlCreateLabel("Service Pack", 10, 100, 150, 20)
GUICtrlCreateLabel("C: Volume Label", 10, 130, 150, 20)
GUICtrlCreateLabel("C: Serial Number", 10, 160, 150, 20)
GUICtrlCreateLabel("C: Total Space", 10, 190, 150, 20)
GUICtrlCreateLabel("C: Free Space", 10, 220, 150, 20)
GUICtrlCreateLabel("IP Address", 10, 250, 150, 20)
GUICtrlCreateLabel("Startup Directory", 10, 280, 150, 20)
GUICtrlCreateLabel("Windows Directory", 10, 310, 150, 20)
GUICtrlCreateLabel("System Folder Directory", 10, 340, 150, 20)
GUICtrlCreateLabel("Desktop Directory", 10, 370, 150, 20)
GUICtrlCreateLabel("My Documents Directory", 10, 400, 150, 20)
GUICtrlCreateLabel("Program File Directory", 10, 430, 150, 20)
GUICtrlCreateLabel("Start Menu Directory", 10, 460, 150, 20)
GUICtrlCreateLabel("Desktop Width (Pixels)", 10, 520, 150, 20)
GUICtrlCreateLabel("Temporary File Directory", 10, 490, 150, 20)
GUICtrlCreateLabel("Desktop Height (Pixels)", 10, 550, 150, 20)
GUICtrlCreateLabel("Date", 10, 580, 150, 20)
GUICtrlCreateLabel("Time", 10, 610, 150, 20)
$Input_ComputerName = GUICtrlCreateInput("" & @ComputerName, 180, 10, 280, 20)
$Input_CurrentUserName = GUICtrlCreateInput("" & @UserName, 180, 40, 280, 20)
$Input_OperatingSystem = GUICtrlCreateInput("" & @OSTYPE, 180, 70, 280, 20)
$Input_ServicePack = GUICtrlCreateInput("" & @OSServicePack, 180, 100, 280, 20)
$Input_VolumeLabel = GUICtrlCreateInput("" & $VOL, 180, 130, 280, 20)
$Input_SerialNumber = GUICtrlCreateInput("" & $SERIAL, 180, 160, 280, 20)
$Input_TotalSpace = GUICtrlCreateInput("" & $TOTAL, 180, 190, 280, 20)
$Input_FreeSpace = GUICtrlCreateInput("" & $FREE, 180, 220, 280, 20)
$Input_IpAddress = GUICtrlCreateInput("" & @IPAddress1, 180, 250, 280, 20)
$Input_StartupDirectory = GUICtrlCreateInput("" & @StartupDir, 180, 280, 280, 20)
$Input_WindowsDirectory = GUICtrlCreateInput("" & @WindowsDir, 180, 310, 280, 20)
$Input_SystemFolderDirectory = GUICtrlCreateInput("" & @SystemDir, 180, 340, 280, 20)
$Input_DesktopDirectory = GUICtrlCreateInput("" & @DesktopDir, 180, 370, 280, 20)
$Input_MyDocumentsDirectory = GUICtrlCreateInput("" & @MyDocumentsDir, 180, 400, 280, 20)
$Input_ProgramFilesDirectory = GUICtrlCreateInput("" & @ProgramFilesDir, 180, 430, 280, 20)
$Input_StartMenuDirectory = GUICtrlCreateInput("" & @StartMenuDir, 180, 460, 280, 20)
$Input_TemporaryFileDirectory = GUICtrlCreateInput("" & @TempDir, 180, 490, 280, 20)
$Input_DesktopWidth = GUICtrlCreateInput("" & @DesktopWidth, 180, 520, 280, 20)
$Input_DesktopHeight = GUICtrlCreateInput("" & @DesktopHeight, 180, 550, 280, 20)
$Input_Date = GUICtrlCreateInput("(MONTH)(DAY)(YEAR) " & @MON & "-" & @MDAY & "-" & @YEAR, 180, 580, 280, 20)
$Input_Time = GUICtrlCreateInput("(HOUR)(MIN)(SEC) " & @HOUR & ":" & @MIN & ":" & @SEC, 180, 610, 280, 20)
GUISetState()
EndFunc
EndSelect
wend
GUIDelete()
Func IEEvent_CommandStateChange($command, $enable)
Switch $command
Case $CSC_NAVIGATEBACK
If $enable = True Then
ControlEnable("","",$GUI_Button_Back)
Else
ControlDisable("","",$GUI_Button_Back)
EndIf
Case $CSC_NAVIGATEFORWARD
If $enable = True Then
ControlEnable("","",$GUI_Button_Forward)
Else
ControlDisable("","",$GUI_Button_Forward )
EndIf
EndSwitch
EndFunc
Func ShowMenu($hWnd, $CtrlID, $nContextID)
Local $arPos, $x, $y
Local $hMenu = GUICtrlGetHandle($nContextID)
$arPos = ControlGetPos($hWnd, "", $CtrlID)
$x = $arPos[0]
$y = $arPos[1] + $arPos[3]
ClientToScreen($hWnd, $x, $y)
TrackPopupMenu($hWnd, $hMenu, $x, $y)
EndFunc
Func ClientToScreen($hWnd, ByRef $x, ByRef $y)
Local $stPoint = DllStructCreate("int;int")
DllStructSetData($stPoint, 1, $x)
DllStructSetData($stPoint, 2, $y)
DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint))
$x = DllStructGetData($stPoint, 1)
$y = DllStructGetData($stPoint, 2)
$stPoint = 0
EndFunc
Func TrackPopupMenu($hWnd, $hMenu, $x, $y)
DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0)
EndFunc