Autoit fanclub

Reply
[Perl] Calcolatrice
view post Posted on 11/7/2008, 13:51Quote
Avatar

sono pro!

Group: Member
Posts: 1108
Location:


Status: Offline: ultima azione eseguita il 4/12/2009, 21:05


Ho appena finito una calcolatrice in perl:

CODICE
#!/usr/bin/perl
print "Scrivi il tipo di operazione da eseguiren";
$operazione = <STDIN>;

if ( $operazione =~ /addizione/ ) {
print "Inserisci il primo operatoren";
$addendo = <STDIN>;
print "Inserisci il secondo operatoren";
$addendo1 = <STDIN>;
$addizione = $addendo + $addendo1;
print "Risultato:$addizionen";
sleep 20;
}
elsif ( $operazione =~ /sottrazione/ ) {
print "Inserisci il primo operatoren";
$sottraendo = <STDIN>;
print "Inserisci il secondo operatoren";
$sottraendo1 = <STDIN>;
$sottrazione = $sottraendo - $sottraendo1;
print "Risultato:$sottrazionen";
sleep 20;
}
elsif ( $operazione =~ /moltiplicazione/ ) {
print "Inserisci il primo operatoren";
$fattore = <STDIN>;
print "Inserisci il secondo operatoren";
$fattore1 = <STDIN>;
$moltiplicazione = $fattore * $fattore1;
print "Risultato:$moltiplicazionen";
sleep 20;
}
elsif ( $operazione =~ /divisione/ ) {
print "Inserisci il primo operatoren";
$dividendo = <STDIN>;
print "Inserisci il secondo operatoren";
$dividendo1 = <STDIN>;
$divisione = $dividendo / $dividendo1;
print "Risultato:$divisionen";
sleep 20;
}

image

image


image

http://xedox94.net/

Record Rubik:
3x3x3: 0.55.72
2x2x2: 0.4.56
 
P_MSG P_EMAIL P_WEBSITE P_MSN Top
view post Posted on 12/7/2008, 00:30Quote
Avatar

Pr0gr4mm3d 4 k1ll

Group: Administrator
Posts: 541
Location: Porta 139


Status: Offline: ultima azione eseguita il 6/8/2009, 09:57


non conosco il perl....pero leggendolo con intuito l'ho capito, non e male ;)

SecretSite a new Hacking Community
I'm flying away
away from the names(calling your names)
away from the games(fucking head games)
of circumstances of a world so cold
WORLD SO COLD-MUDVAYNE


Programmi in Autoit??Ti piace la programmazione (in ogni linguaggio)??Vieni a trovarci ;)


image


http://autoit.forumcommunity.net


I miei programmi:
Msn Flooder (skinned by I.Ren)
Agenda
Dork Abuser V.1.0
BVC
MU51C PL4Y3r by MatteoJug e |knok|!



image lknokl image


Existence past the door,
I sail through purgatory's bay
The space between a blink and a tear,
...Death blooms.
DEATH BLOOMS-MUDVAYNE


imageimage
imageimage
image
 
P_MSG P_EMAIL P_MSN Top
view post Posted on 12/7/2008, 10:37Quote
Avatar

sono pro!

Group: Member
Posts: 1108
Location:


Status: Offline: ultima azione eseguita il 4/12/2009, 21:05


:| ma qui il backslash non lo visualizza? perchè ad ogni print dovrebbe essere:
print "testo{BACKSLASH}n";

image

image


image

http://xedox94.net/

Record Rubik:
3x3x3: 0.55.72
2x2x2: 0.4.56
 
P_MSG P_EMAIL P_WEBSITE P_MSN Top
view post Posted on 17/8/2008, 12:35Quote
Avatar

KEVIN FREE

Group: Member
Posts: 1906


Status: Offline: ultima azione eseguita il 4/10/2009, 21:59


"\n" serve per andare a capo...

CODICE
Bishop scrive:
io e un pinguino giocavamo allegramente a shangai ( ma il pinguino non ha i pollici opponibili... anzi non ha le mani)...
Bishop scrive:
e quindi ha perso
Bishop scrive:
e si è arrabbiato
Bishop scrive:
e mi ha divorato il cell
Bishop scrive:
ma mi consolo sapendo che è andato a finire in un posto migliore: in una pancia di un pinguinio!
th3_l0gic scrive:
che cazzo ti sei fumato oggi bishop? xD
Bishop scrive:
il figlio del pinguino... per questo si è arrabbiato tanto..
th3_l0gic scrvive:
xD .-."
Bishop scrive:
effe quattro?!
colpito e affondato!
th3_l0gic scrive:
LoooooooooooL
 
P_MSG P_EMAIL P_WEBSITE P_MSN Top
view post Posted on 27/5/2009, 09:21Quote
Avatar

lol asd sbralal

Group: Member
Posts: 138
Location: Non è ovvio?


Status: Offline: ultima azione eseguita il 4/11/2009, 12:31


