Author Topic: Blue Triangle in PJSR  (Read 5090 times)

Offline Mike Reid

  • Newcomer
  • Posts: 47
    • Mike's Astro
Blue Triangle in PJSR
« on: 2011 June 27 21:28:09 »
I've been trying to implement the new instance, blue triangle in a script by following Juan's advice in this thread,
  http://pixinsight.com/forum/index.php?topic=2177.msg14242#msg14242
I was lead to the example in DrawSignature.js.  But the blue triangle in DrawSignature does not seem to work quite right.  At least not with PixInsight 1.7 on x86_64 linux.  When I try to drop the triangle on an image I get this error,
  Attempt to execute a Script instance recursively.
  Sorry, but this is not supported in this version of PixInsight.
I can drag the triangle to the desktop and create a new instance and later drag it to an image and it does work.

Is something missing from this script or am I missing something?

Thanks,
Mike

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Blue Triangle in PJSR
« Reply #1 on: 2011 June 27 23:51:21 »
Hi Mike,

this unfortunately is one of the limitations of scripting. It also happens with Canon Banding etc.. To apply a scipt directly to an image, you have to use the apply button.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Blue Triangle in PJSR
« Reply #2 on: 2011 June 28 00:10:10 »
Hi Mike,

More information on this topic here:

http://pixinsight.com/forum/index.php?topic=3159.msg21709#msg21709

Summarizing, you must implement a way to apply your script to one or more images (or disk files etc.) within your script. Then the user can generate instances of your script as new process icons with the blue triangle mechanism. These instances can then be applied to images without requiring a modal session (that is, without opening your script's main dialog) if appropriate, if you implement your script correctly.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Ioannis Ioannou

  • PixInsight Addict
  • ***
  • Posts: 202
Re: Blue Triangle in PJSR
« Reply #3 on: 2011 June 28 00:40:20 »
Juan was faster than me :)
Also take  a diff between the original script from here (the last one) http://pixinsight.com/forum/index.php?topic=806.15 and the one I have put the triangle http://pixinsight.com/forum/index.php?topic=3139.0
Clear Skies
John (Ioannis)

FSQ106N+Robofocus+QHY-22+SX USB wheel+Baader filters
SX OAG+DSI Pro guiding a NEQ6
PI for the rest :)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Blue Triangle in PJSR
« Reply #4 on: 2011 June 28 01:33:02 »
Summarizing, you must implement a way to apply your script to one or more images (or disk files etc.) within your script.
Once you can create instances with the blue triangle, you can also drag this instance onto an image containter to apply it to a number of images. This is how I apply CanonBandingReduction to multiple images.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Mike Reid

  • Newcomer
  • Posts: 47
    • Mike's Astro
Re: Blue Triangle in PJSR
« Reply #5 on: 2011 June 28 10:57:24 »
Thanks guys.  This makes more sense now.

Mike