• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UI Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI Scripting


  • Subject: Re: UI Scripting
  • From: "Kenneth T. Davis" <email@hidden>
  • Date: Thu, 22 Jan 2004 09:58:58 -0800

Received from Craig Sutherland on 1/22/04.

Craig:

I know what you're experiencing.

This is how I managed to "kick" the UI script into action, so the menu items respond. It's ugly, but...

tell application "System Events"
tell application process "Safari"
tell menu bar 1
tell menu bar item "View"
tell menu "View"
tell menu item "View Source"
click
end tell
end tell
tell application "Safari" to activate
click
end tell
click
--click
end tell
set bounds of window 1 of application "Safari" to {512, 22, 1022, 728}
try
set bounds of window 2 of application "Safari" to {0, 22, 511, 728}
on error
tell application "System Events" to click menu item "View" of menu bar 1 of application process "Safari"
end try
end tell
end tell

>On Jan 22, 2004, at 8:48 AM, Simon Forster wrote:
>
>> Why is it that with certain applications, when you use UI scripting to
>> click a button, the button will highlight but nothing happens.
>
>An example would be helpful. What application? Post your script.
>
>>
>> Given that this happens, can anyone suggest a work around? Is it
>> possible to move the pointer to a location on the screen and then
>> emulate a mouse click? Will this make a difference?
>
>Perhaps.
>
>> Simon Forster
>
>
>Craig Sutherland
>_______________________________________________
>applescript-users mailing list | email@hidden
>Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
>Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: UI Scripting (From: Craig Sutherland <email@hidden>)

  • Prev by Date: MacSFTP Can't Create Directory
  • Next by Date: RE: keystroke <arrow up>
  • Previous by thread: Re: UI Scripting
  • Next by thread: Re: UI Scripting
  • Index(es):
    • Date
    • Thread