This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-07-30 13:54:20

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

whoot! maybe I will learn python!

after finall figuring out what something like:

def machinemove (self):          <--- machinemove is a sort of variable
       row, col = self.pickmove()         <--- when it receives machinemove it define (def)
       self.board[row][col] = se;f.machinemark      <--- into these pieces of code
       self.label[(row,col)].config(text=self.machinemark)

only a small amount of python for ya!


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#2 2008-07-30 14:12:42

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: whoot! maybe I will learn python!

import sys
from Tkinter import *
win1 = Toplevel()
root = Tk()
def waffles():
    Label(text='SPAM!').pack()
Button(win1, text = 'play game', command=waffles).pack()
Button(root, text = 'quit all', command=root.quit).pack()
win1.mainloop()

I'm trying to create a spammer program (right now its about the best thing I can make)
if you have python you can copy and paste all of this text into "IDLE" or "Eclipse" or some other program and it will open several windows and they will have buttons! whoopy! the full spammer will continuously print spam and open more windows! MWHAHAHA!


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#3 2008-07-30 15:17:09

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: whoot! maybe I will learn python!

import sys
from Tkinter import *
import time
root = Tk()
win1 = Toplevel(root)
win1.title('PRESS THE BUTTON')
def waffles():
    win = Toplevel(root)
    win.title('a gift...')
    win.protocol('WM_DELETE_WINDOW', lambda:0)
    msg = Button(win, text='SPAM!', command=die)
    msg.pack(expand = YES, fill = BOTH)
    msg.config(padx=10, pady=0, bd=10, relief=RAISED)
def die():
    for i in range(5):
        thing = Toplevel(root)
        thing. title('EVEN MORE!')
        thing.protocol('WM_DLETE_WINDOW', lambda:0)
        more = Button(thing, text='MORE SPAME', command=death)
        more.pack(expand=YES, fill=BOTH)
        more.config(padx=10, pady=10, bd=10, relief=RAISED)
def death():
    for s in range(20):
        B1 = Toplevel(root)
        B1. title('EVEN MORE!')
        B1.protocol('WM_DLETE_WINDOW', lambda:0)
        B2 = Label(B1, text='MORE SPAME')
        B2.pack(expand=YES, fill=BOTH)
        B2.config(padx=10, pady=10, bd=10, relief=RAISED)
        time.sleep(0.1)
Button(win1, text = 'play game', command=waffles).pack()
Button(win1, text = 'quit all', command=root.quit).pack()
win1.mainloop()

there I finished my spammer! I could have made your computer crash by just making it open millions of windows without allowing you to close it, but that would be evil


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#4 2008-07-30 15:29:18

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: whoot! maybe I will learn python!

dingdong wrote:

import sys
from Tkinter import *
import time
root = Tk()
win1 = Toplevel(root)
win1.title('PRESS THE BUTTON')
def waffles():
    win = Toplevel(root)
    win.title('a gift...')
    win.protocol('WM_DELETE_WINDOW', lambda:0)
    msg = Button(win, text='SPAM!', command=die)
    msg.pack(expand = YES, fill = BOTH)
    msg.config(padx=10, pady=0, bd=10, relief=RAISED)
def die():
    for i in range(5):
        thing = Toplevel(root)
        thing. title('EVEN MORE!')
        thing.protocol('WM_DLETE_WINDOW', lambda:0)
        more = Button(thing, text='MORE SPAME', command=death)
        more.pack(expand=YES, fill=BOTH)
        more.config(padx=10, pady=10, bd=10, relief=RAISED)
def death():
    for s in range(20):
        B1 = Toplevel(root)
        B1. title('EVEN MORE!')
        B1.protocol('WM_DLETE_WINDOW', lambda:0)
        B2 = Label(B1, text='MORE SPAME')
        B2.pack(expand=YES, fill=BOTH)
        B2.config(padx=10, pady=10, bd=10, relief=RAISED)
        time.sleep(0.1)
Button(win1, text = 'play game', command=waffles).pack()
Button(win1, text = 'quit all', command=root.quit).pack()
win1.mainloop()

