#21
|
|||
|
|||
No, the message isn't displayed.
Sound format is wav. |
#22
|
|||
|
|||
I just tested it in a new VMwared copy of Windows XP Pro SP3 and I didn't have a problem after changing the sound file path.
Oh, I just thought of something. Is JDownloader set to a language other than English? The reason I ask is because the script is set to look for the window title "[somesite]: Please enter", but if it's in Spanish for example it will say "[somesite]: Por favor ingresar" and will not be detected. You can fix this by changing the "Please enter" in the $DetectWindow variable to what the window says in your language. |
#23
|
|||
|
|||
Ok, solved! JDownloader was set to italian, now It's set up to English and work! (message and wav file)
Thank you very much!;) |
#24
|
|||
|
|||
Script Updated to v1.1
v1.1 (9/20/2010)
|
#25
|
|||
|
|||
Quote:
Chronomaster you rule!!!!!!!!! thank you so much! I can now get other stuff done! : ) not sure why its so difficult to have the program do this (yes, I feel entitled to complain cuz even though this program is FREAKING GENIUS, I donated a tidy sum so there! thanks again chrono! I bow to your programmyness |
#26
|
|||
|
|||
Sorry, someone help me with this script?? I don't now how to add it to my jdownloader (0.9.580).
|
#27
|
|||
|
|||
This is not a script you can add to JDownloader.
For this script you must install AutoIt then you need to right click on your desktop and choose 'New -> AutoIt v3 Script' after that, right click on the file and choose "Edit Script". Once the editor window appears, replace the content with my script then save. Close the window and double click on the file to run it. While it's running it will be located in the system tray by your clock. To quit the script, right click on the icon in the system tray and choose "Exit". |
#28
|
|||
|
|||
Quote:
I did as you wrote, and still no sound when capatacha code displays. Tell me what I have to change in order was the sound of the display capatacha code from servers such as hotfile.com, fileserve.com. |
#29
|
|||
|
|||
Quote:
Look for this icon in the system tray and the hidden tray icons, if it not there the script is not running. 2. Is JDownloader set to a language other then English? |
#30
|
|||
|
|||
Linux solution
Working for me linux solution written as bash scrips is following:
Code:
#!/bin/sh PLAY=0 while [ true ]; do WIN=`xdotool search --title 'please enter'` if [ -n "$WIN" ]; then PLAY=1 else PLAY=0 fi if [ $PLAY = 1 ]; then aplay /path/to/sound/file/jdsound.wav fi sleep 5 done It requires xdotools and aplay installed (usually from given distribution repository). Copy code to text file, name it somehow (eg. jdsound.sh), chmod it to 0755, provide wav sound file, replace "/path/to/sound/file/jdsound.wav" part with your sound file path and execute. Sound should appear when window with 'please enter' text in title will be opened. Tested on gnome (ubuntu hardy). |
#31
|
|||
|
|||
Thanks, this looks very nice.
|
#32
|
|||
|
|||
Instead:
Code:
echo CAPTCHA! | sendxmpp --tls --user user --jserver yourserver.com --password password recipient@jabberserver.com Gives XMPP/jabber notification. Needs sendxmpp package. |
#33
|
|||
|
|||
Hello there
i also have my version of enabling sound on linux when desired window popups This is the script that wroted my buddy: Code:
# title_window # Copyright (C) 2010 Rafal Pogorzelec (mail:http://www.google.com/recaptcha/mailhide/d?k=01we46RSAUuqHSIbxuEMpsSQ==&c=SGoWxLS_x56S5_ScSXPXwCtmTBN5-ln181pkuq2_xpg=) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <**External links are only visible to Support Staff** import subprocess,re if __name__ == '__main__': xprop = subprocess.Popen(('xprop', '-root', '-spy'),stdout=subprocess.PIPE, stderr=subprocess.PIPE) while True: line = xprop.stdout.readline() if not line: break if re.match('_NET_ACTIVE_WINDOW', line): try: id = re.split(' ', line)[4] xwininfo = subprocess.Popen(('xwininfo', '-id', id),stdout=subprocess.PIPE, stderr=subprocess.PIPE) while True: line = xwininfo.stdout.readline() if not line: break if re.match('xwininfo', line): m = re.compile('".*"').search(line) if m: title = m.group() print title if re.search('', title): play = subprocess.Popen(('aplay','sound/sound.wav'),stdout=subprocess.PIPE, stderr=subprocess.PIPE) except IndexError: pass Its writed in python language and for working python 2.6 must be installed - pet file of python 2.6 (for puppy linux - i work on that version of linux ) can be found here:dotpups.de/puppy4/dotpups/Programming/python-2.6.4-i386.pet Small description/howto: In attached file there is 2 catalogs: license - GPL license tw - in that catalog there is python script that plays sound when wanted window popups and catalog with sound file (default - sound.wav, i added 2 more sounds from windows ) edit line Code: if re.search('', title): for eg jdownloader Code: if re.search('Please enter', title): - for english language version of course eg for Polish it will be: Code: if re.search('Prosz wprowadzi', title): and one file: start_tw - it's start file for python script - i added this file to my-documents/Startup (autostart catalog in puppy) PS Whole popup catalog must be in root catalog PS2 Ups i can't attache file :( it can be found here:megaupload.com/?d=OQ2WLJX9 PS3 Hello there again I uploaded here:megaupload.com/?d=500C3JBQ new version of script. My buddy added very cool feature: Now sound is played in loop with additional delay between played sound as long as window appears, if window disappears then sound stops playing and waiting for next appear of window Regards George2002 Last edited by george2002; 27.10.2010 at 21:58. |
#34
|
||||
|
||||
The python script should need very little change to run in Activestate Python (a free distribution that includes some Windows libraries - you do not have to buy any of their products to make this work).
|
#35
|
|||
|
|||
For Windows IMO there's a simple solution using windows script host, doing exactly the same as my script, and being able to be executed on any windows version without any additional tools. But isn't really simplier to add this single line of code to captcha window in jdowloader?
|
#36
|
||||
|
||||
Quote:
This requires a Setting line (or two) on Modules -> AntiCaptcha to supply the path to the sound file (empty=quiet). The Java code requires importing more classes that are related to sound. Then, function must be written to contain the statement(s) for playing the sound files. Exception handling (to log and then ignore any errors adds more code. Finally, there is the call to the function. Technically, there should be synchronization to avoid overlapping sound calls, but we can let the library deal with it (that is one of the exceptions that must be caught). Research 1-2 hours, Coding test program for the function, 1 hour (must test existing and non-existing sound files)). Coding function and call to function 1 hour. Rework, because we forgot to load the Codecs (Nobody ever specified the Container type or the data format - both of these require Codecs). Under Windows, the sound standard for this type of alert is still WAV (uncompressed binary values fed directly to the sound software). However, WAV codecs are not available for all Linux distributions. MP3 is an alternative. This is the container type. Usually data is clipped, frequency limited, and then compressed. The compression/decompression requires a codec. This should be available on Java 1.6 or later. I don't know about 1.5. |
#37
|
|||
|
|||
OK, well done job takes more than a while. But I've been thinking about something much simplier, which is adding a command line option --exec-on-captcha="command" as a workaround. The command could be system-dependend and could give a sound, send jabber message, and do whatever you want. On the other hand, if you plan to add fully-functional event manager within a fair amount of time, there's no reason to clutter the code with such solutions. But if we will be waiting longer time for that, why not to do it?
|
#38
|
|||
|
|||
I really don't want to waste you're time but for some odd reason this script isn't working for me. I got installed a English version of Windows XP Professional, running the latest version of JDownloader v 0.9.580 and using the English language interface. I also installed the AutoIt v3 program package for their official site. So there can't be any problem with the language and any other programs I use.
I'm downloading form a site called "filesonic. com" so I changed this correctly in your script like this (oh and yes the pop-up window for CAPTCHA input is entitled with exactly the same title as it is written below) Code:
$Title = "filesonic.com: Please enter" Code:
Sleep(250) Code:
While 1 If WinExists($DetectWindow) Then ExitLoop Else Sleep(250) EndIf WEnd Well I would love to see this working on my computer and I'm also really thankful for his great script of you. Thank you for any help in advance |
#39
|
|||
|
|||
Why do you want it to recognise the filesonic captcha alerts only?
The script works fine with ": Please enter". If you want to be sure, only use "filesonic.com", because there might be invisible, special characters in that window title. I'm using "Captcha Alert : a simple tool solution.". It's similar but you don't need AutoIt and you can set several window titles at once. I'm already using it for 4 different applications and I'm no longer missing 'hidden' or 'silent' alerts. |
#40
|
|||
|
|||
Thank you for help remi
|
Thread Tools | |
Display Modes | |
|
|