• 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
AppleScript code error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript code error?


  • Subject: AppleScript code error?
  • From: "Ball, Dan" <email@hidden>
  • Date: Thu, 1 Jun 2006 21:20:46 -0400
  • Thread-topic: AppleScript code error?

Hi everyone,

I am hoping someone knows what this issue may be......I made a simple application using mainly applescript code and put some picts and buttons on it using Interface Builder and when users click the designated button it mounts the share they selected with there credentials from our Windows server.  Made it so much easier for our users instead of having to browse or do any of that crap.  Well I got a request to have a few buttons point to a view certain important intranet sites so I tried and got it working.

Well everything worked fine with the app when we were on 10.3.x and we just moved to 10.4 and I found a small issue.  It may be a Firefox issue as well I'm not sure what the problem is, makes no sense.

The client machines are bound to both OD and AD and get temporary homes with custom preferences from the User Template on login.....the first time a user logs in and they click on the one of the buttons to go to one of our intranet sites it hangs the app for some reason, but will eventually complete successfully like 5 minutes later or so.  But once Firefox has been open once then the buttons on the app work fine whether or not Firefox is open or not.

Here is code from one of the buttons:

on clicked theObject
	tell application "System Events"
		if exists process "firefox-bin" then
			tell application "Firefox"
				activate
				OpenURL "https://admin.pti.edu/helpdesk";
			end tell
		else
			tell application "Firefox"
				activate
				delay 4
				OpenURL "https://admin.pti.edu/helpdesk";
			end tell
		end if
	end tell
end clicked
on action theObject
end action

If you notice on the else statement I have a delay of 4 seconds.....I had to do that or it timed out because Firefox takes forever to launch on first launch and the script was running to quickly and trying to open the link before Firefox was open causing it to error out.  The delay fixed the issue when we were on 10.3.x.

Anyone see any errors in the code?  Or could think on why on first login it would timeout my app just my clicking one of these buttons to open Firefox and a link?

Thanks,

Dan
 _______________________________________________
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

  • Prev by Date: Re: "explicit qualification in declaration" error?
  • Next by Date: GCC 3.3 error worth a bug report?
  • Previous by thread: Source search path for external targets
  • Next by thread: GCC 3.3 error worth a bug report?
  • Index(es):
    • Date
    • Thread