You Are Here:

Community: Developer Discussion Boards

#1 Old How to create flooder - 2008-03-29, 17:48

Join Date: Mar 2008
Posts: 9
purple-boy
Offline
Registered User
how to create a flooder on py like this vb script.



'START OF FILE
'Flooder.vbs
dim wsh
floodlength=10 'lenght of flood
floodgap=50 'gap in each message in milli seconds
set wsh=wscript.createobject("wscript.shell")
wscript.sleep 5000 'wait before starting flood in milliseconds
for i=0 to floodlength
wsh.sendkeys i
wsh.sendkeys "{ENTER}"
wscript.sleep floodgap
next
'END OF FILE
Reply With Quote

#2 Old Re: How to create flooder - 2008-03-30, 09:06

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by purple-boy View Post
how to create a flooder on py like this vb script.



'START OF FILE
'Flooder.vbs
dim wsh
floodlength=10 'lenght of flood
floodgap=50 'gap in each message in milli seconds
set wsh=wscript.createobject("wscript.shell")
wscript.sleep 5000 'wait before starting flood in milliseconds
for i=0 to floodlength
wsh.sendkeys i
wsh.sendkeys "{ENTER}"
wscript.sleep floodgap
next
'END OF FILE
HI purple-boy
welcome to the wonderful python dibo hope you will get the best support here.
can u explain in a bit better way what do want to do.
thanx


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#3 Old Re: How to create flooder - 2008-03-31, 00:21

Join Date: Mar 2008
Posts: 9
purple-boy
Offline
Registered User
'START OF FILE
'Flooder.vbs
dim wsh
floodlength=10 'lenght of flood
floodgap=50 'gap in each message in milli seconds
set wsh=wscript.createobject("wscript.shell")
wscript.sleep 5000 'wait before starting flood in milliseconds
for i=0 to floodlength
wsh.sendkeys i
wsh.sendkeys "{ENTER}"
wscript.sleep floodgap
next
'END OF FILE


_________
copy that script and paste into a notepad, then save it as Flooder.vbs and change type to "all files". Before opening the Flooder.vbs file, make sure to keep a notepad open, and soon as you double click the Flooder.vbs click the notepad that you have opened before, and as you can see 123456789...will be pasted on that notepad. I want to know how to make a python script like that.

Thanks u very much for replys
Reply With Quote

#4 Old Re: How to create flooder - 2008-03-31, 13:19

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by purple-boy View Post
'START OF FILE
'Flooder.vbs
dim wsh
floodlength=10 'lenght of flood
floodgap=50 'gap in each message in milli seconds
set wsh=wscript.createobject("wscript.shell")
wscript.sleep 5000 'wait before starting flood in milliseconds
for i=0 to floodlength
wsh.sendkeys i
wsh.sendkeys "{ENTER}"
wscript.sleep floodgap
next
'END OF FILE


_________
copy that script and paste into a notepad, then save it as Flooder.vbs and change type to "all files". Before opening the Flooder.vbs file, make sure to keep a notepad open, and soon as you double click the Flooder.vbs click the notepad that you have opened before, and as you can see 123456789...will be pasted on that notepad. I want to know how to make a python script like that.

Thanks u very much for replys
Hello,

I don't think you can achieve the exact same effect in Python (you can't literally see the numbers being added to the file in real time) but you can fill a file with numbers the way you did:
Code:
import codecs, e32

#Open the file
f=codecs.open("c:\\python\\f.txt", "w", "utf_8")

#Wait 5000 millisecs before starting
e32.ao_sleep(5)

l=10  #The "length" of the flooder
i=1
while(i<=l):
   f.write(u"%d\n" % i)
   i+=1
   e32.ao_sleep(0.05)  #The gap of 50 millisecs
f.close()
Hope this helps
Reply With Quote

#5 Old Re: How to create flooder - 2008-04-01, 01:00

Join Date: Mar 2008
Posts: 9
purple-boy
Offline
Registered User
thank u very much bogdan.galiceanu, it works.
so i think we can make a script that can paste the numbers to java applications huh? like chat window?? i have created a script like im tellin, but i dunno how to create by WHILE LOOP like u did in that script. see my script..


Code:
import e32
import appswitch
from key_codes import *
from time import sleep
import keypress

print appswitch.switch_to_fg(u"Morange") #Morange is chat application, take chat window
e32.ao_sleep(2)

keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1) # result is "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2) # result is "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3) # result is "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4) # result is "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5) # result is "5"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "5"
plz tell if there is a easy way other than this.
example what i want:
- first ask to type how much is the maximum number from 1 to. (input is 10)
- that means autometically paste the numbers between 1-10.

thanks alot bogdan.galiceanu
Reply With Quote

#6 Old Re: How to create flooder - 2008-04-01, 05:28

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
In order to ask for a maximum number, you could use
Code:
n=appuifw.query(u"Type the maximum number", "number")

#This stores the max number in the variable n
If you find it hard to use "while" loops, "for" would be like this:
Code:
for i in range(n):
    print i

#This writes numbers from 1 to n
Reply With Quote

#7 Old Re: How to create flooder - 2008-04-01, 18:09

Join Date: Mar 2008
Posts: 9
purple-boy
Offline
Registered User
what about this script? can i do this easy?


Code:
import e32
import appswitch
from key_codes import *
from time import sleep
import keypress