Beccati sta calcolatrice in AutoIt!
CODICE
#comments-start
Programmata da: Andrea Trupia Alias antru
#comments-end

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Calcolatrice", 295, 235, 192, 124)
$Input1 = GUICtrlCreateInput("", 8, 8, 217, 21)
$CE = GUICtrlCreateButton("CE", 232, 0, 49, 41, 0)
$1=GUICtrlCreateButton("1", 8, 48, 57, 41, 0)
$2=GUICtrlCreateButton("2", 72, 48, 57, 41, 0)
$3=GUICtrlCreateButton("3", 136, 48, 57, 41, 0)
$4=GUICtrlCreateButton("4", 8, 96, 57, 41, 0)
$5=GUICtrlCreateButton("5", 72, 96, 57, 41, 0)
$6=GUICtrlCreateButton("6", 136, 96, 57, 41, 0)
$7=GUICtrlCreateButton("7", 8, 144, 57, 41, 0)
$8=GUICtrlCreateButton("8", 72, 144, 57, 41, 0)
$9=GUICtrlCreateButton("9", 136, 144, 57, 41, 0)
$0=GUICtrlCreateButton("0", 8, 192, 57, 41, 0)
$virgola=GUICtrlCreateButton(".", 72, 192, 57, 41, 0)
$uguale=GUICtrlCreateButton("=", 136, 192, 57, 41, 0)
$piu=GUICtrlCreateButton("+", 224, 48, 57, 41, 0)
$meno=GUICtrlCreateButton("-", 224, 96, 57, 41, 0)
$per=GUICtrlCreateButton("x", 224, 144, 57, 41, 0)
$diviso=GUICtrlCreateButton("/", 224, 192, 57, 41, 0)
GUISetState(@SW_SHOW)


While 1
       $nMsg = GUIGetMsg()
       $leggi = GUICtrlRead ($Input1)
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit
               Case $1
                       GUICtrlSetData ($Input1, $leggi&"1")
               Case $2
                       GUICtrlSetData ($Input1, $leggi&"2")
               Case $3
                       GUICtrlSetData ($Input1, $leggi&"3")
               Case $4
                       GUICtrlSetData ($Input1, $leggi&"4")
               Case $5
                       GUICtrlSetData ($Input1, $leggi&"5")
               Case $6
                       GUICtrlSetData ($Input1, $leggi&"6")
               Case $7
                       GUICtrlSetData ($Input1, $leggi&"7")
               Case $8
                       GUICtrlSetData ($Input1, $leggi&"8")
               Case $9
                       GUICtrlSetData ($Input1, $leggi&"9")
               Case $0
                       GUICtrlSetData ($Input1, $leggi&"0")
               Case $virgola
                       GUICtrlSetData ($Input1, $leggi&".")
               Case $uguale
                               $esegui=Execute($leggi)

       GUICtrlSetData ($Input1, $esegui)

       If $leggi = "" Then

               MsgBox(48,"ATTENZIONE","immetti il primo efficiente,l'operatore logico ed il secondo coefficente")

       EndIf

       

       Case $diviso

GUICtrlSetData($Input1,$leggi&"/")

If $leggi = "" Then

               MsgBox(48,"ATTENZIONE","immetti il primo esponente prima dell'operatore logco")

       EndIf
               Case $piu
                       GUICtrlSetData ($Input1, $leggi&"+")
If $leggi = "" Then

               MsgBox(48,"ATTENZIONE","immetti il primo esponente prima dell'operatore logco")

       EndIf
               Case $meno
                       GUICtrlSetData ($Input1, $leggi&"-")
If $leggi = "" Then

               MsgBox(48,"ATTENZIONE","immetti il primo esponente prima dell'operatore logco")

       EndIf
                       
               Case $per
                       GUICtrlSetData ($Input1, $leggi&"*")
                       If $leggi = "" Then
                               MsgBox (48, "ATTENZIONE", "Immetti il primo efficiente, l'operatore logico ed il secondo coefficiente!")
                       EndIf
               Case $diviso
                       GUICtrlSetData ($Input1, $leggi&"/")
               Case $CE
                       GUICtrlSetData($Input1,"")
       EndSwitch
WEnd

Nell'allegato trovate l'eseguibile!

Download attachment
Calcolatrice_By_Antru.rar ( Number of downloads: 5 )


IO VIVO PER WARCRAFT!!
image
 
P_MSG P_EMAIL P_WEBSITE Top
view post Posted on 15/6/2009, 17:00Quote
Avatar

master of autoit

Group: Member
Posts: 4404


Status: Offline: ultima azione eseguita il 4/12/2009, 19:35


sti cazzi
 
P_MSG P_EMAIL Top
5 replies since 11/7/2008, 13:51
 
Reply

load
Fast reply

 
 
 

Enable emoticons
Clickable Smilies
Show All


Nickname:      Email:



 

 
 




Affiliati
Affiliati