• 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: User Scripts problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Scripts problem


  • Subject: Re: User Scripts problem
  • From: Eric Gorr <email@hidden>
  • Date: Tue, 19 Aug 2008 13:53:57 -0400

Mike Garcia wrote:
> Ok… I added an AppleScript to switch to the finder and back to
> Xcode after checking the file out.  It’s very hokey but it works.

Can you post the working script?

I am having a similar problem, but cannot seem to get it to work correctly.

The script I have is:

#!/bin/sh
source ~/.bash_profile

SWITCHOUT=`osascript << ENDOFSCRIPT
to getNameOfFrontProcess()
tell application "System Events"
set pairs to {name, frontmost} of every process
end tell
repeat with p from 1 to count item 1 of pairs
if item p of item 2 of pairs then return (item p of item 1 of pairs) as string
end repeat
end getNameOfFrontProcess


try

	set frontProcessName to (my getNameOfFrontProcess())

	tell application "Finder"
		activate
	end tell

	tell application frontProcessName
		activate
	end tell

on error
    do shell script ("echo 'error'")
end try

ENDOFSCRIPT`

p4 edit %%%{PBXFilePath}%%%
${SWITCHOUT}




I attempted to put a delay after I switch to the finder and before I switch back to xcode, but that didn't help. Xcode didn't let me edit the file I just checked out unless I manually switched to the finder and then came back.





_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >User Scripts problem (From: "Mike Garcia" <email@hidden>)
 >Re: User Scripts problem (From: Marc Epard <email@hidden>)

  • Prev by Date: Re: nsbutton mouseEntered event is not working
  • Next by Date: Re: newbq-why can i not dwld-verify any applications on my iphone?
  • Previous by thread: RE: User Scripts problem
  • Next by thread: Integrate custom allocators with ObjectAlloc instrument?
  • Index(es):
    • Date
    • Thread