#######################################
#Coder: HellDashX5 #
#Date: 31/07/2010 #
#Vietata la copia : parziale o totale!#
#Info: v.1.0
[email protected] #
#Autore del gioco mines xMasteRx #
#######################################
#include <guiconstants.au3>
#include <file.au3>
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
ProgressOn("Apertura...","Attendere ....")
For $I = 1 to 100 step 50
sLeep(50)
ProgressSet( $I, $I & " %")
Next
ProgressSet(100 , "Fine", "Completo!")
sleep(500)
ProgressOff()
GuiCreate("HSX Utility v.1.0",312,550,545,104)
$button1=GuiCtrlCreateButton("Calcolatrice",20,26,125,50)
GUICtrlSetCursor (-1, 0)
$button2=GuiCtrlCreateButton("Autoit Filer",160,26,125,50)
GUICtrlSetCursor (-1, 0)
$button3=GuiCtrlCreateButton("Esegui",20,90,125,50)
GUICtrlSetCursor (-1, 0)
$button4=GuiCtrlCreateButton("Process Killer",160,90,125,50)
GUICtrlSetCursor (-1, 0)
$button5=GuiCtrlCreateButton("Criptatore",20,155,125,50)
GUICtrlSetCursor (-1, 0)
$button6=GuiCtrlCreateButton("BAT Antivirus",160,155,125,50)
GUICtrlSetCursor (-1, 0)
$button7=GuiCtrlCreateButton("???",160,215,125,50)
$button8=GuiCtrlCreateButton("Trova IP",20,215,125,50)
GUICtrlSetCursor (-1, 0)
$button9=GuiCtrlCreateButton("Mines",20,275,125,50)
GUICtrlSetCursor (-1, 0)
$button10=GuiCtrlCreateButton("Credits",160,275,125,50)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
GUISetBkColor(0x000000)
GUICtrlCreatePic(@scriptdir&"\ringraziamenti.jpg", -10, 330, 332, 246)
;Label
$Data = GUICtrlCreateLabel(@MDAY& "/" &@MON& "/" &@YEAR,175,0,60,15,0)
$Ora = GUICtrlCreateLabel(@HOUR& ":" &@MIN& ":" &@SEC,240,0,90,15,0)
;Color
GUICtrlSetBkColor($button1,"#000000")
GUICtrlSetColor($button1,0xff0000)
GUICtrlSetBkColor($button2,"#000000")
GUICtrlSetColor($button2,0xff0000)
GUICtrlSetBkColor($button3,"#000000")
GUICtrlSetColor($button3,0xff0000)
GUICtrlSetBkColor($button4,"#000000")
GUICtrlSetColor($button4,0xff0000)
GUICtrlSetBkColor($button5,"#000000")
GUICtrlSetColor($button5,0xff0000)
GUICtrlSetBkColor($button6,"#000000")
GUICtrlSetColor($button6,0xff0000)
GUICtrlSetBkColor($button7,"#000000")
GUICtrlSetColor($button7,0xff0000)
GUICtrlSetBkColor($button8,"#000000")
GUICtrlSetColor($button8,0xff0000)
GUICtrlSetBkColor($button9,"#000000")
GUICtrlSetColor($button9,0xff0000)
GUICtrlSetBkColor($button10,"#000000")
GUICtrlSetColor($button10,0xff0000)
GUICtrlSetColor($Data,"0xff0000")
GUICtrlSetColor($Ora,"0xff0000")
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
case $msg = $button1
#include <guiconstants.au3>
#include <buttonconstants.au3>
#include <guiconstantsex.au3>
#NoTrayIcon
GUICreate ("Calcolatrice",230,250)
$Input1 = GUICtrlCreateInput("", 8, 8, 193, 21)
$menu2=GuiCtrlCreateMenu("File")
$chiudi=GUICtrlCreateMenuItem("Chiudi",$menu2)
$menu=GuiCtrlCreateMenu("About")
$about=GUICtrlCreateMenuItem("About",$menu)
$menu1=GuiCtrlCreateContextMenu()
$about1=GuiCtrlCreateMenuItem("About",$menu1)
$chiudi1=GuiCtrlCreateMenuItem("Chiudi",$menu1)
$button1 = GUICtrlCreateButton ("1",25,35,30,30)
$button2 = GUICtrlCreateButton ("2",65,35,30,30)
$button3 = GUICtrlCreateButton ("3",105,35,30,30)
$button4 = GUICtrlCreateButton ("4",25,75,30,30)
$button5 = GUICtrlCreateButton ("5",65,75,30,30)
$button6 = GUICtrlCreateButton ("6",105,75,30,30)
$button7 = GUICtrlCreateButton ("7",25,115,30,30)
$button8 = GUICtrlCreateButton ("8",65,115,30,30)
$button9 = GUICtrlCreateButton ("9",105,115,30,30)
$button0=GUICtrlCreateButton("0",65,155,30,30)
$uguale = GUICtrlCreateButton ("=",25,195,112,30)
$buttonpiu = GUICtrlCreateButton ("+",145,35,30,30)
$buttonmeno = GUICtrlCreateButton ("-",145,75,30,30)
$buttonper = GUICtrlCreateButton ("x",145,115,30,30)
$buttondiviso = GUICtrlCreateButton (":",145,155,30,30)
$del = GUICtrlCreateButton("DEL",105,155,30,30)
$buttonpun=GUICtrlCreateButton(".",25,155,30,30)
$buttonpotenza=GUICtrlCreateButton("?","145","195","30","30")
$operator1 = 0
$operator2 = 0
$result = 0
$piu = 0
$meno = 0
$per = 0
$diviso = 0
$potenza = 0
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
$ris = GUICtrlRead ($Input1)
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData ($Input1, $ris&"1")
Case $Button2
GUICtrlSetData ($Input1, $ris&"2")
Case $Button3
GUICtrlSetData ($Input1, $ris&"3")
Case $Button4
GUICtrlSetData ($Input1, $ris&"4")
Case $Button5
GUICtrlSetData ($Input1, $ris&"5")
Case $Button6
GUICtrlSetData ($Input1, $ris&"6")
Case $Button7
GUICtrlSetData ($Input1, $ris&"7")
Case $Button8
GUICtrlSetData ($Input1, $ris&"8")
Case $Button9
GUICtrlSetData ($Input1, $ris&"9")
Case $Button0
GUICtrlSetData ($Input1, $ris&"0")
Case $Buttonpun
GUICtrlSetData ($Input1, $ris&",")
Case $uguale
$esegui = Execute ($ris)
GUICtrlSetData ($Input1, $esegui)
Case $Buttonpiu
If $ris = "" Then
MsgBox (48, "ERRORE!", "Errore controlla di avere eseguito tutto correttamente!")
Else
GUICtrlSetData ($Input1, $ris&"+")
EndIF
Case $Buttonmeno
If $ris = "" Then
MsgBox (48, "ERRORE!", "Errore controlla di avere eseguito tutto correttamente!")
Else
GUICtrlSetData ($Input1, $ris&"-")
EndIF
Case $Buttonper
If $ris = "" Then
MsgBox (48, "ERRORE!", "Errore controlla di avere eseguito tutto correttamente!")
Else
GUICtrlSetData ($Input1, $ris&"*")
EndIF
Case $Buttondiviso
If $ris = "" Then
MsgBox (48, "ERRORE!", "Errore controlla di avere eseguito tutto correttamente!")
Else
GUICtrlSetData ($Input1, $ris&":")
EndIf
Case $Buttonpotenza
If $ris = "" Then
MsgBox (48, "ERRORE!", "Errore controlla di avere eseguito tutto correttamente!")
Else
GUICtrlSetData ($Input1, $ris&"?")
EndIf
Case $del
GUICtrlSetData ($Input1, "")
Case $about
MsgBox(0,"About","Credits" & @CRLF & "by HellDashX5/SXhell" & @CRLF & "per info o bug:
[email protected]")
Case $about1
MsgBox(0,"About","Credits" & @CRLF & "by HellDashX5/SXhell" & @CRLF & "per info o bug:
[email protected]")
Case $chiudi
Exit
Case $chiudi1
Exit
EndSwitch
WEnd
case $msg = $button10
MsgBox (32, "About the author", "Software creato da HellDashX5 per info,bug contattatemi a
[email protected]" & @CRLF & "Autore del gioco mines:xMasteRx ")
case $msg = $button2
#include <guiconstants.au3>
#include <file.au3>
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
$SD=0
$SF=0
GUICreate("Autoit Filer", 340, 550)
$menu1 = guictrlcreatemenu ("File")
$obj_menu1 = GUICtrlCreateMenuItem ("Apri", $menu1)
$obj_menu2 = GUICtrlCreateMenuItem ("Salva", $menu1)
$obj_menu3 = GUICtrlCreateMenuItem ("Esci", $menu1)
$menu2 = GUICtrlCreateMenu ("About")
$obj_menu4 = GUICtrlCreateMenuItem ("About the author", $menu2)
GUICtrlCreateLabel ("inserire il nome del file da creare", 10, 280)
$input = GUICtrlCreateInput ("", 190, 280, 100)
GUICtrlCreateLabel ("inserire il testo da inserire nel file", 10, 300)
$edit = GUICtrlCreateEdit ("", 10, 320, 300,200)
GUISetState ()
HotKeySet ("^a", 'apri')
HotKeySet ("^s", 'salva')
HotKeySet ("^e", 'esci')
HotKeySet ("^i", 'info')
$File = GUICtrlCreateInput("", 8, 8, 233, 21)
$File_ = GUICtrlCreateButton("...", 248, 8, 41, 25)
GUICtrlCreateGroup("File", 0, 80, 297, 177)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Date = GUICtrlCreateLabel("Date: ", 8, 40, 180, 17)
$Size = GUICtrlCreateLabel("Size: ", 152, 40, 137, 17)
$Version = GUICtrlCreateLabel("Version: ", 8, 64, 130, 17)
$Read = GUICtrlCreateButton("Read", 8, 128, 137, 25)
$Copy = GUICtrlCreateButton("Copy", 152, 128, 137, 25)
$WSearch = GUICtrlCreateButton("Word Search", 8, 96, 137, 25)
$Move = GUICtrlCreateButton("Move", 8, 160, 137, 25)
$Del = GUICtrlCreateButton("Delete", 152, 96, 137, 25)
;File End
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Case -3
Exit
;File
Case $File_
$FilSel=FileOpenDialog("Select the file", @DesktopDir&"\", "File (*.*)", 1)
GUICtrlSetData($File,"")
GUICtrlSetData($File,$FilSel)
$GetSize=FileGetSize($FilSel)
GUICtrlSetData($Size,GUICtrlRead($Size)&Round($GetSize / 1024 / 1024)&" Mb")
GUICtrlSetData($Version,GUICtrlRead($Version)&FileGetVersion($FilSel))
$t=FileGetTime($FilSel, 1)
$SF=1
Case $Read
If $SF=1 Then
$Open = FileOpen(GUICtrlRead($File), 0)
$Line=1
$Percorso="Read "&@MSEC&".txt"
While 1
$ReadLine=FileReadLine($Open, $Line)
If @error Then ExitLoop
FileWrite($Percorso, $Line&"|"&$ReadLine&@CRLF)
$Line=$Line+1
WEnd
MsgBox(64, "Read file create", "Read file create: "&$Percorso)
Else
MsgBox(48, "Error", "Error")
EndIf
Case $Copy
If $SF=1 Then
$DestF=FileSaveDialog("Choose a name.", @DesktopDir&"\", "File (*.*)", 2)
FileCopy(GUICtrlRead($File), $DestF)
Else
MsgBox(48, "Error", "Error")
EndIf
Case $Move
If $SF=1 Then
$DestF=FileSaveDialog("Choose a name.", @DesktopDir&"\", "File (*.*)", 2)
FileMove(GUICtrlRead($File), $DestF)
Else
MsgBox(48, "Error", "Error")
EndIf
Case $WSearch
If $SF=1 Then
$Parola=InputBox("Insert word", "Insert word to find")
$Sea=FileReadLine(GUICtrlRead($File))
If @error Then Exit
If $Sea=$Parola Then
MsgBox(64, "Word exist!", "Word exist!")
Else
MsgBox(48, "Error", "Word not exist")
EndIf
Else
MsgBox(48, "Error", "Error")
EndIf
Case $Del
If $SF=1 Then
$Msg=MsgBox(4, "You are sure?", "You are sure to delete the file?")
If $Msg=6 Then
FileDelete(GUICtrlRead($File))
Else
MsgBox(48, "Annulated","Action annulated")
EndIf
Else
MsgBox(48, "Error", "Error")
EndIf
EndSwitch
$msg = GUIGetMsg()
Select
case $msg = $obj_menu1
$file = FileOpenDialog("Selezionare file",@DesktopDir,"All (*.*)")
GUICtrlSetData ($edit, FileRead ($file ))
GUICtrlSetData ($input, $file)
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
case $msg = $obj_menu2
filedelete ($file)
_FileCreate (guictrlread ($input))
FileOpen(guictrlread ($input), 1)
FileWriteLine (guictrlread ($input), guictrlread ($edit))
case $msg = $obj_menu4
MsgBox (32, "About the author", "Autoit Filer by HellDashX5"&@crlf&"per info o bug:
[email protected]")
case $msg = $obj_menu3
ExitLoop
Case $msg = $File_
$FilSel=FileOpenDialog("Select the file", @DesktopDir&"\", "File (*.*)", 1)
GUICtrlSetData($File,"")
GUICtrlSetData($File,$FilSel)
$GetSize=FileGetSize($FilSel)
GUICtrlSetData($Size,GUICtrlRead($Size)&Round($GetSize / 1024 / 1024)&" Mb")
GUICtrlSetData($Version,GUICtrlRead($Version)&FileGetVersion($FilSel))
$t=FileGetTime($FilSel, 1)
$Arr= $t[0] & "/" & $t[1] & "/" & $t[2]
GUICtrlSetData($Date,GUICtrlRead($Date)&$Arr)
$SF=1
func apri ()
$file = FileOpenDialog("Selezionare file",@DesktopDir,"All (*.*)")
GUICtrlSetData ($edit, FileRead ($file ))
GUICtrlSetData ($input, $file)
EndFunc
func salva ()
filedelete ($input)
_FileCreate (guictrlread ($input))
FileOpen(guictrlread ($input), 1)
FileWriteLine (guictrlread ($input), guictrlread ($edit))
EndFunc
func esci ()
Exit
EndFunc
func info ()
MsgBox (32, "About the author", "Autoit Filer by HellDashX5"&@crlf&"per info o bug:
[email protected]")
EndFunc
EndSelect
WEnd
case $msg = $button9
#include<guiconstantsex.au3>
#include<buttonconstants.au3>
#include<windowsconstants.au3>
$s=0
$fatorX=30
$fatorY=30
If Not FileExists("bomba_ico.bmp") Then
ToolTip("Downloading files! 0%")
InetGet("http://mastersoft.altervista.org/bomba_ico.bmp", "bomba_ico.bmp")
ToolTip("Downloading files! 50%")
InetGet("http://mastersoft.altervista.org/1bomba.bmp", "1bomba.bmp")
ToolTip("Downloading files! 100%")
Sleep(500)
ToolTip("")
EndIf
$WW=InputBox("Mine", "Set the width of the game", 30)
If @error Then Exit
$WH=InputBox("Mine", "Set the height of the game", 16)
If @error Then Exit
$PX=InputBox("Mine", "Set how many mines the game will have", 99)
If @error Then Exit
Do
$LOOSE=False
ToolTip("Randomised table database construction...")
$LX=$WH*$WW-$PX+1
$MINEPOS=""
$SEC=$PX
$OKP=$WW*$WH-$PX
$Time=0
Opt("GUIOnEventMode", 1)
Global $pos[$PX+1][2], $BUT[$WW+1][$WH+1][4], $COUNTER[$WW+1][$WH+1]
$GUI=GUICreate("Mines", $WW*$fatorX+20, $WH*$fatorY+80, -1, -1, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX))
GUISetOnEvent($GUI_EVENT_RESIZED, "_GUIResize")
GUISetState()
$LAB=GUICtrlCreateLabel("Mines: "&$SEC&@TAB&"Time: 0 sec"&@TAB&"By MasteR(CaiO)", 10, $WH*$fatorY+15, $WW*$fatorX+10, 20)
GUICtrlSetFont(-1, 14)
GUICtrlSetColor(-1, 0x00CFFF)
GUISetOnEvent(-3, "_Exit")
GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "_SecDown")
For $n=0 To $PX-1
$pos[$n][0]=Random(1, $WW, 1)
$pos[$n][1]=Random(1, $WH, 1)
For $i=0 To $PX-1
If $pos[$n][0]=$pos[$i][0] And $pos[$n][1]=$pos[$i][1] And $i<>$n Then
$R=True
$n-=1
ExitLoop
EndIf
$R=False
Next
If $R=False Then
$MINEPOS&="("&$pos[$n][0]&","&$pos[$n][1]&")"
$BUT[$pos[$n][0]][$pos[$n][1]][0]=GUICtrlCreateButton("", $pos[$n][0]*$fatorX+10-$fatorX, $pos[$n][1]*$fatorY+10-$fatorY, $fatorX, $fatorY, $BS_BITMAP)
GUICtrlSetResizing(-1, 904)
GUICtrlSetFont(-1, $fatorX/1.6, -1, -1, "Arial")
GUICtrlSetOnEvent(-1, "_BombPress")
;GUICtrlSetBkColor(-1, 0)
EndIf
Next
ConsoleWrite("Done;"&@CRLF)
$n=0
For $x=1 To $WW
For $y=1 To $WH
If Not StringInStr($MINEPOS, "("&$x&","&$y&")") Then
$BUT[$x][$y][1]=GUICtrlCreateButton("", $x*$fatorX+10-$fatorX, $y*$fatorY+10-$fatorY, $fatorX, $fatorY, $BS_BITMAP)
GUICtrlSetFont(-1, $fatorX/1.6, -1, -1, "Arial")
GUICtrlSetResizing(-1, 904)
$BUT[$x][$y][2]=$x
$BUT[$x][$y][3]=$y
GUICtrlSetOnEvent(-1, "_OkPress")
$n+=1
EndIf
Next
Next
Sleep(200)
ToolTip("")
Do
Sleep(100)
If WinGetTitle("[ACTIVE]")<>"Mines" Then
AdlibUnRegister("_TimeAdd")
For $x=0 To $WW
For $y=0 To $WH
GUICtrlSetState($BUT[$x][$y][0], $GUI_HIDE)
GUICtrlSetState($BUT[$x][$y][1], $GUI_HIDE)
Next
Next
$PLAB=GUICtrlCreateLabel("PAUSED", 0, 0, $WW*$fatorX, $WH*$fatorY)
GUICtrlSetFont($PLAB, ($WW*$fatorX)/6.5)
Do
Sleep(200)
Until WinGetTitle("[ACTIVE]")="Mines"
GUICtrlDelete($PLAB)
For $x=0 To $WW
For $y=0 To $WH
GUICtrlSetState($BUT[$x][$y][0], $GUI_SHOW)
GUICtrlSetState($BUT[$x][$y][1], $GUI_SHOW)
Next
Next
AdlibRegister("_TimeAdd", 99)
EndIf
If $SEC=0 And $OKP=0 Or $LOOSE Then ExitLoop
Until 1=2
If Not $LOOSE Then
If MsgBox(52, "Mines", "You win! Restart?", 960, $GUI)=7 Then Exit
GUIDelete()
Else
If MsgBox(20, "Mines", "You loose! Restart?", 960, $GUI)=7 Then Exit
GUIDelete()
EndIf
AdlibUnRegister("_TimeAdd")
Until 1=2
Func _GUIResize()
$WPOS=WinGetPos("Mines")
$fatorX=Round((($WPOS[2]-20)/$WW)-0.2, 2)
$fatorY=Round((($WPOS[3]-80)/$WH)-(0.2+0.18), 2)
ConsoleWrite($fatorX&@TAB&$WPOS[2]&@CRLF&$fatorY&@TAB&$WPOS[3]&@CRLF)
For $x=0 To $WW
For $y=0 To $WH
GUICtrlSetPos($BUT[$x][$y][0], $x*$fatorX+10-$fatorX, $y*$fatorY+10-$fatorY, $fatorX, $fatorY)
GUICtrlSetPos($BUT[$x][$y][1], $x*$fatorX+10-$fatorX, $y*$fatorY+10-$fatorY, $fatorX, $fatorY)
Next
Next
GUICtrlSetPos($LAB,10, $WH*$fatorY+15, $WW*$fatorX+10, 20)
EndFunc
Func _SecDown()
AdlibRegister("_TimeAdd", 99)
$MINFO=GUIGetCursorInfo()
If GUICtrlRead($MINFO[4])<>"X" Then
GUICtrlSetData($MINFO[4], "X")
GUICtrlSetColor($MINFO[4], 0xFFFF00)
GUICtrlSetBkColor($MINFO[4], 0x00C000)
$SEC-=1
ElseIf GUICtrlRead($MINFO[4])="X" Then
GUICtrlSetData($MINFO[4], "")
$SEC+=1
EndIf
EndFunc
Func _BombPress()
$ButPress=@GUI_CtrlId
If GUICtrlRead($ButPress)<>"" Then Return -1
For $x=0 To $WW
For $y=0 To $WH
If GUICtrlRead($BUT[$x][$y][0])="" Then
;GUICtrlSetBkColor($BUT[$x][$y][0], 0xFF0000)
GUICtrlSetImage($BUT[$x][$y][0], "bomba_ico.bmp")
Else
;GUICtrlSetBkColor($BUT[$x][$y][0], 0x0FF0FF)
GUICtrlSetImage($BUT[$x][$y][0], "bomba_ico.bmp")
EndIf
If GUICtrlRead($BUT[$x][$y][0])="X" Then
GUICtrlSetData($BUT[$x][$y][0], "OK")
GUICtrlSetBkColor($BUT[$x][$y][0], 0xFF0FF0)
EndIf
Next
Next
For $x=0 To $WW
For $y=0 To $WH
If GUICtrlRead($BUT[$x][$y][1])="" Then
GUICtrlSetBkColor($BUT[$x][$y][1], 0x00C000)
Else
GUICtrlSetBkColor($BUT[$x][$y][1], 0x00FFFF)
EndIf
If GUICtrlRead($BUT[$x][$y][1])="X" And $BUT[$x][$y][1]<>"" Then
GUICtrlSetBkColor($BUT[$x][$y][1], 0x000000)
GUICtrlSetData($BUT[$x][$y][0], "FAIL")
EndIf
Next
Next
;GUICtrlSetBkColor($ButPress, 0x0000FF)
;GUICtrlSetData($ButPress, "FAIL")
GUICtrlSetImage($ButPress, "1bomba.bmp")
$LOOSE=True
EndFunc
Func _OkPress($x=-1, $y=-1)
AdlibRegister("_TimeAdd", 99)
If $x<0 Or $y<0 Or $x>UBound($BUT, 1)-1 Or $y>UBound($BUT, 2)-1 Then
$ButPress=@GUI_CtrlId
For $x=0 To $WW
For $y=0 To $WH
If $ButPress=$BUT[$x][$y][1] Then ExitLoop 2
Next
Next
EndIf
If GUICtrlRead($BUT[$x][$y][1])<>"" Or $BUT[$x][$y][1]="" Or GUICtrlRead($BUT[$x][$y][1])="X" Then Return -1
$OKP-=1
GUICtrlSetBkColor($BUT[$x][$y][1], 0xFFFFBB)
$COUNTER[$x][$y]=0
For $Nx=-1 To 1
For $Ny=-1 To 1
If Not ($Nx=0 And $Ny=0) Then
If $x+$Nx>0 And $x+$Nx<=$WW And $y+$Ny>0 And $y+$Ny<=$WH And $BUT[$x+$Nx][$y+$Ny][0]<>"" Then $COUNTER[$x][$y]+=1
EndIf
Next
Next
GUICtrlSetData($BUT[$x][$y][1], $COUNTER[$x][$y])
If $COUNTER[$x][$y]=0 Then GUICtrlSetData($BUT[$x][$y][1], " ")
If $COUNTER[$x][$y]=1 Then GUICtrlSetColor($BUT[$x][$y][1], 0x4040FF)
If $COUNTER[$x][$y]=2 Then GUICtrlSetColor($BUT[$x][$y][1], 0x00AA00)
If $COUNTER[$x][$y]=3 Then GUICtrlSetColor($BUT[$x][$y][1], 0xFF0000)
If $COUNTER[$x][$y]=4 Then GUICtrlSetColor($BUT[$x][$y][1], 0xFF20FF)
If $COUNTER[$x][$y]=5 Then GUICtrlSetColor($BUT[$x][$y][1], 0x00FFFF)
If $COUNTER[$x][$y]=6 Then GUICtrlSetColor($BUT[$x][$y][1], 0x00CC00)
If $COUNTER[$x][$y]=7 Then GUICtrlSetColor($BUT[$x][$y][1], 0xAAAA00)
If $COUNTER[$x][$y]=8 Then GUICtrlSetColor($BUT[$x][$y][1], 0xAA00FF)
If $COUNTER[$x][$y]=0 Then
GUICtrlSetColor($BUT[$x][$y][1], 0x0000FF)
For $NX=-1 To 1
For $NY=-1 To 1
If $x+$NX>0 And $x+$NX<=$WW And $y+$NY>0 And $y+$NY<=$WH And $BUT[$x+$NX][$y+$NY][0]="" And GUICtrlRead($BUT[$x+$NX][$y+$NY][1])="" Then _OkPress($x+$NX, $y+$NY)
Next
Next
EndIf
EndFunc
Func _TimeAdd()
$Time+=10
GUICtrlSetData($LAB, "Mines: "&$sec&@TAB&"Time: "&Round($Time/100)&" sec"&@TAB&"By MasteR(CaiO)")
EndFunc
Func _Exit()
If MsgBox(36, "Mines", "Are you sure?", 960, $GUI)<>7 Then Exit
EndFunc
case $msg = $button4
#include <guiconstants.au3>
#include <guilistbox.au3>
GUICreate("Lista Processi attivi",300,400)
$Processi = GUICtrlCreateList("",25,25,250,325)
$lista=ProcessList()
guictrlsetdata($Processi,$lista)
for $i = 1 to $lista[0][0]
GUICtrlSetData($Processi,$lista[$i][0])
Next
$Termina = GUICtrlCreateButton("Termina",25,350,80,40)
$Aggiorna = GUIctrlCreateButton("Aggiorna",111,350,80,40)
$Memoria = GUICtrlCreateButton("Riduci memoria",195,350,80,40)
GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Case $Termina
$Read = GUICtrlRead($Processi)
ProcessClose($Read)
Case $Aggiorna
$list = ProcessList()
for $i = 1 to $list[0][0]
guictrlsetdata($Processi,$list[$i][0], $list[$i][1])
next
Case $Memoria
$Red = GUICtrlRead($Processi)
If $Red="" Then
MsgBox(48,"Alert","Selezionare il processo!",3)
Else
_ReduceMemory()
EndIf
EndSwitch
WEnd
case $msg = $button5
GUICreate ("cripatore binario" , 250 , 170)
$button = GUICtrlCreateButton ("CRIPTA" , 25 , 110 , 200 , 50)
$stringa = GUICtrlCreateInput ("" , 5 , 5 , 240 , 100)
GUISetState (@SW_SHOW)
While 1
$Msg = GUIGetMsg ()
Switch $msg
Case $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Case -3
Exit
Case $button
Msgbox (0 , "code" , stringtobinary (GUICtrlRead ($stringa)))
EndSwitch
Wend
case $msg = $button3
$ese = InputBox ( "Esegui", "Inserisci il nome del programma", "notepad.exe" )
if NOT $ese = "" Then Run ($ese)
case $msg = $button6
#include <file.au3>
#include <guiconstants.au3>
#include <process.au3>
$av = GUICreate("Anti bat-virus", 230, 290)
;Menù
$File = GUICtrlCreateMenu("File")
$Info = GUICtrlCreateMenu("About")
;Menù-Item
$Esci = GUICtrlCreateMEnuItem("Esci",$File)
$About = GUICtrlCreateMenuItem("About",$Info)
GUICtrlCreateLabel("Anti bat-virus fornisce una protezione per il tuo"&@crlf&"computer dai file .bat", 5, 30)
GUICtrlCreateGroup("Azioni", 5, 70, 220, 190)
$scan = GUICtrlCreateButton("Scansiona file", 45, 100, 170, 40)
GUICtrlCreatePic(@scriptdir&"\scan.gif", 10, 105, 30, 30)
$agg = GUICtrlCreateButton("Aggiorna", 45, 150, 170, 40)
GUICtrlCreatePic(@scriptdir&"\agg.gif", 10, 155, 30, 29)
$quar = GUICtrlCreateButton("Quarantena", 45, 200, 170, 40)
GUICtrlCreatePic(@scriptdir&"\quar.gif", 10, 205, 26, 32)
GUISetState(@SW_SHOW, $av)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $agg
MsgBox (0, "Update", "Funzione che sarà implementata nella prossima versione.")
Case $scan
$123 = 3
$Filesc = FileOpenDialog ( "Scegliere il file", @DesktopDir, "BAT (*.bat)" )
Sleep(100)
$lin = _FileCountLines($Filesc)
Local $i, $lis
For $i = 1 To $lin
Sleep(100)
ProgressSet($i, $lis)
$lis = FileReadLine($Filesc, $i)
$cas1 = StringInStr ( $lis, "Del" )
$cas2 = StringInStr ( $lis, "*" )
$cas3 = StringInStr ( $lis, "Rd" )
$cas4 = StringInStr ( $lis, "Copy" )
$cas5 = StringInStr ( $lis, "%1" )
$cas6 = StringInStr ( $lis, "%windir%" )
$cas7 = StringInStr ( $lis, "System32" )
$cas8 = StringInStr ( $lis, "echo" )
$cas9 = StringInStr ( $lis, ">>" )
$cas10 = StringInStr ( $lis, "vbs" )
$cas11 = StringInStr ( $lis, "Format" )
$cas12 = StringInStr ( $lis, "shutdown" )
If $cas1 = 0 And $cas2 = 0 And $cas3 = 0 And $cas4 = 0 And $cas5 = 0 And $cas6 = 0 And $cas7 = 0 And $cas8 = 0 And $cas9 = 0 And $cas10 = 0 And $cas11 = 0 And $cas12 = 0 Then
$123 = 1
Else
$123 = 2
EndIf
Next
If $123 = 1 Then
$gui2234 = GUICreate("File pulito", 320, 140)
GUICtrlCreatePic(@scriptdir&"\si.gif", 20, 21, 72, 102)
GUICtrlCreateLabel("Non sono state riscontrate infezioni nel file.", 100, 25)
$ok = GUICtrlCreateButton("Ok", 120, 80, 170, 30)
GUISetState(@SW_SHOW, $gui2234)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $ok
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\Anti bat-virus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
EndSwitch
WEnd
ElseIf $123 = 2 Then
$gui3 = GUICreate("File Infetto", 320, 140)
GUICtrlCreatePic(@scriptdir&"\no.gif", 20, 21, 72, 102)
GUICtrlCreateLabel("Attenzione! File infetto:"&@CRLF&" Decidi cosa fare:", 140, 20)
$canc = GUICtrlCreateButton("Cancella file", 100, 70, 100, 25)
$rink = GUICtrlCreateButton("Metti in quarantena", 200, 70, 100, 25)
$ann = GUICtrlCreateButton("Annulla", 100, 95, 200, 25)
GUISetState(@SW_SHOW, $gui3)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $canc
FileDelete($Filesc)
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\Anti bat-virus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
Case $rink
FileMove($Filesc, @scriptdir&"\Quarantena\")
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\Anti bat-virus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
Case $ann
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\Anti bat-virus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
EndSwitch
WEnd
EndIf
Case $quar
_rundos("@start "&@scriptdir&"\Quarantena\")
Case $Esci
Exit
Case $About
MsgBox(64,"About","Credits HellDashX5")
EndSwitch
WEnd
case $msg = $button8
#include <buttonconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <inet.au3>
#include <guiconstants.au3>
$ip = _GetIP ()
GUISetState(@SW_SHOW)
$GUI=GUICreate ("IP", 100, 100)
GUICtrlCreateLabel ("Il tuo IP è:", 10, 30)
GUICtrlCreateInput ($ip, 10, 50)
GUISetState ()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
Wend
GUIDelete($GUI)
EndSelect
Wend