Forum Replies Created
-
AuthorPosts
-
I’m afraid that the UNICODE characters I use to display the tree connections are not shown here, and I can’t paste any screenshots. Sorry for that.
I have been doing more tests, and I have found that notify(‘onClick’) works with a checkbox of the same GUI. Maybe it doesn’t work on buttons…
Thanks Tobias!
Regards from Spain!
Well, I have found the solution in http://www.indesignjs.de object model:
doc.spreads[0].pages[2].adjustLayout({width:’60mm’ , rightMargin:’0′ , leftMargin: ‘0’});
being doc the active document. By the way, I adjust the left and right margins.
January 12, 2020 at 6:22 pm in reply to: How to make a click radiobutton eventListener work? #14323295Basically your post is the solution I have used. Three onClick events. A bit inelegant for me, but… IT WORKS.
Indeed, that onClick() events aren’t event LISTENERS but event CALLBACKS. I have been using event callbacks long time ago, not a big mystery there. But event listeners… never. And I think our ways (listeners and me) will not cross in the future ;)I have read Antonie post too. And yes, I tried to link event and radiogroup cause I started linking the radiobutton but I could not trigger the event, so I went up the hierarchy until I triggered the event (clicking the grey background in the radiobutton group).
Thnaks for your help!
And Happy new year for all, crew and members of INDESIGNSECRETS.COM !!
Best regards from Spain,
JoseDecember 30, 2019 at 2:20 pm in reply to: How to make a click radiobutton eventListener work? #14323356Well, I must apologize if you see more than a post of mine talking the same stuff. It seems there’s a little problem.
Sorry, mates!December 30, 2019 at 2:15 pm in reply to: How to make a click radiobutton eventListener work? #14323357Thanks David, now all is working right!
Happy new year in advance!!
December 30, 2019 at 2:09 pm in reply to: How to make a click radiobutton eventListener work? #14323359I have tried to post a reply on my post, in 2 different computers, with 6 hours of difference, and I cant. Sorry, i post it here…
Hey Jeremy.
Thats basically the way i finally do, with 3 onClick calls. A bit inelegant, in my opinion…
Indeed, they aren’t event LISTENERS but event CALLBACKS. I have been using that callbacks long time ago, no too much mistery there. But listeners…
I have read Antoine post, too. And yes, I used radiobutton group like trigger for my listener as a last resort. I tried first with the radiobutton itself. Did it work? Nope. I went up the hierarchy and tried again. Same result. Tried the whole group. It worked, but clicking grey background. Something triggered the event, at last. Useless, but working ;). So again on my way with callbacks.Thank you for your advices!
And Happy new year for indesignsecretes.com crew and members!
Best regards from Spain!!
December 30, 2019 at 1:58 pm in reply to: How to make a click radiobutton eventListener work? #14323360Third attempt to post… I have tried 2 times, in 2 computers, with 4 hours between it, no post…
December 29, 2019 at 10:17 am in reply to: How to make a click radiobutton eventListener work? #14323365Well, now the palette works, not using 1 eventListener but 3 onClick’s:
principio_radiobutton.onClick = function() {
custom_pos_group.enabled = false;
}fin_radiobutton.onClick = function() {
custom_pos_group.enabled = false;
}custom_radiobutton.onClick = function() {
custom_pos_group.enabled = true;
}Now I think the chunk of code in the previous post (event onChange) doesn’t work at all.
But I wish to learn how to use eventListener properly, for this or others projects.
Any clue will be well received.December 29, 2019 at 7:53 am in reply to: How to make a click radiobutton eventListener work? #14323367I have something trying this:
custom_radiobutton.addEventListener(“onChange”, function() {
custom_pos_group.enabled = custom_radiobutton.value;
}
);or this:
selec_pos_radiogroup.addEventListener(“onChange”, function() {
custom_pos_group.enabled = custom_radiobutton.value;
}
);I get the same result, both of them enable the group custom_pos_group, but doesn’t disabled it when i click another radiobutton.
Well, one step forward at last!
December 29, 2019 at 7:36 am in reply to: How to make a click radiobutton eventListener work? #14323368Hi Jeremy!
Thanks for your reply.I have tried right now this code:
custom_radiobutton.onChange = function() {
custom_pos_group.enabled = custom_radiobutton.value;
}but doesn’t work.
I’ll wait until you can get back to your computer.
I have seen a web where can read that you must use
#include ‘EventManager.jsinc’
instruction prior to use events, but i think it’s not needed, cause I can trigger events.
Thanks!
But If I had not found this website, I would have abandoned the idea of using UNDO in my script.
In any case, I must give thanks to both, you and him, for sharing information with all of us.
I only hope this post can help more people to do better scripts. I’ll be happy if it happens!
It has been a pleasure to meet you “in person” ;)
Until next time, mate!Here`s the link to the explain of the params that app.doScript accept.
https://kasyan.ho.com.ua/tips/indesign_script/all/do_script.html
The only thing I can say is that everything Kasyan demostrates there it`s fulfilled in my script.
-
AuthorPosts
