Display message size
  • If i run this code, it splits text to two different rows. I would like to show very long strings in one row.

    tell application \"FastScripts\" to set test_note to display message  \"testing testing testing testing testing\" at screen position center dismissing after delay 0
    tell application \"FastScripts\" to set autodismiss time of test_note to 1.01

    I know i could use something like this:

    set test_note's bounds to {300, 200, 800, 300}

    But since length of text changes every time and amount of rows too changes, size of window must be different too.

    How i can find out how long and how high text is in pixels so i can set bounds correctly?
  • Hi Jonathan - unfortunately there isn't any way to compute this using the scripting interface to FastScripts. Sounds like this would best be solved with a new parameter to the display message command, something like a "wrapText" parameter that allowed you do dictate whether wrapping should occur or not.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!