• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

synchronized scrollbars of differents documents (using FM10)

Guest
Jul 16, 2014 Jul 16, 2014

Copy link to clipboard

Copied

Someone know how can I move two or more scrollbars of documents in the same FrameMaker process? I tried to search in the web but I found anything.. If someone know the code that I can use, please post it here.

Thank you           -Marco

TOPICS
Scripting

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 16, 2014 Jul 16, 2014

Copy link to clipboard

Copied

Marco,

Are you using ExtendScript? If so, the only way I know to move a scrollbar (without programming to the Windows API) is to use the ScrollToText() method. This will scroll a document to a specific spot, more or less. But, you would have to know where you want to scroll to and you would have to be able to respond to a scroll action in another window. I don't know that this is possible.

The more I think about it, this may not be possible using FrameMaker development tools alone. I don't think there is any way to automatically respond to a scrolling action, which would be required to trigger a scroll in another window. Plus, it would be real tricky to figure out how far to scroll, etc.

What is the specific reason you want to do this? Perhaps there is an alternative.

Russ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 16, 2014 Jul 16, 2014

Copy link to clipboard

Copied

Hi Russ,

The reason because I need to control the scrollbars is that I need to compare many documents (I work with many manuals in more than eight languages), so I need to view if the images are in the same position etc. I would have a system to scroll together the scrollbar of my documents such as the "synchronized scrolling" in MS Word. I wrote about script but I'm not sure that is the best way to resolve my problem, in this world I'm a novice. If you know something better than my ideas please tell me.

Thank you,            Marco

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 17, 2014 Jul 17, 2014

Copy link to clipboard

Copied

Hi Marco,

Usually, I like to say that anything is possible with scripting, but in this case I see no easy way. I don't really know where I would even start, were it my task to accomplish. My thought is that FrameMaker is simply not designed to readily support this. If I am wrong, I hope someone can step in and correct me. I apologize that I could not provide a more productive answer for you.

Russ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 17, 2014 Jul 17, 2014

Copy link to clipboard

Copied

Russ,

I know that with scripting is very difficult resolve this problem but, knowing I'm new in this world, I hoped someone could surprise me with an answer. Now I haven't many skills to talk about scripting with other people but will be my work discover something new and in a near future (I hope) post here the solution about my question because for everyone who work in my same way it's a very time saving.

Thank you another time for your help.

-Marco

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 18, 2014 Jul 18, 2014

Copy link to clipboard

Copied

Hi Marco,

I think it is quite possible to do this in scripting, but it would take more than just a few lines of code to make it work. If this is important for you to have, I can work on a solution but I would have to get more specific information from you and I would have to make you a quote for the work. My approach would be to place markers in the original documents (at titles, images, tables), which would survive the translation and possible reuse process. Then it becomes possible to let all open documents scroll to the same markers (if they are available in those documents). As I mentioned, it would involve quite a bit of coding and I have done similar work before, so I do not expect it to be a very costly job. On the other hand, I will not create this in my own time because I am not sure about the market value and cannot currently afford to invest time without getting immediate return on that investment. I hope you understand my position. Just get in touch if you are interested and we can work something out.

Kind regards

Jang

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 18, 2014 Jul 18, 2014

Copy link to clipboard

Copied

Hi Jang,

I know that is a very difficult work and I know that everything have a cost but I wrote my problem in this forum because I needed someone who could give me an hand, so I think that if I have the possibilities to pay someone for this work I would have written my problem to a software house because it's more fast and more reliable.

I know that you can't spend your free time to make a program for me, so thank you for all but I can't accept your offer.

Thank you      -Marco

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 20, 2014 Jul 20, 2014

Copy link to clipboard

Copied

Marco,

Although I do understand that you have no budget to spend on this, your idea about software houses being able to do this type of work faster and more reliable is completely off the charts. No "software house" has these skills as they are tied in with thorough knowledge of FrameMaker and the ExtendScript Toolkit. If you do want to find a programmer to create the type of tool you need (which should of course work inside FrameMaker), this forum is the ONLY place on the planet where you will find such programmers. And so far, none of the other experts have indicated that they see a solution.

