Activate Window

Hi Folks,

can you please help me to solve this issue?

As Startwindow I have window “startup” in my application - the settings are “visible on startup” - when I launch a new window with

show window "pin"

then this window can not be edited - only if I set this new window to active - but then I get a nsinternalscripterror(8)…

How can I solve this issue?



What are you trying to edit within the window? For example, if I had a hidden window titled “Window2,” and I wanted to set the content of a text field “Field1” in that window, I would…

set contents of text field "Field1" of window "Window2" to "someText"

That should work, unless that’s not exactly what you’re trying to do. Paste your code, and I can make some more suggestions.

Hi Masna,

thanks for your help!

set contents of text field …

is working, but pressing a button or adding some text is not…

but nevermind - I have decided to work with display dialog instead of entering my information into a window - alltought its not possible to have a display dialog with a hidden answer…

Thanks and Best Regards,


Of course you can use display dialog with a hidden answer:

display dialog "enter something" default answer "1234" with hidden answer

Hi Stefan,

hidden answer is possible in Script Editor but not in Xcode…

Thanks for your help!

Best Regards,


Hi stefanl, Bosstone

“hidden answer is possible in Script Editor but not in Xcode…”

yes it is, select your text field, then “command 5”, this will bring up the " NSTextField Inspector"
select "NSSecure TextField.