-
1. Re: [JS] ScriptUI problem CS5
Trevorׅ Feb 5, 2013 10:06 PM (in response to Roy Marshall)Hi Roy
First try changing the targetengine to something unique-ish like
#targetengine RoyMarshal
as you might well be right about a clash.
If that does not work then post some more code.
Trevor
-
2. Re: [JS] ScriptUI problem CS5
Roy Marshall Feb 6, 2013 12:22 AM (in response to Trevorׅ)Hi Trevor.
Thanks for the reply.
Unfortunately that didn't help.
I am pasting below the code (not the actual code, but a stripped down version) and you can see the problem.
#target indesign;
#targetengine roymarshall;
var pnBriscoesWindow = new Window('palette',"Test Panel");
var pnTabbedPanel = pnBriscoesWindow.add('tabbedpanel');
var pnTabOne = pnTabbedPanel.add('tab',undefined,'Savers');
var pnTabtwo = pnTabbedPanel.add('tab',undefined,'Formatting');
var pnTabThree = pnTabbedPanel.add('tab',undefined,'Image Control');
var pnRow1 = pnTabOne.add('panel', undefined, "Saver Setup");
var pnBriscoeLabelSaver = pnRow1.add('button', undefined,'Name the Selected Saver');
pnBriscoeLabelSaver.onClick = function(){
labelTheSaver();
}
var pnRow2 = pnTabtwo.add('panel', undefined, "Formatting the Page");
var pnFormat = pnRow2.add('button', undefined,'Run the Formatting Script');
pnFormat.onClick = function(){
pageFormat();
}
var pnRow3 = pnTabThree.add('panel', undefined, "Image Control");
var importSafari = pnRow3.add('button', undefined,'Import the Safari Image');
importSafari.onClick = function(){
importImageOpenedInSafari();
}
pnBriscoesWindow.show();
function labelTheSaver(){
myText = prompt("Test Box", "Text here");
}
function pageFormat(){
myText = prompt("Test Box", "Text here");
}
function importImageOpenedInSafari(){
myText = prompt("Test Box", "Text here");
}
-
3. Re: [JS] ScriptUI problem CS5
Trevorׅ Feb 6, 2013 5:47 AM (in response to Roy Marshall)Hi Roy
works for me on windows 7
I presume that you left out pnBriscoesWindow.show() just on the posting?
By the way I can't remember if I ever asked you if you'r connected to a Roy Marshall who was my father's print factory manager in Garrick Street and in Kings Cross from about 40 to about 20 years ago?
-
4. Re: [JS] ScriptUI problem CS5
Roy Marshall Feb 6, 2013 9:46 AM (in response to Trevorׅ)Hi Trevor.
pnBriscoesWindow.show() is there, just before the functions at the bottom.
So, it works on Windows....Thats anoying!
I will keep looking into why it is not working for me.
Anyway, No, I am (or I am not connected) to that Roy Marshall. I was however a Studio Manager in a Prining factory back in the UK but the a coastal town of Chichester. I left there to come to New Zealand about 5.5 years ago.
Strange eh?
Thanks for looking into this anyway
Roy
-
5. Re: [JS] ScriptUI problem CS5
Trevorׅ Feb 6, 2013 10:44 AM (in response to Roy Marshall)Yes these Mac Window issues are a big pain in the neck to fix up.
I made the mistake about the show() because I had ID5 and ID6 both open and after running the script looked at the wrong ID, I then without looking to carefully at the script added show() run the script and then looked this time at the correct ID and lo and behold it appeared
Well I often thought that it's a good thing I'm not programing for a nuclear power plant.
Good luck
Trevor
-
6. Re: [JS] ScriptUI problem CS5
Roy Marshall Feb 6, 2013 8:46 PM (in response to Trevorׅ)Hey.
I just did a test on CS6, and it works OK. My client is on CS5 though, so this doesn't help me much
Doh!
-
7. Re: [JS] ScriptUI problem CS5
Trevorׅ Feb 6, 2013 9:53 PM (in response to Roy Marshall)I retested the script on CS5 on windows and also get a problem
The tabbed panel displays properly at run up but after clicking OK on a prompt it goes blank like on your screen shot.
-
8. Re: [JS] ScriptUI problem CS5
Laubender Feb 7, 2013 12:53 AM (in response to Trevorׅ)The problem is not restricted to MS Windows.
Same thing here on OSX 10.6.8 with InDesign CS5 v7.0.4.However:
NO problem with InDesign CS5.5 v7.5.3 !
Uwe





