Sponsored Content
Operating Systems OS X (Apple) Apple scripts and "get from list Post 302557839 by doctorfoo1 on Thursday 22nd of September 2011 08:10:34 AM
Old 09-22-2011
here is a snippit I modified your code using Safari instead of Ical, it was easier to pull a webpage as a demo than an iCal doc ;

Code:
 try
	choose from list {"Prodcution", "201sa", "SS Meeting Room", "503ms"} with prompt " Choose a Calendar to Subscribe to"
	if the result is {"Prodcution"} then
		tell application "Safari"
			make new document at end of documents
			set URL of document 1 to "http://en.wikipedia.org/wiki/Get_a_Clue/"
		end tell
		
	else if the result is {"201sa"} then
		tell application "Safari"
			make new document at end of documents
			set URL of document 1 to "http://en.wikipedia.org/wiki/Get_a_Clue/"
		end tell
		
	else if the result is {"SS Meeting Room"} then
		display dialog " you eat f00"
		tell application "Safari"
			make new document at end of documents
			set URL of document 1 to "http://en.wikipedia.org/wiki/Get_a_Clue/"
		end tell
		
	end if
on error errMsg number errorNumber
	display dialog "sumthin broke"
end try


Last edited by doctorfoo1; 09-22-2011 at 09:19 AM..
 

9 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Open Group suing Apple over "Unix"

Our Admin, Neo, has some experience with the subject of this news item: http://news.com.com/2100-1016-1015814.html It appears that The Open Group is suing Apple for using the term Unix without licensing from The Open Group. (3 Replies)
Discussion started by: auswipe
3 Replies

2. UNIX for Dummies Questions & Answers

UNIX Scripts "Load Error" with MicroFocus COBOL subprograms

When running our UNIX job scripts we randomly get the following 198 error below. When we restart the job it works fine. I haven't been able to recreate the problem in test, so I'm wondering if it has something to do with Cron or possibly a memory error or memory leak. I don't see anything... (5 Replies)
Discussion started by: rthiele
5 Replies

3. Shell Programming and Scripting

Joining 3 AWK scripts to avoid use "temp" files

Hi everyone, Looking for a suggestion to improve the below script in which I´ve been working. The thing is I have 3 separated AWK scripts that I need to apply over the inputfile, and for scripts (2) and (3) I have to use a "temp" file as their inputfile (inputfile_temp and inputfile_temp1... (2 Replies)
Discussion started by: cgkmal
2 Replies

4. Shell Programming and Scripting

list all scripts in crontab which contains the string "sqlplus"

Hi folks I use a Solaris 10 box with Bash shell. I have here a script (it works!) to list all scripts in crontab which contains the string "sqlplus": for i in $(ls `crontab -l | grep -v '#' | awk '{ print $6 }' | grep -v '^$'`); do grep -l 'sqlplus' "$i"; done Is there a more elegant... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

5. Ubuntu

Ubuntu Server 10.04 LTS - Regular crontab "caches old scripts"

Hi, I'm using a Ubuntu Server 10.04 LTS and it works like a charm, except for the regular crontab. Onde day a user had some problems with crontab, i analyse it and i see no problemns, all my stuff is working right. Cron is running smoth... I only noticed it when i altered a script already... (2 Replies)
Discussion started by: grafman
2 Replies

6. UNIX for Dummies Questions & Answers

Scripts exists but crontab says "File not found"

Hi All, We have an archiving script on our applications box. It is scheduled to run at 36th minute every hour. 36 * * * * /archive_7.sh But it throws an error saying "sh: /archive_7.sh: not found". I am not able to understand why. # ls -l /archive_7.sh ; file /archive_7.sh -rwxr-xr-x ... (4 Replies)
Discussion started by: satish51392111
4 Replies

7. Shell Programming and Scripting

Read from "list1" and list matches in "list2"

I want to print any matching IP addresse in List1 with List 2; List 1 List of IP addresses; 161.85.58.210 250.57.15.129 217.23.162.249 74.76.129.101 30.221.177.237 3.147.200.59 170.58.142.64 127.65.109.33 150.167.242.146 223.3.20.186 25.181.180.99 2.55.199.32 (3 Replies)
Discussion started by: lewk
3 Replies

8. UNIX for Dummies Questions & Answers

Meaning of "exec 9<name" in scripts

I have found code like exec 9<filename a number of times when looking over commonly used scripts here. What all does this do? Sometimes the filename is simply a list, but seems to always have read/write/execute attributes for all. I think the "<" means to accept this as input, but don't know... (3 Replies)
Discussion started by: wbport
3 Replies

9. Shell Programming and Scripting

Scheduling scripts with "at" command

Hi All , I need to create a scheduling capability on one of Linux boxes so that i could some 6 scripts back to back after a gap a given time difference . To run script1 :-- my test1.sh for 3 hrs , followed by 2nd script ,mytest2.sh for 10 hrs , then mystest3.sh for 2 hrs , then... (3 Replies)
Discussion started by: Anamica
3 Replies
Perl::Critic::Policy::CodeLayout::RequireASCII(3)	User Contributed Perl Documentation	 Perl::Critic::Policy::CodeLayout::RequireASCII(3)

NAME
Perl::Critic::Policy::CodeLayout::RequireASCII - Disallow high-bit characters. AFFILIATION
This policy is part of Perl::Critic::More, a bleeding edge supplement to Perl::Critic. DESCRIPTION
ASCII is a text encoding first introduced in 1963. It represents 128 characters in seven-bit bytes, reserving the eighth bit for error detection. Perl supports a large number of encodings. However, if you really want the ultimate in backward compatibility, ASCII is it! (We won't even talk about EBCDIC and the like...) This policy is not recommended for everyone. Instead, most of you should probably strive for one of the Unicode encodings for maximum forward compatibility. SEE ALSO
<http://en.wikipedia.org/wiki/Ascii> <http://en.wikipedia.org/wiki/EBCDIC> <http://en.wikipedia.org/wiki/Unicode> AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright (c) 2006-2008 Chris Dolan This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2014-06-10 Perl::Critic::Policy::CodeLayout::RequireASCII(3)
All times are GMT -4. The time now is 04:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy