Forum

Author Topic: PhotoScan.app.messageBox creates small box where text is cut off.  (Read 2003 times)

jslyder

  • Newbie
  • *
  • Posts: 24
    • View Profile
PhotoScan.app.messageBox creates small box where text is cut off.
« on: September 19, 2018, 04:19:48 PM »
I've used PhotoScan.app.messageBox on a number of scripts in order to provide some user feedback, but about half the time the message boxes that appear are small and cutoff some of the text (example image attached).  Even within a single script, some message boxes are fine while others are small and cutoff, and there is no clear pattern to me.  Has anyone else experience this? 

Thank you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: PhotoScan.app.messageBox creates small box where text is cut off.
« Reply #1 on: September 19, 2018, 08:30:10 PM »
Hello jslyder,

Can you please specify the version of PhotoScan used and provide the line used for the messageBox call?
Best regards,
Alexey Pasumansky,
Agisoft LLC

jslyder

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: PhotoScan.app.messageBox creates small box where text is cut off.
« Reply #2 on: September 20, 2018, 05:22:14 PM »
Working in 1.4.2 build 6205, though I believe I've also seen in in 1.3.2 and 1.3.4. 

The line I used is below.  I've tried this with and without \n to format some the text onto different lines. 
PhotoScan.app.messageBox("This script is designed to automate the alignment and processing steps up to entering ground control.  It requires input form a series of popups before proceeding.")

What's interesting is that the messageBox pops up towards the left side of the application window, while a series of getInt and getBool calls work totally fine and each input box appears in the center of the application window. 

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: PhotoScan.app.messageBox creates small box where text is cut off.
« Reply #3 on: September 20, 2018, 06:58:41 PM »
Hello jslyder,

Seems that the line is too long for the message box (it does not automatically wrap the lines). However, you can use the following workaround:

Code: [Select]
import textwrap
message = "This script is designed to automate the alignment and processing steps up to entering ground control.  It requires input form a series of popups before proceeding."
PhotoScan.app.messageBox(textwrap.fill(message, 65))
Best regards,
Alexey Pasumansky,
Agisoft LLC

jslyder

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: PhotoScan.app.messageBox creates small box where text is cut off.
« Reply #4 on: September 24, 2018, 04:48:13 PM »
I thought it might be something like that.  Thank you for your help.