Welcome to MacTalk Australia

the largest Australian community for Apple discussions and topics

Join the discussions, Register Now!
Results 1 to 14 of 14
  1. #1

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    hey guys,
    I need some help scripting the displays menu item in order to click "Turn On Mirroring"
    i need this so i can assign this script to a remote button press. this will complete my media centre project
    any help is much appreciated, i have no idea how to script.
    cheers
    luke
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  2. #2

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    or is there a keyboard shortcut like powerbooks?, i couldnt find one
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  3. #3

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    im sure there has to be a very easy way to do this, anyone !
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  4. #4

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    ok i will direct deposit $10 into anyones account if they can provide me with a working applescript that turns video mirroring on if it is off and off if it is on. It needs to work on an intel imac
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  5. #5

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    please!! im desperate, someone must know how to script!
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  6. #6
    dmg
    dmg is offline

    Join Date
    Apr 2005
    Location
    Melbourne
    Posts
    131

    Default

    I don't know what the "displays menu item" is (Displays pane in System Preferences?), but if you're using 10.3 or later you should be able to use AppleScript UI Scripting to click buttons, etc.

    <http://www.apple.com/applescript/uiscripting/>

  7. #7

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    thanks for the help, ui scripting doesnt seem to work for me
    even a keyboard shortcut to turn on mirroring would be perfect
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  8. #8
    iSlayer's Avatar iSlayer is offline Super

    Join Date
    Oct 2004
    Location
    Somewhere Slaying Vampires
    Posts
    6,305

    Default

    ill see if i can help out
    ill get back to you

  9. #9
    iSlayer's Avatar iSlayer is offline Super

    Join Date
    Oct 2004
    Location
    Somewhere Slaying Vampires
    Posts
    6,305

    Default

    ive got it working via uiscripting of the displays menu extra.
    i just need to get it to find the displays item dynamically.right now you have to tell it the position of the item

    shouldnt take long to fix

  10. #10

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    awesome, thanks, i eagerly await
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  11. #11
    iSlayer's Avatar iSlayer is offline Super

    Join Date
    Oct 2004
    Location
    Somewhere Slaying Vampires
    Posts
    6,305

    Default

    i havent been able to get it to dynamically find the item yet but here is a script that will work once you set the position manually.menu extras dont change positions even after restarts so it should be fine

    Code:
    property displayPosition &#58; -6
    
    activate application &#34;SystemUIServer&#34;
    tell application &#34;System Events&#34;
    ****tell process &#34;SystemUIServer&#34;
    ********set display to menu bar item displayPosition of menu bar 1
    ********click display
    ********tell menu 1 of display
    ************click menu item 2
    ********end tell
    ****end tell
    end tell

  12. #12

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    many thanks islayer, i got it working&#33;, my theatre link up is complete, i can now use an ir remote to switch the imac into mirroring for front row,
    ps. pm me your bank details&#33;
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

  13. #13
    iSlayer's Avatar iSlayer is offline Super

    Join Date
    Oct 2004
    Location
    Somewhere Slaying Vampires
    Posts
    6,305

    Default

    <div class='quotetop'>QUOTE(lukefleming &#064; Aug 6 2006, 07&#58;01 PM) [snapback]201986[/snapback]</div>
    ps. pm me your bank details&#33;
    [/b]
    dont worry about it
    consider it a freebie

  14. #14

    Join Date
    May 2006
    Location
    brisbane
    Posts
    124

    Default

    thanks again
    iMac Core Duo/1Gb
    iBook G4 1.33/1Gb
    G4 Dual 450/1Gb
    G4 400/256

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •