#1
|
|||
|
|||
Unresponsive Dialog from Event Scripter
I'm trying to complete an Event Scripter script, which calls the API, to redirect links to a different package depending on characteristics within the link.
So on the initial execution JD displays the confirmation Dialog "Event Scripter permissions required!" because I'm calling linkgrabberv2/addLinks. My problem is that this is unresponsive to any mouse clicks or keyboard actions like Tab, Space or Return, though it is usually draggable. It is presented with focus on the "allow" button. I have tried upping the VM to 1G, and deleting some thousands of links, with no improvement in behaviour. The only method of recovery is to Force Quit JD. Any suggestions for a workaround would be appreciated, as I'm sure I'll be needing to edit my script and go through this pain several times. I wondered if a visit to Advance Settings would help, but I haven't discovered anything. Last edited by Nimboid; 03.12.2024 at 02:44. Reason: Clarification |
#2
|
|||
|
|||
Which trigger? If it has "synchronous execution" checkbox enabled, try disabling it.
|
#3
|
||||
|
||||
@Nimboid: Can you please show script and tell us the uses trigger? most likely a deadlock within the EDT due to the enabled "synchronous execution"
__________________
JD-Dev & Server-Admin |
#4
|
|||
|
|||
Thank you, unchecking 'Synchronous execution' fixed the problem.
Earlier, after taking a break, I had the idea of trying the Test Run option in the Script editor, this also overcame my problem, and is a viable workaround. |
#5
|
||||
|
||||
Would be nice to have this information so I can try to optimize/avoid the deadlock
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
Here's a cut down version of the script, exhibits same behaviour:
Code:
// Trigger: A new link has been added // Hangs with unresponsive Dialog if not Test Run from Script Editor. log('Trigger: A new link has been added'); log('getName(): ' + link.getName()); var myCrawledLink = crawledLink; log(myCrawledLink.getUUID()); // 1733248670078 log(typeof myCrawledLink.getUUID()); // string var myCrawledPackage = myCrawledLink.getPackage(); var packName = myCrawledPackage.getName() + " (caught links)"; var dlPath = myCrawledPackage.getDownloadFolder(); var temp = myCrawledLink.getUUID(); var linkUUIDs = []; linkUUIDs.push(temp); try { callAPI("linkgrabberv2", "movetoNewPackage", linkUUIDs, [], packName, dlPath); /* Parameters 1 - linkIds (long[]) 2 - pkgIds (long[]) 3 - newPkgName (String) 4 - downloadPath (String) */ // Next only works if the package already exists! /* callAPI("linkgrabberv2", "addLinks", { "overwritePackagizerRules": true, "links": myCrawledLink.linkUrl, //"links": myCrawledLink.getContentURL(), "packageName": 'Test Package (caughtup)' }); */ log("API call succeeded"); } catch (err) { log("Error: " + err + ""); } I have further queries about how to achieve my task, which perhaps I should ask in a separate thread. . |
#7
|
||||
|
||||
@Nimboid: Thanks! Found the cause and working on it
__________________
JD-Dev & Server-Admin |
#8
|
||||
|
||||
@Nimboid: please test again, should no longer cause blocking gui
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|