JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #21  
Old 20.09.2010, 12:40
arsenic0
Guest
 
Posts: n/a
Default

No, the message isn't displayed.
Sound format is wav.
Reply With Quote
  #22  
Old 20.09.2010, 14:31
CHRONOMASTER
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #23  
Old 20.09.2010, 15:32
arsenic0
Guest
 
Posts: n/a
Default

Ok, solved! JDownloader was set to italian, now It's set up to English and work! (message and wav file)

Thank you very much!;)
Reply With Quote
  #24  
Old 20.09.2010, 16:39
CHRONOMASTER
Guest
 
Posts: n/a
Default

Script Updated to v1.1

v1.1 (9/20/2010)
  • Added $Title variable to "Settings" to help non-English JDownloader users set captcha window detection.
  • Changed the default $SoundFile variable to a audio file available to all XP/Vista/7 users.
Reply With Quote
  #25  
Old 20.09.2010, 18:58
Fudgeman
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by CHRONOMASTER View Post
Hello Everyone,


Today I'm bringing you a useful AutoIt script that should help out a few JDownloader users.

What this script does is it creates a sound alert that repeats every 5 seconds
until the alert is canceled when a captcha window in JDownloader pops up.

[/CODE]

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
Reply With Quote
  #26  
Old 02.10.2010, 17:10
wojtek492
Guest
 
Posts: n/a
Default

Sorry, someone help me with this script?? I don't now how to add it to my jdownloader (0.9.580).
Reply With Quote
  #27  
Old 02.10.2010, 17:42
CHRONOMASTER
Guest
 
Posts: n/a
Default

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".
Reply With Quote
  #28  
Old 03.10.2010, 16:48
wojtek492
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by CHRONOMASTER View Post
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".


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.
Reply With Quote
  #29  
Old 03.10.2010, 22:18
CHRONOMASTER
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by wojtek492 View Post
I did as you wrote, and still no sound when capatacha code displays. ...
1. Check to see that the script is running.
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?
Reply With Quote
  #30  
Old 27.10.2010, 12:06
l0co l0co is offline
DSL User
 
Join Date: Oct 2010
Location: Poland
Posts: 36
Default 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).
Reply With Quote
  #31  
Old 27.10.2010, 15:08
remi
Guest
 
Posts: n/a
Default

Thanks, this looks very nice.
Reply With Quote
  #32  
Old 27.10.2010, 19:46
Tyop Tyop is offline
Ultra Loader
 
Join Date: May 2009
Posts: 47
Default

Quote:
Originally Posted by l0co View Post
Code:
    aplay /path/to/sound/file/jdsound.wav
Instead:
Code:
echo CAPTCHA! | sendxmpp --tls --user user --jserver yourserver.com --password password recipient@jabberserver.com

Gives XMPP/jabber notification. Needs sendxmpp package.
Reply With Quote
  #33  
Old 27.10.2010, 20:55
george2002
Guest
 
Posts: n/a
Default

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 <http://www.gnu.org/licenses/>.

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
and i must say it works awesome
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 20:58.
Reply With Quote
  #34  
Old 28.10.2010, 06:46
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,437
Default

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).
Reply With Quote
  #35  
Old 28.10.2010, 11:45
l0co l0co is offline
DSL User
 
Join Date: Oct 2010
Location: Poland
Posts: 36
Default

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?
Reply With Quote
  #36  
Old 29.10.2010, 07:35
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,437
Default

Quote:
Originally Posted by l0co
But isn't really simplier to add this single line of code to captcha window in jdowloader?
Go ahead. Here is a roadmap:

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.
Reply With Quote
  #37  
Old 29.10.2010, 11:35
l0co l0co is offline
DSL User
 
Join Date: Oct 2010
Location: Poland
Posts: 36
Default

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?
Reply With Quote
  #38  
Old 17.11.2010, 22:07
hostx9
Guest
 
Posts: n/a
Default

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"
After I run the script (yes there is this icon in the taskbar, running the correct script) it seems that it isn't able to recognize the popped-up captcha window. I've enabled the debug mode and it's always running on the line
Code:
Sleep(250)
whatever I do. To test, if the script is even working/running I've deleted the
Code:
    While 1
        If WinExists($DetectWindow) Then
            ExitLoop
        Else
            Sleep(250)
        EndIf
    WEnd
from the code. After I ran it this nice window appears which popped-up when the captcha window is recognized. (if I'm not wrong - the captcha window can't be recognized because I deleted the command which is ordering to detect it.)

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
Reply With Quote
  #39  
Old 18.11.2010, 10:24
remi
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #40  
Old 18.11.2010, 10:37
hostx9
Guest
 
Posts: n/a
Default

Thank you for help remi
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:37.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.