Monday, 23 April 2012

Set size works in Script Editor but not Studio?


hello all. i've been fooling around applescript studio time , i've solved many problems, have believe should simple, yet not. :(

have applescript studio gui min , max size. expand box max size, if min size clicking button after launch.

in general make small code snippets in apple editor if works, move on applescript studio , make appropriate changes. problem have below snippet works fine in applescript editor, when link code button on gui in applescript studio, application lags out , nothing.

appreciated. :(

code:
  tell application "myapplication" activate  tell application "system events" tell application process "myapplication"  	try  		get properties of window 1  		set size of window 1 {439, 300}  	on error errmess  		log errmess  		-- no window open  	end try  	  end tell  
 

probably because script waiting system events, waiting application respond it. application should know own windows - there particular reason application doesn't set window size itself?
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment