| Reply | « Previous Thread | Next Thread » |
|
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 |
| purple-boy |
| View Public Profile |
| Find all posts by purple-boy |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
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 |
|
'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 |
| purple-boy |
| View Public Profile |
| Find all posts by purple-boy |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
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()
![]() |
|
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" 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 |
| purple-boy |
| View Public Profile |
| Find all posts by purple-boy |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
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 Code:
for i in range(n):
print i
#This writes numbers from 1 to n
|
|
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" |
| purple-boy |
| View Public Profile |
| Find all posts by purple-boy |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
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 |
|
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? |
|
What happens if you replace EKeySelect with EKeyEnter?
Wondering, --jouni |
|
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?
|
|
Quote:
keypress.simulate_key(EKeySelect,EScancodeSelect) keypress.simulate_key(EKeyEnter,EScancodeEnter) keypress.simulate_key(EKeyEnter,EScancodeEnter) --jouni |
|
Quote:
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |