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!
Offline
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!
Offline
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
Offline
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.
Offline
Lol archmage don't they have supercomputers for that?
Offline
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 evilI 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
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
I called the program pi power.
If you want to see pi to a million digits go to http://www.piday.org/million.php
Offline
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
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
Last edited by Kingbradley6 (2008-08-25 07:36:23)
Offline
Lol. first post here in more than a year
I made a VBS opening and closing the CD tray 100 times I hade the script on my USB stick and a friend wondered what it was so he opened it at a school computer
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
Offline
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#
Offline
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)
Offline
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.
Offline
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
Offline