print appswitch.switch_to_fg(u"Morange") #Morange is chat application, take chat window
e32.ao_sleep(2)

keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1) # result is "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2) # result is "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3) # result is "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4) # result is "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5) # result is "5"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "5"
Reply With Quote

#8 Old Re: How to create flooder - 2008-04-01, 18:33

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by purple-boy View Post
what about this script? can i do this easy?


Code:
import e32
import appswitch
from key_codes import *
from time import sleep
import keypress

print appswitch.switch_to_fg(u"Morange") #Morange is chat application, take chat window
e32.ao_sleep(2)

keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EKey1, EKey1) # result is "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EKey2, EKey2) # result is "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3)
keypress.simulate_key(EKey3, EKey3) # result is "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "3"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4)
keypress.simulate_key(EKey4, EKey4) # result is "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "4"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5)
keypress.simulate_key(EKey5, EKey5) # result is "5"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "5"
You could write it like this, but the effect is the same:
Code:
import appswitch
from key_codes import *
from time import sleep
import keypress

print appswitch.switch_to_fg(u"Morange") #Morange is chat application, take chat window
e32.ao_sleep(2)

keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
for i in range(5):
   keypress.simulate_key(EKey1, EKey1)
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "1"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write
for i in range(4):
   keypress.simulate_key(EKey2, EKey2)
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # press ok to write "2"
keypress.simulate_key(EScancodeSelect, EScancodeSelect) # select to write

#And so on
Sorry I this wasn't much help, but I can't think of another way.
Reply With Quote

#9 Old Re: How to create flooder - 2008-05-02, 02:14

Join Date: Jul 2005
Posts: 14
ballagas
Offline
Registered User
I am experiencing an interesting problem with keypress. I can successfully simulate the select key with the following line of code:

keypress.simulate_key(EKeySelect,EScancodeSelect)

It behaves just as the real key press most of the time. However when selecting from a list (such as in the Contacts application), the simulated key does not act the same as the real key press. The real key press opens the highlighted item. The simulated key press marks the highlighted item with a checkbox. Does anyone know how to simulate a list selection with a keypress?
Reply With Quote

#10 Old Re: How to create flooder - 2008-05-02, 06:03

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
What happens if you replace EKeySelect with EKeyEnter?

Wondering,

--jouni
Reply With Quote

#11 Old Re: How to create flooder - 2008-05-07, 02:21

Join Date: Jul 2005
Posts: 14
ballagas
Offline
Registered User
I did try EKeyEnter. It works for most situations, just like EKeySelect. I can select applications from the menu, I can select items from most lists, except in the Contacts application. In the Contacts application, EKeyEnter doesn't seem to have any result if no item is selected. This is notably different from EKeySelect, which highlights the listed item as selected with a check mark icon instead of opening the contact. Once a contact is selected, the EKeyEnter activates the options menu. Any other ideas on how I can simulate opening a contact from the list?
Reply With Quote

#12 Old Re: How to create flooder - 2008-05-07, 11:33

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by ballagas View Post
In the Contacts application, EKeyEnter doesn't seem to have any result if no item is selected. This is notably different from EKeySelect, which highlights the listed item as selected with a check mark icon instead of opening the contact. Once a contact is selected, the EKeyEnter activates the options menu. Any other ideas on how I can simulate opening a contact from the list?
Did you just say that you can open a Contact with:

keypress.simulate_key(EKeySelect,EScancodeSelect)
keypress.simulate_key(EKeyEnter,EScancodeEnter)
keypress.simulate_key(EKeyEnter,EScancodeEnter)

--jouni
Reply With Quote

#13 Old Re: How to create flooder - 2008-05-07, 22:53

Join Date: Jul 2005
Posts: 14
ballagas
Offline
Registered User
Quote:
Originally Posted by JOM View Post
Did you just say that you can open a Contact with:

keypress.simulate_key(EKeySelect,EScancodeSelect)
keypress.simulate_key(EKeyEnter,EScancodeEnter)
keypress.simulate_key(EKeyEnter,EScancodeEnter)

--jouni
No that is not correct. Sorry for the confusion. Here is a more detailed description of what is going on.

1) keypress.simulate_key(EKeySelect,EScancodeSelect)

This causes the highlighted contact to be marked with a check mark to the right of the name.

2) keypress.simulate_key(EKeyEnter,EScancodeEnter)

This activates the menu with the following options: (PTT options >, Create message, Delete, Mark/Unmark >, Copy >, SIM Contacts >, Send business card, Settings, Help, Exit)

3) keypress.simulate_key(EKeyEnter,EScancodeEnter)

This brings up a submenu of PTT options with one option: (Talk to many).

There doesn't seem to be a way to open the details of the contact using any combination of EKeyEnter or EKeySelect in the Contacts app.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Trusted Application damien_a Mobile Java General 7 2008-02-25 17:45
Steps to create SIS. How create .pkg file for petran? BobbyFletcher Symbian Tools & SDKs 1 2004-04-21 19:26
Not able to create CAknIntegerEdwin/CAknNumericEdwin gpalvia Symbian User Interface 2 2004-03-05 12:02
How to create Video MMS .... for 7650 TrickLo General Messaging 3 2003-12-08 04:28
how to create a grid ddhungry Symbian User Interface 0 2002-11-27 09:08

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia