×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    9

    How to create flooder

    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

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: How to create flooder

    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

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    9

    Re: How to create flooder

    '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

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to create flooder

    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

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    9

    Re: How to create flooder

    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

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to create flooder

    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

  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    9

    Re: How to create flooder

    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"

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to create flooder

    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.

  9. #9
    Registered User
    Join Date
    Jul 2005
    Posts
    14

    Re: How to create flooder

    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?

  10. #10
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: How to create flooder

    What happens if you replace EKeySelect with EKeyEnter?

    Wondering,

    --jouni

  11. #11
    Registered User
    Join Date
    Jul 2005
    Posts
    14

    Re: How to create flooder

    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?

  12. #12
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: How to create flooder

    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

  13. #13
    Registered User
    Join Date
    Jul 2005
    Posts
    14

    Re: How to create flooder

    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.

Similar Threads

  1. Trusted Application
    By damien_a in forum Mobile Java General
    Replies: 11
    Last Post: 2012-02-17, 20:49
  2. Not able to create CAknIntegerEdwin/CAknNumericEdwin
    By gpalvia in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-07-19, 09:22
  3. Steps to create SIS. How create .pkg file for petran?
    By BobbyFletcher in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-04-21, 18:26
  4. How to create Video MMS .... for 7650
    By TrickLo in forum General Messaging
    Replies: 3
    Last Post: 2003-12-08, 03:28
  5. how to create a grid
    By ddhungry in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-11-27, 08:08

Posting Permissions

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