• 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: Scripting problem with GraphicConverter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting problem with GraphicConverter


  • Subject: Re: Scripting problem with GraphicConverter
  • From: Robert Poland <email@hidden>
  • Date: Sat, 11 Jun 2011 11:37:54 -0600

Thanks Chris,

I think I'll give up, It's becoming a total waste of time.

Your script moves Tools but collapses with more than that one tool window.

A previous Script Application (when run outside of the GC scripts window) can move Tools, Navigator, Detail and Information but cannot (re)size any of them.

Thank heaven GC 6 still works, hope Lion doesn't kill it.


On Jun 10, 2011, at 10:32 PM, Christopher Stone wrote:

On Jun 08, 2011, at 08:27, Robert Poland wrote:
I have this script that opens select GraphicConverter 7.X tool windows, positions them and sets their size.
This script is called from the Scripts menu of GraphicConverter.
If this script is run from Smile or ApplescriptEditor it works fine.
But when called from GraphicConverter it gets an error, "System Events got an error: Can’t set window "Tools" of process "GraphicConverter" to {2343, 24}.".
______________________________________________________________________

Hey Bob,

I've been fiddling with your script, and I've got something that works reliably on my machine from the GraphicConverter Scripts Menu.

on moveToolsWindow(toolPalettePosition)
  try
    tell application "System Events"
      keystroke "k" using command down
      delay 0.01
      -- Position Toolbox
      tell process "GraphicConverter" to tell window "Tools"
        set position to toolPalettePosition
      end tell
    end tell
  end try
end moveToolsWindow

tell application "Finder" to set {fleftSide, fTopSide, fRightSide, fBottomSide} to bounds of window of desktop
set screen_Top_Right to {fRightSide - 65, fTopSide + 22}

with timeout of 0.02 seconds
  tell application "GraphicConverter"
    try
      if window 1 exists then
        tell window 1 -- main 
          hide tools -- need GC 4.4.1b or later
          set window_Top_Right to {item 3, item 2} of (get bounds)
          -- Enable to move tool palette to right side of picture window 1
          moveToolsWindow(window_Top_Right) of me
          -- Enable to move tool palette to right side of screen:
          -- moveToolsWindow(screen_Top_Right) of me
        end tell
      else
        beep
      end if
    on error errMsg number errNum
      beep
      display dialog "Error: " & errMsg & return & "Error Number: " & errNum
    end try
  end tell
end timeout

It still produces an error, but I'm trapping that and letting it go without action.

I consider this a kludge rather than a real solution, but it does work.  Perhaps it can be done with a more finesse using UI-Scripting, but I haven't looked very far into that as yet.

Bob.  You'll have to forward this to GcMac for me.  I've renewed my membership, but it hasn't been confirmed yet.

** THORSTEN: GraphicConverter 7.2 Applescript: 'hide tools' works fine, but 'show tools' does not work at all.  It would also be nice if the tools palette had native properties like position and visible.  Like Bob I often find myself wanting to position it precisely, although I usually stick it on the right side of my screen.

--
Best Regards,
Chris


Robert Poland - Fort Collins, CO



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Scripting problem with GraphicConverter (From: Robert Poland <email@hidden>)
 >Re: Scripting problem with GraphicConverter (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Scripting problem with GraphicConverter
  • Next by Date: How to make a table?
  • Previous by thread: Re: Scripting problem with GraphicConverter
  • Next by thread: Re: [gcmac] Scripting problem with GraphicConverter
  • Index(es):
    • Date
    • Thread