MultiUso by Coyote

« Older   Newer »
  Share  
-Coyote-
CAT_IMG Posted on 27/7/2010, 13:19     +1   -1




Oggi siccome piove a manetta ho pensato di fare un programma in autoit (e' da tanto che non ne faccio) e ho pensato di farlo + complicato (almeno x me e' complicato) e ci sono riuscito. Per adesso sn poche le funzioni anche perche non vedevo l'ora di postarlo, ma il mio hard disk interno sta lavorando senza sosta per pensare a cosa mettere di nuovo nel programma :P se qualcuno suggerisce qualcosa sono felice xD ecco qua la versione 1.0

SPOILER (click to view)
#include <buttonconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#Region ### START Koda GUI section ### Form=
$BOOOOOH = GUICreate("MultiUso by -Coyote-", 307, 312, 192, 124)
$Network = GUICtrlCreateGroup("Network", 16, 24, 273, 73)
$Ping = GUICtrlCreateButton("Ping", 32, 56, 73, 25)
$PingCmd = GUICtrlCreateButton("CMD Ping", 120, 56, 73, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Computer = GUICtrlCreateGroup("Computer", 16, 120, 273, 73)
$ShutDown = GUICtrlCreateButton("ShutDown", 32, 152, 73, 25)
$Restart = GUICtrlCreateButton("Restart", 120, 152, 73, 25)
$Hibernate = GUICtrlCreateButton("Hibernate", 208, 152, 73, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Other = GUICtrlCreateGroup("Other", 16, 216, 273, 73)
$Calcolatrice = GUICtrlCreateButton("Calcolatrice", 32, 248, 73, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Ping
$Target = InputBox ("Target", "Enter here the target's IP")
Ping ($Target)
If @error = 0 Then
MsgBox (0, "Ping", "IP Pingato!")
ElseIf @error = 1 Then
MsgBox (16, "Ping", "Host offline")
ElseIf @error = 2 Then
MsgBox (16, "Ping", "Non e' possibile trovare questo host")
ElseIf @error = 3 Then
MsgBox (16, "Ping", "IP non valido")
ElseIf @error = 4 Then
MsgBox (16, "Ping", "Si sono riscontrati degli errori sconosciuti")
EndIf
Case $PingCmd
$TargetCMD = InputBox ("Target", "Immettere l'IP")
$PingBit = InputBox ("Bit", "Di default Windows pinga con 32 Bit ma questa opzione e' variabile: scrivi con quanti bit vuoi che pinghi (min 0 - max 65500)", "32")
$Tipo = MsgBox (4, "Ping", "Vuoi che non si fermi mai a pingare finche non decidi tu? Se premi si non si fermera, se premi no si fermera dopo 4 ping")
If $Tipo = 6 Then
ShellExecute ("cmd.exe")
Sleep (3000)
Send ("ping " &$TargetCMD&" -t -l "&$PingBit)
Send ("{ENTER}")
ElseIf $Tipo = 7 Then
ShellExecute ("cmd.exe")
Sleep (3000)
Send ("ping " &$TargetCMD&" -l "&$PingBit)
Send ("{ENTER}")
EndIf
Case $ShutDown
$ShutDomanda = MsgBox (4, "Spegnimento", "Sei sicuro di voler spegnere il PC?")
If $ShutDomanda = 6 Then
Shutdown (1)
ElseIf $ShutDomanda = 7 Then
Exit
EndIf
Case $Restart
$RestDomanda = MsgBox (4, "Restart", "Sei sicuro di voler riavviare il PC?")
If $RestDomanda = 6 Then
Shutdown (2)
ElseIf $ShutDomanda = 7 Then
Exit
EndIf
Case $Hibernate
$HiberDomanda = MsgBox (4, "Hibernate", "Sei sicuro di voler mettere il PC in Hibernazione? (il PC si spegne ma salvando tutto il contenuto della RAM e all'accesione riprende da dove era rimasto)")
If $HiberDomanda = 6 Then
Shutdown (64)
ElseIf $HiberDomanda = 7 Then
Exit
EndIf
Case $Calcolatrice
$Calcolatrice = GUICreate("Calcolatrice (operazioni base) by -Coyote-", 317, 387, 379, 401)
$Casella = GUICtrlCreateInput("", 16, 16, 281, 20, 0x0800)
$Button1 = GUICtrlCreateButton("1", 24, 64, 57, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("2", 128, 64, 57, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("3", 232, 64, 57, 41, $WS_GROUP)
$Button4 = GUICtrlCreateButton("4", 24, 112, 57, 41, $WS_GROUP)
$Button5 = GUICtrlCreateButton("5", 128, 112, 57, 41, $WS_GROUP)
$Button6 = GUICtrlCreateButton("6", 232, 112, 57, 41, $WS_GROUP)
$Button7 = GUICtrlCreateButton("7", 24, 160, 57, 41, $WS_GROUP)
$Button8 = GUICtrlCreateButton("8", 128, 160, 57, 41, $WS_GROUP)
$Button9 = GUICtrlCreateButton("9", 232, 160, 57, 41, $WS_GROUP)
$Button10 = GUICtrlCreateButton("0", 128, 208, 57, 41, $WS_GROUP)
$Button11 = GUICtrlCreateButton("+", 16, 272, 57, 25, $WS_GROUP)
$Button12 = GUICtrlCreateButton("-", 88, 272, 57, 25, $WS_GROUP)
$Button13 = GUICtrlCreateButton("x", 160, 272, 57, 25, $WS_GROUP)
$Button14 = GUICtrlCreateButton("/", 240, 272, 57, 25, $WS_GROUP)
$Button15 = GUICtrlCreateButton("=", 16, 344, 281, 25, $WS_GROUP)
$Button16 = GUICtrlCreateButton(".", 232, 208, 57, 41, $WS_GROUP)
$Button17 = GUICtrlCreateButton("AC", 160, 304, 57, 25, $WS_GROUP)
$Button18 = GUICtrlCreateButton("00", 24, 208, 57, 41, $WS_GROUP)
$Button19 = GUICtrlCreateButton("Esci", 88, 304, 57, 25, $WS_GROUP)

GUISetState(@SW_SHOW)

While 2
$numeri = GUICtrlRead($Casella)
Switch GUIGetMsg ()
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
GUICtrlSetData($Casella,$numeri&"1")
Case $Button2
GUICtrlSetData($Casella,$numeri&"2")
Case $Button3
GUICtrlSetData($Casella,$numeri&"3")
Case $Button4
GUICtrlSetData($Casella,$numeri&"4")
Case $Button5
GUICtrlSetData($Casella,$numeri&"5")
Case $Button6
GUICtrlSetData($Casella,$numeri&"6")
Case $Button7
GUICtrlSetData($Casella,$numeri&"7")
Case $Button8
GUICtrlSetData($Casella,$numeri&"8")
Case $Button9
GUICtrlSetData($Casella,$numeri&"9")
Case $Button10
GUICtrlSetData($Casella,$numeri&"0")
Case $Button12
GUICtrlSetData($Casella,$numeri&"-")
Case $Button11
GUICtrlSetData($Casella,$numeri&"+")
Case $Button14
GUICtrlSetData($Casella,$numeri&"/")
Case $Button13
GUICtrlSetData($Casella,$numeri&"*")
Case $Button16
GUICtrlSetData($Casella,$numeri&".")
Case $Button17
GUICtrlSetData($Casella, "")
Case $Button18
GUICtrlSetData($Casella,$numeri&"00")
Case $Button19
Exit
Case $Button15
$Ris = Execute($numeri)
GUICtrlSetData ($Casella,$Ris)
EndSwitch
WEnd
EndSwitch
WEnd


La calcolatrice l'avevo fatta tempo fa e la pigrizzia non mi ha permesso di farne un'altra xD. Questa l'avevo fatta piu' funzionale e aveva di tutto dentro ma per sfortuna lo delettata per sbaglio xD ehehehe..... succede...
 
Top
Lord_Blackout
CAT_IMG Posted on 27/7/2010, 13:52     +1   -1




Molto carino.. potresti aggiungerci una funzione per fare i backup, copiando solo i files con data pił nuova (evitando di copiare ogni volta tutti i files)...
 
Top
ACIDBURN16
CAT_IMG Posted on 27/7/2010, 14:20     +1   -1




Buono :)
 
Top
2 replies since 27/7/2010, 13:19   107 views
  Share