 |
 |
How to move Mouse Cursor with applescript
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2009
Status:
Offline
|
|
Hi
I have this little script that plays two different movies on two different screens in full screen mode.
and it works perfectly when running from script or even when saving as application.
--script
tell application "QuickTime Player"
activate
open alias "Macintosh HD:TestAppleScript:movies:Timer.mov"
play front document
set bounds of front window to {2460, 256, 3299, 768}
present document 1
open alias "Macintosh HD:TestAppleScript:movies:Main.mov"
set bounds of front window to {2460, 256, 3299, 736}
present document 1
play front document
end tell
Here is my problem, I need this application to run automatically when computer starts, so I placed it in to:
Settings -> Accounts -> login items.
So when computer starts it lunches the application and two movies start playing as they should.
The only problem is the default position of mouse cursor (on startup) is in the left upper corner.
What it does - it activates QuickTime Player toolbar and the toolbar doesn't disappears until you actually move the mouse out of this area.
I tried to use the script below to move the mouse cursor, but it only simulates the mouse movement and mouse click and dose not actually moves the cursor on the screen.
--script
activate application "Finder"
tell application "System Events"
tell process "Finder"
click at {271, 15}
--click at {272, 70}
end tell
end tell
Will be glad to try any reasonable suggestions to solve that.
Thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
This can be done easily enough in C, although there doesn't appear to be any obvious way to do it in AppleScript.
I found an OSAX which claims to be able to do this here, although I have not tried or tested it and thus can not vouch for it.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status:
Offline
|
|
Originally Posted by CharlesS
I found an OSAX which claims to be able to do this here, although I have not tried or tested it and thus can not vouch for it.
Last updated in February 2003, according to that site. Will Intel Mac OS X even load PPC OSAXen? For that matter, would the above mentioned OSAX even run on 10.5 under PPC?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2009
Status:
Offline
|
|
Hi CharlesS, I have tried to download that software and even paid for it $10. But i cant get anything. The file that downloads it is "extrasuites.sit" and I don't know what to do whith it. Didn't get ane help from software distribution company.
Do you have any idea how it works?
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Originally Posted by Person Man
Last updated in February 2003, according to that site. Will Intel Mac OS X even load PPC OSAXen? For that matter, would the above mentioned OSAX even run on 10.5 under PPC?
Crap, didn't notice that detail. Sorry about that. Just tried downloading it though, and it does work on my MBP, probably because it's not actually an OSAX at all but rather just a faceless scriptable application à la System Events which runs in Rosetta, and will probably continue to do so until whatever time Apple decides not to care about backward compatibility again and axes Rosetta in some future OS X release (grumble, grumble). The following script seemed to work to move the mouse:
Code:
tell application "Extra Suites"
ES move mouse {200, 200}
end tell
To answer Al2009's question, it's a StuffIt archive (which was really stupid on the developer's part, since inside the .sit is a standard .dmg archive, and the .dmg format supports compression natively). You'll need either StuffIt Expander or The Unarchiver to open it.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2009
Status:
Offline
|
|
Thanks CharlesS
it works!!!
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2011
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|