there I finished my spammer! I could have made your computer crash by just making it open millions of windows without allowing you to close it, but that would be evil

I know something worse. Once I made a java program that would infinitely generate text files containing pi to a million digits. A program like that would fill your hard drive with pi and mess up your pc. I never ran it though.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-07-30 15:34:19

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: whoot! maybe I will learn python!

oh my god! LOL!


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#6 2008-07-30 15:35:45

newareagle
Scratcher
Registered: 2008-06-10
Posts: 100+

Re: whoot! maybe I will learn python!

Lol archmage don't they have supercomputers for that?


My Guitar Hero Game.
8/9 Projects on the Front Page at Once!

Offline

 

#7 2008-07-30 15:36:17

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: whoot! maybe I will learn python!

archmage wrote:

dingdong wrote:

import sys
from Tkinter import *
import time
root = Tk()
win1 = Toplevel(root)
win1.title('PRESS THE BUTTON')
def waffles():
    win = Toplevel(root)
    win.title('a gift...')
    win.protocol('WM_DELETE_WINDOW', lambda:0)
    msg = Button(win, text='SPAM!', command=die)
    msg.pack(expand = YES, fill = BOTH)
    msg.config(padx=10, pady=0, bd=10, relief=RAISED)
def die():
    for i in range(5):
        thing = Toplevel(root)
        thing. title('EVEN MORE!')
        thing.protocol('WM_DLETE_WINDOW', lambda:0)
        more = Button(thing, text='MORE SPAME', command=death)
        more.pack(expand=YES, fill=BOTH)
        more.config(padx=10, pady=10, bd=10, relief=RAISED)
def death():
    for s in range(20):
        B1 = Toplevel(root)
        B1. title('EVEN MORE!')
        B1.protocol('WM_DLETE_WINDOW', lambda:0)
        B2 = Label(B1, text='MORE SPAME')
        B2.pack(expand=YES, fill=BOTH)
        B2.config(padx=10, pady=10, bd=10, relief=RAISED)
        time.sleep(0.1)
Button(win1, text = 'play game', command=waffles).pack()
Button(win1, text = 'quit all', command=root.quit).pack()
win1.mainloop()

there I finished my spammer! I could have made your computer crash by just making it open millions of windows without allowing you to close it, but that would be evil

I know something worse. Once I made a java program that would infinitely generate text files containing pi to a million digits. A program like that would fill your hard drive with pi and mess up your pc. I never ran it though.