As this is a LOT of work to figure out, I am simply not willing to hand you all that information for free. This means you can either forget about this type of tool or start the long road towards excellence in ExtendScript programming and thorough knowledge about FrameMaker internals until you will be able to write the script yourself. It is just a matter of estimating what the return on investment for this type of script would be for you.

I do apologise if I sound a little harsh, but I do not like the implication in your post that a software house would be able to do a better job on this. That does no justice to the skills and knowledge that the experts on this forum have acquired.

Kind regards

Jang

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 21, 2014 Jul 21, 2014

Copy link to clipboard

Copied

I'm sorry, I didn't want be rude to you. I wrote that I don't know very much about scripting and this is the best example to confirm this.

My position about pay someone to resolve my problem stay the same and I'm really sorry about this.

I apologize again for disrespect to you and for my impossibility to repay the efforts of someone who could resolve my problem.


Kind regards      -Marco

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 21, 2014 Jul 21, 2014

Copy link to clipboard

Copied

Also I know that scripting isn't the only way to answer my question, so I think other people outside this forum could do something to resolve my problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2014 Jul 23, 2014

Copy link to clipboard

Copied

You can solve the problem with an external script (AutoHotkey script), which sends keystrokes to FM (ah, I'm missing "insert code" in this editor):

ScrollBothDn:
  WinActivate,  ahk_class FrameFamily9.MdiFrame
  WinActivate,  ahk_class FrameFamily10.MdiFrame
  WinActivate,  ahk_class FrameFamily11.MdiFrame
  WinActivate,  ahk_class FrameFamily12.MdiFrame
  Send, {PgDn}                          ; scroll this down
  Send, ^{Tab}                          ; switch to other doc window
  Send, {PgDn}                          ; scroll this down
  Send, ^{Tab}                          ; switch to first doc window
Return

ScrollBothUp:
  WinActivate,  ahk_class FrameFamily9.MdiFrame
  WinActivate,  ahk_class FrameFamily10.MdiFrame
  WinActivate,  ahk_class FrameFamily11.MdiFrame
  WinActivate,  ahk_class FrameFamily12.MdiFrame
  Send, {PgUp}                          ; scroll this down
  Send, ^{Tab}                          ; switch to other doc window
  Send, {PgUp}                          ; scroll this down
  Send, ^{Tab}                          ; switch to first doc window
Return

I have implemented this in a small Utility TextHelper .

If You want to scroll by page rather by screen (you need to have the same zoom level though) - you can set up a small customui.cfg for the fminit folder:

<Modify GotoPreviousScreen<KeySequence /F11>>
<Modify GotoNextScreen  <KeySequence /F12>>
<Modify GotoPreviousPage <KeySequence /PgUp>>
<Modify GotoNextPage  <KeySequence /PgDn>>

Klaus Daube

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 30, 2014 Jul 30, 2014

Copy link to clipboard

Copied

I found a solution, who are intresting about it must contact me privately. My email is: marco.dona1996@gmail.com


-Marco

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 18, 2023 Jul 18, 2023

Copy link to clipboard

Copied

LATEST

This problem can be solved with a script.

Try the following steps.
1. Run this script.
2. Open all documents.
3. Place the cursor inside the paragraph.
4. Operate the mouse wheel on the small scroll bar.

 

var w = new Window("palette");
var sbar = w.add ("scrollbar", [0,0,20,100], 50);
sbar.onChange = function () {
    var doc = app.FirstOpenDoc;
    while (doc.ObjectValid()){
        if (doc.TextSelection.beg.obj.ObjectValid()) {
            app.ActiveDoc = doc;
            if (sbar.value<50){
                //Cursor (insert point) moving commands
                //Previous paragraph start
                Fcodes([FCodes.CSR_BOP]);
            } else {

                //Next paragraph start
                Fcodes([FCodes.CSR_NEXT_BOP]);
            }
        }
        doc = doc.NextOpenDocInSession;
    }
    sbar.value = 50;
}
w.show();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines