RorohikoKris
Contributor
RorohikoKris
Contributor
Activity
‎Jul 18, 2019
04:53 PM
Hi Arun, I've tried that, but it makes the VSCode extension unusable for me. It starts spewing a lot of info into the debug console, and ends with 'Get Frame Timeout.' And then everything locks up. I can stop my script, but I am unable to run it in the debugger. I think the 'trace' mode is overwhelming for VSCode to handle {"0":"[1563493462352] prepareSession Target connected. Starting session."} [1563493462352] prepareSession Target connected. Starting session. {"0":"<break flags=\"0\" engine=\"com.siliconpublishing.inDesignESDriverSnippets\"><stack><frameinfo>[buildInDesignFiles.jsx]</frameinfo></stack><frame file=\"~/Documents/Controlled/SiliconPublishing/ExportQXP/ExportQXP/tools/buildInDesignFiles.jsx\" line=\"22\" type=\"script\"><source><![CDATA[\n// Run this script in InDesign\n\n//@targetengine com.siliconpublishing.inDesignESDriverSnippets\n\nmain.SCRIPT_NAME = \"buildInDesignFiles\";\nmain.RELATIVE_PATH_TO_FRAMEWORK_ROOT = \"/../\";\nmain.DEBUG = true;\nmain.FORCE_RESET_MODULES = true; // Can set this to false in production code\nmain.LOG_TO_FILE = true;\nmain.LOG_TO_CONSOLE = false;\nmain.LOG_TO_SOCKET = false;\nmain.LOG_TO_WEB_SOCKET = false;\nmain.LOG_LEVEL = 3;\nmain.LOG_ENTRY_EXIT = false;\nmain.HOT_FOLDER_RELATIVE_FROM_HOME = \"Dropbox/Tunnel_VMs/dolly-mojave/exportqxp/\"\nmain.OVERWRITE_EXISTING_INDD ... SNIP ... else {\n debugger; // TODO\n }\n systemEnvironment.loadScript = app.importScript;\n }\n\n return systemEnvironment;\n}\n\n})();\n\n}\n\n// -- \n\nROOT.main();\n]]></source></frame><profiling/></break>"} Get Frame Timeout.
... View more
‎Jul 12, 2019
01:26 PM
Thanks for that. Next time I am caught in a debugging session, I'll try those things!
... View more
‎Jul 07, 2019
03:16 PM
1 Upvote
Hi all,
I've been trying really hard to use the VSCode ExtendScript Debugger in my day-to-day development workflow.
Since the first version, it's seen some marked improvements.
It is more or less usable, but working with it is still very frustrating.
The areas I see most problems with are:
- Inspecting the variables: for unclear reasons, the variable inspection very often stops working or fails to show variables, or hangs when browsing 'into' an object. Often, a 'little spinner' starts spinning, and never stops, and no variables show.
- Trying to open certain objects by clicking the disclosure triangle does not work. I have a feeling inspecting variables in the 'Global' space is less dependable than variables in the 'Local' space.
- Sometimes the 'Local' and 'Global' variable lists get swapped. My locals suddenly get listed under 'Global' and vice versa.
- The Extension Host crashes at random times and needs to be relaunched.
My debug sessions are often long, and having to start over after stalking a complex bug for 30 minutes is very frustrating.
For me, the old ESTK is currently still more usable than the VSCode.
The problem I have is that it would be hard to file a bug report for this: none of the issues that make it hard to use are repeatable. The issue is just a general 'unstableness'.
Is this currently being tackled, or should I file some sort of bug report?
... View more
‎May 16, 2019
06:16 PM
1 Upvote
Yes, CEP (Common Extensibility Platform) is nearly end-of-life. But last year, at the Creative Developers Summit in New Orleans, it became apparent that there is still a need for CEP for people who automate InDesign, Illustrator, Photoshop... UXP will be great, but the operative word is 'will'. It is not there yet. This year, I am running a workshop the day before the Creative Developer Summit in Seattle: https://www.rorohiko.com/wordpress/2019/05/01/a-guide-to-building-cep-extensions/ Cheers, Kris
... View more
‎Mar 13, 2019
12:13 PM
As far as I know, I think the main difference between evalFile and include is that include is handled when compiling to .jsxbin, whereas evalFile is handled at runtime.
... View more
‎Mar 13, 2019
12:07 PM
1 Upvote
Cool, that works!
... View more
‎Mar 06, 2019
02:47 PM
That does not work for my workflow. I am writing 'real' ExtendScript, not JavaScript. That means I have a whole lot of #include statements in my script. When I use #include all I see is masses of 'problems' because the syntax checker does not understand ExtendScript, and it's trying to make sense of it as if it is JavaScript. The errors I am looking for are in one of my #include files, and of course the syntax checker has no idea to check them.
... View more
‎Feb 27, 2019
05:50 PM
I've started using it, and it seems to work reasonably well. I'm working on a hybrid CEP/ExtendScript thing right now, and starting to find my way around, trying to find the easiest way to do 'dual-mode' debugging. There is still a lot for me to discover, and it'll be a while before I can settle for an efficient workflow, but it's already useful. One thing that I find a bit annoying is when I accidentally leave a syntax error in the source code, then try to run it. As far as I can tell, all it says is (#15)Cannot execute script in target engine 'main'! With the old ESTK, it will highlight the error. Am I missing something? I did not immediately spot anything related in the docs. To see the issue, create a script with something bad in it - e.g. a=; My scripts are large with many #include files, so to find a syntax error I currently quit VSCode, then launch ESTK which will point it out immediately.
... View more
‎Nov 20, 2018
11:11 PM
The ESTK I tried it with is 4.0.0.1, and I ran a script in InDesign CC 2019.
... View more
‎Nov 20, 2018
07:55 PM
5 Upvotes
Here's a nasty hack that seems to work for me. Let me know how it works out! Quit the ExtendScript Toolkit if it is running. Make a backup copy of the .app file (I right-click it and select 'Compress' so I end up with a copy in a .zip file in the same folder). Open up the file embedded in the ExtendScript Toolkit app: .../ExtendScript Toolkit.app/Contents/SharedSupport/Required/73session.jsx Change lines 1223 and 1224 (your line numbers might not be the same); they should be made to look as follows: if( !this.dbgSession.tmpSilentStop ) errorInfo.display( errCode != 1116 && errCode != kErrEngineHalted ); This will suppress the dialog for that particular error code (so any other errors will still display). Save. Now try again. This is not a fix. I am simply suppressing the dialog, and it kind of works. One thing that is broken is that you cannot run scripts that target the ExtendScript Toolkit itself.
... View more
‎Oct 04, 2018
08:06 PM
I think the issue is that shortcuts are not supported, but 'symbolic links' are. These do exist on Windows, but are rarely used. I use this trick to install my extension development in progress without copying them into the ...\extensions folder. The MKLINK command does that for you. For some hints, check out CEPSparker/localDebugInstall.bat at master · zwettemaan/CEPSparker · GitHub It should give you some pointers...
... View more
‎Oct 04, 2018
07:56 PM
1 Upvote
Hi, As Manan indicated, you've bumped into a feature of CEP. Any changes to the source code invalidates the extension and it won't run until either a) You re-sign the extension, so the new signature matches the source code changes b) You switch your Creative Cloud settings to 'debug mode', so it will run extensions with invalid signatures This has nothing to do with GetURL - it's a feature of CEP. The easiest is to switch to debug mode. I've written some handy scripts to do that for you: CEPSparker/setPlayerDebugMode.command at master · zwettemaan/CEPSparker · GitHub CEPSparker/setPlayerDebugMode.bat at master · zwettemaan/CEPSparker · GitHub Once you run these, you can change all you like and the extension should still run.
... View more
‎Oct 12, 2017
02:01 PM
2 Upvotes
Note: I've re-done GetURL ; this blog posts explains how to also support https. Only works in more recent versions... http://coppieters.nz/?p=133
... View more
‎May 08, 2017
11:34 PM
Very nice! Thanks for sharing! Cheers, Kris
... View more
‎May 08, 2017
11:32 PM
Hi all, Just a quick note: I've revisited the old GetURL and made a more modern version which does support https as well as http. All smoke and mirrors. More information and source code on my personal blog: http://coppieters.nz/?p=133 Cheers, Kris (Rorohiko)
... View more
‎May 08, 2017
10:38 PM
Hi all, Just a quick note. This might or might not be a workaround for this issue. I've revisited the old GetURL I wrote many years ago, and made a more modern version which does support https as well as http. All smoke and mirrors. More information and source code on my personal blog: http://coppieters.nz/?p=133 The 'getURL' is whatever is implemented in the Node.js inside of InDesign - so I suspect it will be able to use more recent TLS versions. Cheers, Kris (Rorohiko)
... View more
‎May 08, 2017
10:31 PM
1 Upvote
Hi all, Just a quick note: I've revisited the old GetURL and made a more modern version which does support https as well as http. All smoke and mirrors. More information and source code on my personal blog: http://coppieters.nz/?p=133 Cheers, Kris (Rorohiko)
... View more
‎Apr 04, 2017
05:00 AM
1 Upvote
Swimmer uses GREP expressions. The '+' has special meaning to GREP, and it must be escaped to be treated as a normal character. So you need to do: ... text = "\\b\\+\\b" ...
... View more
‎Apr 03, 2017
01:39 PM
Hi Jarek, Can you try again? I got in a bit of a pickle struggling with the CloudFlare CDN yesterday. I have not gotten to the bottom of it, but I ran out of time. For the time being I've attempted to detach the site from CloudFlare, until I have some uninterrupted time to figure out what is going wrong. It should be working for now. I hope. 😞 Thanks! Cheers, Kris
... View more
‎Apr 03, 2017
12:07 AM
Great stuff! Thanks for letting me know! Cheers, Kris
... View more
‎Apr 02, 2017
11:56 PM
1 Upvote
Drats. Thanks for letting me know. It's probably fail2ban. I need to reconfigure it to work with CloudFlare to avoid banning 'shared' IP addresses. I've turned it off for now - can you try again?
... View more
‎Apr 02, 2017
02:46 PM
Hi all, I've written a little blog post about the upcoming Adobe-sponsored Creative Developers Summit in Atlanta. If you're into scripting and automating InDesign; help is at hand. More info: click the link: http://thoughtbridg.es/why-you-need-to-attend-creative-developers-summit/
... View more
‎Feb 17, 2015
11:28 AM
Not sure, but I'd also make sure to check the returned error value from error = sAIDocument->GetDictionary(&dictionary); Just to make sure to catch unmet assumptions (i.e. I think you're assuming that if the call fails, dictionary will be NULL. That assumption is probably correct, but I would not bet on it, and I'd check the error code first). Often the error codes have valuable info in them. For myself, I've compiled a list of various error codes by GREP-ping the SDK folder, which I found very useful. I am not sure whether there is a proper list available somewhere - I haven't found it, but I also haven't looked very hard.
... View more
‎Feb 16, 2015
12:02 PM
Hey Luca, Long time no see! If that happened to one of my plug-ins I'd suspect some memory overwrite, double deallocation, using non-allocated memory, wrong pointer dereference, index overrun, that kind of stuff. I always compile my plug-ins on Mac and on Windows, and I always find that some bugs can go largely unnoticed on one platform, but are detectable on the other; I frequently alternate from Mac to Windows and back during development as a means of catching more issues. This seems to be such a case. Make sure to test with the debug version of InDesign - that will catch a lot of bad behavior. If you are already doing that, or the issue does not show up, you might need to look into the various low-level memory management debugging tools. Without the debug version, all kinds of bad stuff can happen without you noticing. The debug version has an extensive safety net to catch many, but not all, such issues. In my experience, such warnings indicate nearly always a real problem and warrant investigation and need to be fixed. Often, you might see them 'go away' by themselves as the code is being worked on, but that normally just means that the memory overwrite has moved to a different area where it is not being detected any more. My recommendation: don't let this 'slip away'. I've often seen developers poke around aimlessly until the issue suddenly goes away, and assume they've 'fixed it'. That's dangerous. Unless you gain complete understanding of what is happening and why you get the error, you'd be sitting on a time bomb. Having a repeatable crash is worth a lot: that can help you diagnose where it is coming from. If you're interested, I am going to PePcon, and we're having a little developer get-together there: Creative Developers Summit - PePcon
... View more
‎Feb 16, 2015
11:32 AM
Hi, This normally means something is wrong with some paths. What I tend to do to help diagnose is temporarily modify merge_res.cmd so it displays the paths it is getting. It's been a while since I needed to do this, so I can only describe the broad strokes in what to do. If you open merge_res.cmd in a text editor, you edit it and add some additional info: I had a quick look, and I noticed these lines: rem echo %RESFILE% rem echo %FRESFILE% rem echo %TEMPRESFILE% I'd uncomment them, and then try again. With a little luck, your Output window in Visual Studio will show what each of these are. If nothing appears (I am not 100% sure the echo-s from the .cmd will make it to the Output Window), make it something like echo %RESFILE% > C:\tmp\merge_res_log.txt echo %FRESFILE% >> C:\tmp\merge_res_log.txt echo %TEMPRESFILE% >> C:\tmp\merge_res_log.txt You can also throw in some additional things: echo %1% echo %2% echo %3% to help figure out what is happening. Then you need to check your project file and properties in Visual Studio. I often forego Visual Studio, and instead open the .vxproj project file and the various .props files in a text editor, which makes it much easier to get an overview. Somewhere in there is an incorrect path setting. Hope that helps. It's not possible to give you a simple 'do this and that fixes it' response: too many variables involved. If you would like to have a more in-depth discussion, a number of InDesign SDK developers will be at PePcon 2015; I'll be there! http://www.pepcon.com/session/creative-developers-summit-2015/
... View more
‎Oct 28, 2014
03:26 PM
P.S. For our own use, I've taken a different tack: I've extended our APID ToolAssistant plugin to include a full http/https stack, so I can call from ExtendScript into APID ToolAssistant and that handles the HTTPS magic. All through the magic of C++ libraries like boost and urdl. I've not exposed that information as it's more of an in-house hack, but if there is interest, I can write up a bit of documentation on it. It's not a full-fledged solution, just a very basic 'fetchURL' which supports both http and https. Call it, get data back in synchronous fashion. Not very neat or tidy, but does the trick for what I needed.
... View more
‎Oct 28, 2014
03:22 PM
Hi Trevor, You're absolutely right. I checked the code, and it is not yet using the join() trick - it was all written before I cottoned on to that trick, and it would nearly certainly make a big difference on larger data transfers. However, it won't solve https - the hard part is writing the decryption. I don't think it is impossible, but I expect it to be slow - a lot of low-level bit manipulations going on, which is not exactly JavaScript's forte.
... View more
‎Oct 28, 2014
12:19 PM
Hi Wanyuee, No, https is not part of the picture: I don't think it's feasible to write up https support on top of the Socket: I haven't tried, but I am pretty sure ExtendScript is a bit too slow for that. Sorry about that!
... View more
‎Feb 27, 2014
02:08 AM
1 Upvote
Hi all, The latest APID ToolAssistant is compatible with CC. We haven't updated the developer toolkit, but nothing has been changed to that part - only the 'runtime' plugin has been updated, and works fine with CC, so the Toolkit can be used with CC as long as you download the correct APID ToolAssistant version from our web site. I have no clear idea what you're attempting to do but it sounds like you're mixing up things. InDesign has scriptable events, and APID ToolAssistant has scriptable events. APID ToolAssistant predates the appearance of InDesign scriptable events by a few years (APID ToolAssistant was first released for InDesign CS), and the approach to events is totally different than what later became the InDesign standard model. There is also a substantial amount of functional overlap - i.e. a lot of things can be done with one as well as with the other. But APID ToolAssistant does have some events or event functionality that InDesign does not provide. I am not sure whether you even need APID ToolAssistant for this particular exercise. The standard InDesign events should cover the functionality you need. So, I'd take APID ToolAssistant out of the picture, and concentrate on the standard InDesign event model. Would that make sense? P.S. If anyone has issues with APID ToolAssistant, we do provide support, hence it might be easier to e-mail support@rorohiko.com rather than post a question on this forum. I don't think there are many people on the forums who know much about APID ToolAssistant (And we also provide Dutch- and French-language support if needed). Cheers, Kris
... View more
‎Feb 25, 2014
12:19 PM
On the slight off-chance: the one thing I forgot to ask: " 'ave you tried turning if off and on again? " - i.e. did you happen to try rebooting the machine? Nowadays, machines have such stable OS that I sometimes overlook doing a good reboot. There's also all these magical 'moves': PRAM reset, power manager reset etc... You can try them for good measure, but I doubt they'll help. It sounds like one of those where diagnosing it would be fun, given unlimited time and money. But barring that, I'd personally haul out the big hammer - deactivate/uninstall/Adobe's CC Cleaner tool/reinstall/reactivate. And if that does not help, the even bigger hammer (OS reinstall). Given that the issue started after an upgrade to the OS, I fear you might be in for the use of the even bigger hammer. Not very elegant, but at some point, fixing the problem becomes more important than an accurate diagnosis
... View more
- « Previous
-
- 1
- 2
- Next »