#1281
|
|||
|
|||
![]() Quote:
Code:
var br = getBrowser(); br.setConnectTimeout(100); br.setReadTimeout(100); var page = null; try { page = br.getPage("http://www.google.de/"); } catch (e) {} alert(page); In the above example, you can see that iIf you use a very low timeout, it will return 'null'. |
#1282
|
|||
|
|||
![]() Quote:
If i set timeout to 10 i also get a null return. But the general timeout is not working as expected. If i measure the loadTime it can get higher than the timeout. e.g. loadTime = 156ms when timeout was set to 50. If a proxy is enabled loadTime can get really high. So the timeout is not working unfortunately. Code:
var br = getBrowser(); br.setConnectTimeout(50); br.setReadTimeout(50); //br.setProxy(...); var page = null; try { var startTime = new Date(); page = br.getPage("http://www.google.de/"); var endTime = new Date(); var loadTime = endTime - startTime; } catch (e) {} alert(loadTime + " " + page); |
#1283
|
|||
|
|||
![]() Quote:
When checking the browsr methods, I also came across a method which returns the total connection time (var myLong = myBrowser.getRequestTime()). This might return the load time more accurately. Have you considered using an external tool to test the proxies? You can schedule them to be checked at regular intervals and then add/remove them from JD using MYJD API. |
#1284
|
|||
|
|||
![]() Quote:
Can the bug get fixed, what can we do to get it fixed? |
#1285
|
|||
|
|||
![]() Quote:
![]() I was able to read the <stdout stream> [au3 ---> JD2] but now I'm trying to do the opposite and I'm having some problems. From what I understand in au3 I use "StdoutRead" but I have 2 doubts: 1) - (au3) i need "process_id" and i can't understand how to spot it. I should "run" the JD script ... but the JD script has launched the au3 script .... 2) - in event scripter ... there is an equivalent to ConsoleWrite ? In short, in the JD script I would like to write a constant to be read by au3 which will be called by the aforementioned script. is such a thing feasible? (jd script schematized) Code:
*** var / func/ etc *** var K = " test or something" *----> {stdout stream ("K")} { holaa = callSync( test.au3 ) <---- read the stdout for grab "K" alert ( holaa) <---- I see the final result / continue with the result of au3 *** etc *** |
#1286
|
||||
|
||||
![]() Quote:
myBrowser.setConnectTimeout(myInt); myBrowser.setReadTimeout(myInt); which you have mentioned timeout value within getpage is not supported. but try and catch should work. .. in respects to mpgai response the method myBrowser.getRequestTime might be a better solution. Keep in mind Javascript support in JD can contain commands that are wrapped back into JD methods, the Javascript interface is sandboxed. Timeouts have always been an issue specially to laggy connections within JD Browser. The interface between sockets and GUI has been a problem as it waits for all connections to close before coming responsive again. Large timeout timeframes are not recommended from personal experience, it just makes situation worse. If a connection can't be used in standard times, you're better off not using it.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] Last edited by raztoki; 22.03.2020 at 02:07. |
#1287
|
|||
|
|||
![]()
While the issue has been reported by many users, none of them were able to provide information on how to reproduce it. If you find any way to do that, you can share it in one of the existing topics or create a new one.
|
#1288
|
|||
|
|||
![]() Quote:
Quote:
Code:
//Example 1 var pid = readFile(JD_HOME + "/jdownloader.pid").trim(); var stdOut = callSync("cmd", "/c", "echo", pid); // Pass the PID to cmd/echo as parameter var K = stdOut.trim().length; alert(K); //Example 2 var pid = readFile(JD_HOME + "/jdownloader.pid").trim(); var stdOut = callSync(ahk, test.au3, pid); // Pass the PID to test.au3 as parameter var K = stdOut; alert(K); |
#1289
|
|||
|
|||
![]()
Thanks mgpai for the reply , but I still have some problems on the "reception" side:
If I wanted to send a "data" to use as parameter I would have to do something like this (right ?) Code:
var $SHText = " insert here sometjing ... please "; var stdOut = callSync(ahk, test.au3t, $SHText); I think maybe I need something like <Local $SHText = Run ....?? > but I can't understand how to solve, what should I write in au3 then? (in the example of the au3 guide they pull the PID into play ... but I have not been able to understand how to use it correctly.) |
#1290
|
|||
|
|||
![]() Quote:
Code:
var $SHText = " insert here sometjing ... please "; alert($SHText); You can then pass it to the AHK script by using something similar to the example in post #1243. |
#1291
|
|||
|
|||
![]()
the origin/source of $SHText value is a costant (a text in this example)
which I declare in the JD script but which should be used in au3 [ it is practically a variable of my au3 but I would like to express it in the JD script , the purpose is to modify only the jd script keeping au3 unchanged ] I had already done tests in which this step I did through special written and read txt (taking inspiration from the example of the post mentioned). But since I was able to eliminate the txt in step [au3-->JD] I'm trying to understand if there is a way not to use them also for [JD-->au3] |
#1292
|
|||
|
|||
![]() Quote:
Code:
www.autoitscript.com/autoit3/docs/intro/running.htm |
#1293
|
|||
|
|||
![]()
yessss !! that's exactly what I'm looking for !!
Thanks again |
#1294
|
|||
|
|||
![]()
Hi Guys,
Would be very grateful if someone could tell me how to convert a colon to hyphen in the package name. Basically I want (word: word) converted to (word - word) wherever a colon might occur in the text at the moment it converts a colon to an underscore, so the folder name is formatted correctly. i'm not too good with the app so not sure where to do all this. |
#1295
|
||||
|
||||
![]()
@pir8mack
there is a map of illegal characters that are changed at the core, as in before package customiser/eventscripter even knows about it, so I don't believe there is a way at this time to alter this at this time. Though I do believe there is a svn ticket to change this behaviour.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#1296
|
|||
|
|||
![]()
Please PM some example urls to me.
|
#1297
|
|||
|
|||
![]()
Hi, I was wondering if it is possible to have jdownloader make the thumbnail image of a youtube video the thumbnail image of the audio file?
Usually I manually do this with mp3tag after each download but was wondering if this could be done automatically with a script as soon as it's finished downloading. I saw a couple of posts about a few things similar to this but I don't know much about script and haven't managed to work it out myself. Many Thanks ![]() |
#1298
|
|||
|
|||
![]() Quote:
|
#1299
|
|||
|
|||
![]()
Need manual extract many archives.
But not to find a method to start extraction. Am I blind? ![]() I want become download list. And for every unextracted I want to start extract. |
#1300
|
|||
|
|||
![]() Quote:
Code:
https://my.jdownloader.org/developers/#tag_195 Let me know if you need any help with it. |
![]() |
Thread Tools | |
Display Modes | |
|
|