When running a script containing a "prompt()", Bridge 2023 reports that "prompt is not a function" and stops the script.
When running a script containing a "prompt()", Bridge 2023 reports that "prompt is not a function" and stops the script.
These scripts do run in previous versions.
-
Kukurykus commented
So you mean you tried prompt('Hello') and found it works but didn't tell me about? Instead you acted like it doesn't work?
You came with 'prompt is not a function' error after using the code you did not post. You only said that is about prompt().
Later you posted one line code: var PixSet == prompt("LIST OF PROJECTS:\n\n<1> PHOTOS A\n\n<2> BOOK", "1");
It produces other error than the one you originally came with. This error is: 'Expected: ;'
Then you corrected the code (by changing == to =) and the code started to work.
It does not solve your original problem. It solves something else.
My question is what was the code that caused original error? -
Geoffrey Hartig commented
Thank you for your kind response.
I was unclear too much of the time.
I did try all of your suggestions, but I did not give you feedback on all of them.In my earliest response (March 18, 2023 12:23 PM), I listed a code line:
var PixSet == prompt(“LIST OF PROJECTS:\n\n<1> PHOTOS A\n\n<2> BOOK”, “1”);
and I really should have caught it then, but I missed the obvious and kept on missing it.
I am very sorry for what amounted to a lot of excitement over my willful blindness. -
Kukurykus commented
Yes, you wasted our time, however not because of extra equal sign. You did that because you led me into mistake 3 times:
- in your original post you mentioned of prompt() only, then I explained it can't be empty, but you did not try it yourself
- I tried your code without 'var PixSet == ' chunk, as variable is not needed to use prompt(), what seems to be clear for you from your original question. Additionally there is double equal sign so it is obvious it won't work - not for the reasons of error you posted originally (otherwise how could you receive relevant error?). You previous post suggested you followed my instructions, but you seemingly didn't
- after you mentioned you have now other error than originally, I suggested that prompt('Hello') should work. You did not try it, however your another answer with no response to that part of my post implies you tried it but as it potentially did not work, you silently skipped to another reply. The fact is you again didn't try the code you received from me
-
Geoffrey Hartig commented
After wasting everyone's time with what turned out to be operator error, I'd like to say thank you again for your help.
-
Kukurykus commented
Does prompt work outside of Startup Scripts? If it only doesn't work in SS then run your code with scheduleTask()
You'll learn more about it after you download The ExtendScript SDK with Bridge 2022 JavaScript Reference.pdf at:
https://developer.adobe.com/bridge / that command is to run SS with delay, that possibly is needed to load stuff.
-
Geoffrey Hartig commented
Thank you.
Here is the script.
It runs on startup.
-
Kukurykus commented
If you haven't joined yet the other forum:
https://www.adobeprerelease.com/beta/97408F5E-DDBE-43CC-F10E-96FCC4CC9D70...that with a luck may increase your chances to fix this bug, you can first reset your preferences:
https://helpx.adobe.com/bridge/kb/troubleshoot-errors-freezes-bridge.html -
Geoffrey Hartig commented
Thank you. You've been a big help navigating this. I neglected to mention it, but I had tried the "Window." prefix, which gives me the same error.
-
Kukurykus commented
I see another answer in that topic, where the Expert that replies to you, emphasizes 'prompt is not the function' although noone over there stated that is :/ He also says it was partially broken with some formatting. What kind, for example? And why it always should be preceded by Window (unless it solves your bug)?
You can report this bug also directly in Prerelease program, the link to you have on main page of this website.
-
Geoffrey Hartig commented
I have to say, even though I don't have a fix for the problem, it's nice to have the problem somewhat identified. Thank you so much for your help.
-
Kukurykus commented
You are lucky - other professional user (on same system and with same Bridge) reproduced your bug (although I can't):
-
Geoffrey Hartig commented
Thank you very much for your help.
I have posted the following on the Bridge forum:I am having a problem with scripts in Adobe Bridge not recognizing the command “prompt”.
I am on Windows 10, Bridge version 13.0.2.636.
I have been getting the errors: “prompt is not a function.” and “Expected: ;”
An example of one of my command lines is:
var PixSet == prompt(“LIST OF PROJECTS:\n\n<1> PHOTOS A\n\n<2> BOOK”, “1”);I have rebooted, reinstalled and deleted preferences.
I have tried several different uses of the command with the same results.
At least one other person (Kukurykus on adobebridge.uservoice.com) has tried "prompt" in Bridge 2023 and has had no problems. -
Kukurykus commented
If you tried just prompt('Hello') without any other code then I have no idea why you can't use it.
Create a thread on Bridge forum with scripting tag, and let's see what employees maybe respond:
https://community.adobe.com/t5/forums/filteredbylabelpage/board-id/bridge/label-name/scripting
-
Geoffrey Hartig commented
Thank you.
I am also on Windows 10, version 13.0.2.636.
Since updating to Bridge 2023, I have been getting the error: "prompt is not a function."
Trying it again just now, I am getting: "Expected: ;"
I tried several variations, rebooted and reinstalled.
Same error.
I would say this makes it something specific to my system, but now I'm out of my depth. -
Kukurykus commented
I tried your code in version 13.0.2.636 on Windows 10 and it works. What is your version and system?
-
Geoffrey Hartig commented
Thank you very much. I can see that the way I wrote it was confusing. A sampling of an actual command line was something like:
var PixSet == prompt("LIST OF PROJECTS:\n\n<1> PHOTOS A\n\n<2> BOOK", "1");
It does run in previous versions, but in Bridge 2023, I get the response "prompt is not a function".
I could insert a wait-for-keyboard-input-loop, but I wanted to see if anyone had a simple answer for this issue.
-
Kukurykus commented
It always was like it in Bridge. Until you fill content of 'this' or 'alert' or else 'confirm' functions an error occurs.
Bridge simply (not only for the above native commands) doesn't accept undefined empty valus. Try harder :D