I was running the next code fine with MacOSX 10.3 and QuickTime 6.5, but when I tried to run it on MacOSX 10.4 and QT 7, it does not work. What is it happening?
tell application “QuickTime Player”
activate
set position of window 1 to {0, 22}
end tell
Why does not work the recording button on AppleScript Editor on MacOSX 10.4?
Thank you,
Raúl:)
Model: iMac
AppleScript: 1.10.3
Browser: Safari 416.12
Operating System: Mac OS X (10.4)
It works fine for me, it is a different solution that now works in OSX 10.4, the previous code was recorded in OSX 10.3 and worked fine on it. My target was to put the QT window all times in the same position on the desktop.
A couple of things: you should either trap for the error that will occur if there is no window 1 (or test for it before proceeding as in the following code) and, to avoid resizing the window when all you want is to re-position it, try this:
tell application "QuickTime Player"
activate
if (exists window 1) then
tell window 1
set {x1, y1, x2, y2} to get bounds
set {w, h} to {x2 - x1, y2 - y1}
set {x1, y1} to {0, 22}
set bounds to {x1, y1, x1 + w, y1 + h}
end tell
end if
end tell
Thank you, again I am learning a lot with your suggestions.
I have included this piece of code in a Filemaker Scripted button and now everything works fine with OSX 10.4, QT 7.0 and Filemaker 6, but there is some problems with Filemaker 7. I will try to resolve in the future. I am collecting time code data from QT to be included in diferent fields in FM 6. Also I can control QT movie (step by step frames, second by second or playing from Filemaaker. Now everything is working on succesfully.