in JavaScript I made something very minor compared to what you guys did. I made it so that (this was when I was testing stuff out) it opened up an alert window but then presssing "okay" just opened up another one, so I tried using the task manager but then my entire computer froze up (you can't click on anything when you have an alert window open). Eventually I just restarted it (the computer).

Offline

 

#8 2008-07-30 15:38:26

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: whoot! maybe I will learn python!

newareagle wrote:

Lol archmage don't they have supercomputers for that?

No, you don't understand. It doesn't calculate pi, it just fills your hard drive with pi  smile

I called the program pi power.

If you want to see pi to a million digits go to http://www.piday.org/million.php


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#9 2008-08-23 20:47:48

AlanProjects
Scratcher
Registered: 2008-06-23
Posts: 500+

Re: whoot! maybe I will learn python!

lol in vbscript i did this:
<script="text/vbscript">
for i=1 to 1000
msgbox(Hahahaha!)
</script>
that makes Internet explorer keep opening a Vbscript alert box.
if you close it it opens it again and so on 1000 times. plus, with an alert box, youre not allowed to click on any IE thing until you close the alert box, but it keeps opening an alert box, so the only way to get out is to force quit. plus what i di was delete IE off the desktop, made an html with that in it, put it in a weird folder, then make an alias and name it Internet Exploder and put in on the desktop. Hours of free entertainment.

Offline

 

#10 2008-08-25 07:35:16

Kingbradley6
Scratcher
Registered: 2007-05-17
Posts: 100+

Re: whoot! maybe I will learn python!

dingdong wrote:

after finall figuring out what something like:

def machinemove (self):          <--- machinemove is a sort of variable
       row, col = self.pickmove()         <--- when it receives machinemove it define (def)
       self.board[row][col] = se;f.machinemark      <--- into these pieces of code
       self.label[(row,col)].config(text=self.machinemark)

only a small amount of python for ya!

I think with the way you've defined it, 'machinemove' would be a method not a variable.

Although I don't know Python it's virtually the same as Ruby to what I know very well and at least in Ruby using 'def' is defining a method.

Variables just take a name and value.

Ruby > Python  tongue   big_smile

Last edited by Kingbradley6 (2008-08-25 07:36:23)

Offline

 

#11 2009-11-04 11:53:39

jacool
Scratcher
Registered: 2008-01-25
Posts: 1000+

Re: whoot! maybe I will learn python!

Lol. first post here in more than a year  tongue

I made a VBS opening and closing the CD tray 100 times  smile  I hade the script on my USB stick and a friend wondered what it was so he opened it at a school computer  smile
The only way to stop it is to turn off the computer or turn off the wscript.exe process.
Unfortunately the admin at school had turned off the task manager on every computer in school...

I made a short batch file which stopped it though  smile


http://i571.photobucket.com/albums/ss159/JacobKar/svensktiger-1.png

Offline

 

#12 2009-11-04 12:15:33

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: whoot! maybe I will learn python!

Too advanced for me.

Offline

 

#13 2009-11-06 15:31:49

Boxhead
Scratcher
Registered: 2009-09-28
Posts: 100+

Re: whoot! maybe I will learn python!

Everyone learns Python in highschool. It's not that big of a deal. Now, Pygame on the other hand...


Boxhead - Living in a box, and having a head since '76

Offline

 

#14 2009-11-06 15:58:08

jacool
Scratcher
Registered: 2008-01-25
Posts: 1000+

Re: whoot! maybe I will learn python!

Boxhead wrote:

Everyone learns Python in highschool. It's not that big of a deal. Now, Pygame on the other hand...

Not in Sweden, I'll start in the "Gymnasium" (Swedish School in which you start when you are 16) in 6 months, In the Gymnasium-program I will read, you learn Java and C# and you'll also learn web developing and some game programming with C#  smile


http://i571.photobucket.com/albums/ss159/JacobKar/svensktiger-1.png

Offline

 

#15 2009-11-06 16:00:03

Boxhead
Scratcher
Registered: 2009-09-28
Posts: 100+

Re: whoot! maybe I will learn python!

Python is the simplified version of those stuff, and you probably will have to learn it.


Boxhead - Living in a box, and having a head since '76

Offline

 

#16 2009-11-06 16:02:07

jacool
Scratcher
Registered: 2008-01-25
Posts: 1000+

Re: whoot! maybe I will learn python!

Boxhead wrote:

Python is the simplified version of those stuff, and you probably will have to learn it.

Nope! I was one the Gymnasium fair two days ago and asked some teachers all about the program I want to read.... And I already know Python o.O

Last edited by jacool (2009-11-06 16:02:22)


http://i571.photobucket.com/albums/ss159/JacobKar/svensktiger-1.png

Offline

 

#17 2009-11-06 16:14:01

Boxhead
Scratcher
Registered: 2009-09-28
Posts: 100+

Re: whoot! maybe I will learn python!

So you've learned it already? Then why are we having this conversation? I said you'll learn it. It doesn't matter if you've learnt it before I posted this, what matters is that you've learnt it.


Boxhead - Living in a box, and having a head since '76

Offline

 

#18 2009-11-06 17:48:26

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: whoot! maybe I will learn python!

jacool wrote:

Boxhead wrote:

Python is the simplified version of those stuff, and you probably will have to learn it.

Nope! I was one the Gymnasium fair two days ago and asked some teachers all about the program I want to read.... And I already know Python o.O

Python isn't extremely hard, but it is advanced to newbies. If you want to program something like that but easier you should try JUSTBasic


Scratchin' since 2007

Offline

 

Board footer