Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Special effects (mostly unwanted)

$
0
0

Dear friends,
We all know about special effects in the movies, but I can tell you: also ExtendScript can entertain us with such. It appears to be a conjurer of the good old style. It all happens on the stage of FM version 13.0.5.547.
Information for the uninitiated:

  • The script creates a menu with some entries
  • Two entries immediately open a panel to work with special markers
  • Other entries open the pdf documentation, open a panel for document settings or run functions through the document.
  • Debugging is not possible when functions are called via the menu. Hence for debugging I disable the set-up of the menu and present a selection list with the jumps to the functions.
  • I unregister the script each time before I start it again (either in ESTK or via script catalogue).

 

The Ghost

When opening one of the panels via menu it happens that in the top left corner a small selection list appears with contents from a previous call:

magic-ghost.png
I can create this illusion at will with the following sequence of magic tricks. No, it's not an illusion: Putting the cursor into the selection list the display can be changed with the arrow keys, so it's some sort of real...

  1. Leave all script activity (panels)
  2. Unregister the script
  3. Open a panel by the still 'active' menu in FM
  4. Voilà! The ghost appears in top left corner

 

The slave

From time to time (magic does not happen by schedule) the following effect can be seen:

  1. Starting the script before an FM document is open
  2. Invoking a script action via menu
  3. I do not see the panel - it is in the background
  4. Not certain about an error I bring the console window to the foreground
  5. Not seeing anything suspicious I dismiss the console window to get a fresh version for an error.
  6. At the same time the panel disappears, following 'his master' immediately to the nirvana.

Unfortunately I can not reproduce this at will... Hence I do not know whether an open ESTK (with nothing in there) has any influence.

 

The twins

I discovered this after a small update of my script and hence guessed the reason for it there - but my update was in a mathematical function, not in the area of the user interface:

magic-twins.png

  1. Open FM and then create a new document
  2. Invoke the script via catalogue and select a panel function from the menu
  3. The contents of the panel is duplicated
  4. Each 'content' is active independently of the other - see the different tabs in the screen shot.
  5. But I am not certain which one really performs the function in the document.
  6. Hence I dismiss these Siamese twins.
  7. Then I opened a document which behaved 'last time'
  8. Unregister script, start script again, open panel via menu
  9. Same effect
  10. Now I left FM and started afresh
  11. The magic did not appear any more (sorry folks!).

 

Big entertainment, isn't it? But frustrating when trying to get a good script...

What can we learn from these tricks?


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>