Fix braindead bug, ID number was hardcoded.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@56789 91177308-0d34-0410-b5e6-96231b3b80d8

FasdUAS 1.101.10
k
i
I
.aevtoappnull****
	o0argv
k

r

n
1

leng
o0argv
o0nN
r
m
o0res
Z

A

o
0nN
m
R
.ascrerr ********
mUsage: FileRadar component componentVersion personID problemTitle description diag config {files}* !
 r"#
"n$%
$4&

cobj
&m
%o0argv
#o"0mycomponentnamemyComponentName!'(
'r &)*
)n $+,
+4!$-

cobj
-m"#
,o !0argv
*o(0mycomponentversionmyComponentVersion(./
.r'-01
0n'+23
24(+4

cobj
4m)*
3o'(0argv
1o0
mypersonid
myPersonID/56
5r.478
7n.29:
94/2;

cobj
;m01
:o./0argv
8o 0myproblemtitlemyProblemTitle6<=
<r5;>?
>n59@A
@469B

cobj
Bm78
Ao560argv
?o0
mydescription
myDescription=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0mydiagmyDiagDJK
JrCKLM
LnCGNO
N4DGP

cobj
PmEF
OoCD0argv
Mo0myconfigmyConfigKQR
QZLlSTU
S?LOVW
VoLM0nN
WmMN
TrRcXY
XnR_Z[
Z7S_\]

cobj
\mW[
]o\^0nN
[oRS0argv
Yo0myfilesmyFiles
Urfl^_
^Jfh
_o0myfilesmyFilesR`a
`rmbc
bImd0submitreportsubmitReportdef
eono"0mycomponentnamemyComponentNamefgh
goop(0mycomponentversionmyComponentVersionhij
iopq0
mypersonid
myPersonIDjkl
koqr 0myproblemtitlemyProblemTitlelmn
mors0
mydescription
myDescriptionnop
oost0mydiagmyDiagpqr
qotw0myconfigmyConfigrs
sowz0myfilesmyFiles
co0resat
tLu
uo0resvw
vlwxy
xlyz{
zi|}
|I~0submitreportsubmitReport~
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
}k
O

I
.miscactvnullnull
mRADRalis8LeopardĚuH+	Radar.app1V%	 ApplicationsĚ_Leopard:Applications:Radar.app	Radar.appLeopardApplications/Radar.app/
l
O
k
l
r
m
o,0myclassificationcodemyClassificationCode{ 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task; 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;
r
m
o.0myreproducibilitycodemyReproducibilityCode
l
r
m
boovfals
o0savenewprobsaveNewProb true or false true or false
l
lhb- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:
le_ set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
lic set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
l--
l
r
m
o0bugidintbugIDInt
r"
m
o0res
Z#
m#$
boovfals
k'
r'0
b'.
b',
b'*
o'(0res
m()Component:
o*+"0mycomponentnamemyComponentName
m,-

o0res
r1:
b18
b16
b14
o120res
m23&Component Version:
o45(0mycomponentversionmyComponentVersion
m67

o0res
r;D
b;B
b;@
b;>
o;<0res
m<=Person ID:
o>?0
mypersonid
myPersonID
m@A

o0res
rEJ
bEH
oEF0res
mFG--

o0res
rKT

bKR

bKP
bKN
oKL0res
mLMTitle:
oNO 0myproblemtitlemyProblemTitle

mPQ

o0res
rU^
bU\
bUZ
bUX
oUV0res
mVW  !!Description:
oXY0
mydescription
myDescription
mZ[""##

o0res$%
$r_j&'
&b_h()
(b_d*+
*b_b,-
,o_`0res
-m`a..//Diagnosis:
+obc~~0mydiagmyDiag
)mdg0011

'o}}0res%23
2rkx45
4bkv67
6bkr89
8bkp:;
:okl||0res
;mlo<<==Config:
9opq{{0myconfigmyConfig
7mru>>??

5ozz0res3@A
@ryBC
BbyDE
DbyFG
Fby~HI
Hoyzyy0res
Imz}JJKK*Classification Code:
Go~xx,0myclassificationcodemyClassificationCode
EmLLMM

Coww0resANO
NrPQ
PbRS
RbTU
TbVW
Vovv0res
WmXXYY,Reproducibility Code:
Uouu.0myreproducibilitycodemyReproducibilityCode
SmZZ[[

Qott0resO\s
\Y]r^_q
]r`a
`bbc
bbde
dbfg
fbhi
hbjk
jopp0res
kmllmm
File
iooo0i
gmnnoo:
enpq
p4nr
n
cobj
romm0i
qoll0myfilesmyFiles
cmsstt

aokk0resr0i
^mjj
_luih
unvw
v1g
g
leng
woff0myfilesmyFilesihqs
kxxyz
yr{|
{Ied}
e.rdrlnprb****obj d}c~
c
desc
~l
ba
o``0
mydescription
myDescriptionba_
_
diag
l
^]
o\\0mydiagmyDiag^][
[
cmvr
l
ZY
oXX(0mycomponentversionmyComponentVersionZYW
W
cmnm
l
VU
oTT"0mycomponentnamemyComponentNameVUS
S
rcod
l
RQ
oPP.0myreproducibilitycodemyReproducibilityCodeRQO
O
orig
l
NM
oLL0
mypersonid
myPersonIDNMK
K
pbti
l
JI
oHH 0myproblemtitlemyProblemTitleJIG
G
conf
l
FE
oDD0myconfigmyConfigFEC
C
clcd
l
BA
o@@,0myclassificationcodemyClassificationCodeBA?>
?
dsav
o==0savenewprobsaveNewProb>
|o<<0bugidbugIDz
l;:9;:9
l8893 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q(
r
c
o770bugidbugID
m6
6
long
o550bugidintbugIDInt
R432
4.ascrerr ********32
k(
r
n
7	1
1
ctxt
m00
m//
o	..0bugidbugID
o--0errormessageerrorMessage,
L(
b'
b#
b!
b
m(
o++0bugidintbugIDInt
m
, """
o!"**0errormessageerrorMessage
m#&"""),
l)))(')('
r)6
b)4
b)0
b).
o)*&&0res
m*-Filed:
o./%%0bugidbugID
m03

o$$0res
l77#"!#"!
Y7
kF
rFX
bFV
bFR
bFK
oFG0res
mGJAttached:
lKQ
nKQ
4LQ

cobj
oOP0i
oKL0myfilesmyFiles
mRU

o0res
rYo
IYk
.rdrladdfutxtobj

mr11
l]c
n]c
4^c

cobj
oab0i
o]^0myfilesmyFiles

pbid
ofg

0bugidbugID
o0ok
rp
bp}
bpy
bpu
opq

0res
mqt  Result:
oux		0ok
my|

o0res 0i
m:;
l;A
n;A
1<@

leng
o;<0myfilesmyFiles

	l

r

b
b
o0res
m6Added keyword: LLVM_CHECKER
m

o0res
I
.rdrladkilongobj

pbid
o0bugidbugID

keyi
m
l
L
b !
 b"#
"b$%
$b&'
&m(())(
'o0bugidintbugIDInt
%m**++
, """
#o0res
!m,,--""")
m..RADRalis8LeopardĚuH+	Radar.app1V%	 ApplicationsĚ_Leopard:Applications:Radar.app	Radar.appLeopardApplications/Radar.app/{/
/l0120
.aevtoappnull****0submitreportsubmitReport134
.aevtoappnull****0argv30argv4

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EO/E`O[\[Za\Z2E`YjvE`O*__a+EO2}560submitreportsubmitReport77"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles5"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles,0myclassificationcodemyClassificationCode.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0ok6@ ".0<>JLXZlns(*,
.miscactvnullnull

leng

cobj

desc

diag

cmvr

cmnm

rcod

orig

pbti

conf

clcd

dsav
.rdrlnprb****obj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOEOkEOfEOjEOEOf%%%EO%%%EO%%%EO%EO%%%EO%%%EO%%a%EOa%%a%EOa%%a%EOa%%a%EO+ka,Ekh
a%%a%a/%a%E[OYY*aaaaa a!a"a#a$a%a&'EOa(&EW'X)*[a+\[Zm\Zi2EOa,%a-%%a.%Oa/%%a0%EOLka,Ekh
a1%a/%a2%EO*a3a/a45E^Oa6%]%a7%E[OYOa8%a9%EO*a4a:a;<Oa=%a>%%a?%Uascr
ޭ

FasdUAS 1.101.10
k
i
I
.aevtoappnull****
	o0argv
k

r

n
1

leng
o0argv
o0nN
r
m
o0res
Z

A

o
0nN
m
R
.ascrerr ********
mUsage: FileRadar component componentVersion personID problemTitle description diag config {files}* !
 r"#
"n$%
$4&

cobj
&m
%o0argv
#o"0mycomponentnamemyComponentName!'(
'r &)*
)n $+,
+4!$-

cobj
-m"#
,o !0argv
*o(0mycomponentversionmyComponentVersion(./
.r'-01
0n'+23
24(+4

cobj
4m)*
3o'(0argv
1o0
mypersonid
myPersonID/56
5r.478
7n.29:
94/2;

cobj
;m01
:o./0argv
8o 0myproblemtitlemyProblemTitle6<=
<r5;>?
>n59@A
@469B

cobj
Bm78
Ao560argv
?o0
mydescription
myDescription=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0mydiagmyDiagDJK
JrCKLM
LnCGNO
N4DGP

cobj
PmEF
OoCD0argv
Mo0myconfigmyConfigKQR
QZLlSTU
S?LOVW
VoLM0nN
WmMN
TrRcXY
XnR_Z[
Z7S_\]

cobj
\mW[
]o\^0nN
[oRS0argv
Yo0myfilesmyFiles
Urfl^_
^Jfh
_o0myfilesmyFilesR`a
`rmbc
bImd0submitreportsubmitReportdef
eono"0mycomponentnamemyComponentNamefgh
goop(0mycomponentversionmyComponentVersionhij
iopq0
mypersonid
myPersonIDjkl
koqr 0myproblemtitlemyProblemTitlelmn
mors0
mydescription
myDescriptionnop
oost0mydiagmyDiagpqr
qotw0myconfigmyConfigrs
sowz0myfilesmyFiles
co0resat
tLu
uo0resvw
vlwxy
xlyz{
zi|}
|I~0submitreportsubmitReport~
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
}k
O

I
.miscactvnullnull
mRADRalis^	Future OSĚwH+	Radar.app'	 ApplicationsĚN.Future OS:AppleInternal:Applications:Radar.app	Radar.app	Future OS$AppleInternal/Applications/Radar.app/
l
O
k
l
r
m
o,0myclassificationcodemyClassificationCode{ 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task; 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;
r
m
o.0myreproducibilitycodemyReproducibilityCode
l
r
m
boovfals
o0savenewprobsaveNewProb true or false true or false
l
lhb- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:
le_ set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
lic set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
l--
l
r
m
o0bugidintbugIDInt
r"
m
o0res
Z#t
m#$
boovfals
k'
r'0
b'.
b',
b'*
o'(0res
m()Component:
o*+"0mycomponentnamemyComponentName
m,-

o0res
r1:
b18
b16
b14
o120res
m23&Component Version:
o45(0mycomponentversionmyComponentVersion
m67

o0res
r;D
b;B
b;@
b;>
o;<0res
m<=Person ID:
o>?0
mypersonid
myPersonID
m@A

o0res
rEJ
bEH
oEF0res
mFG--

o0res
rKT

bKR

bKP
bKN
oKL0res
mLMTitle:
oNO 0myproblemtitlemyProblemTitle

mPQ

o0res
rU^
bU\
bUZ
bUX
oUV0res
mVW  !!Description:
oXY0
mydescription
myDescription
mZ[""##

o0res$%
$r_j&'
&b_h()
(b_d*+
*b_b,-
,o_`0res
-m`a..//Diagnosis:
+obc~~0mydiagmyDiag
)mdg0011

'o}}0res%23
2rkx45
4bkv67
6bkr89
8bkp:;
:okl||0res
;mlo<<==Config:
9opq{{0myconfigmyConfig
7mru>>??

5ozz0res3@A
@ryBC
BbyDE
DbyFG
Fby~HI
Hoyzyy0res
Imz}JJKK*Classification Code:
Go~xx,0myclassificationcodemyClassificationCode
EmLLMM

Coww0resANO
NrPQ
PbRS
RbTU
TbVW
Vovv0res
WmXXYY,Reproducibility Code:
Uouu.0myreproducibilitycodemyReproducibilityCode
SmZZ[[

Qott0resO\s
\Y]r^_q
]r`a
`bbc
bbde
dbfg
fbhi
hbjk
jopp0res
kmllmm
File
iooo0i
gmnnoo:
enpq
p4nr
n
cobj
romm0i
qoll0myfilesmyFiles
cmsstt

aokk0resr0i
^mjj
_luih
unvw
v1g
g
leng
woff0myfilesmyFilesihqs
ktxxyz
yr{|
{m}}~~6246947
|oee0bugidbugIDz
ldd,&NewProblem description myDescription LNewProblem description myDescription
lcc	diagnosis myDiag &	diagnosis myDiag
lbb,&	componentVersion myComponentVersion L	componentVersion myComponentVersion
laa& 	componentName myComponentName @	componentName myComponentName
l``2,	reproducibilityCode myReproducibilityCode X	reproducibilityCode myReproducibilityCode
l__	originator myPersonID 0	originator myPersonID
l^^$	problemTitle myProblemTitle <	problemTitle myProblemTitle
l]]	config myConfig $	config myConfig
l\\'!	classCode myClassificationCode B	classCode myClassificationCode
l[[	doSave saveNewProb&	doSave saveNewProb
lZYXZYX
lWW93 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q
r
c
oVV0bugidbugID
mU
U
long
oTT0bugidintbugIDInt
RSRQ
S.ascrerr ********RQ
k
r
n
7P
P
ctxt
mOO
mNN
oMM0bugidbugID
oLL0errormessageerrorMessageK
L
b
b
b
b
m(
oJJ0bugidintbugIDInt
m
, """
oII0errormessageerrorMessage
m""")K
lHGFHGF
r

b
b
b
oEE0res
mFiled:
oDD0bugidbugID
m

oCC0res
lBA@BA@
YX?>
kS
r,
b*
b&
b
o==0res
mAttached:
l%<;
n%
4 %:
:
cobj
o#$990i
o 880myfilesmyFiles<;
m&)

o770res
r-C
I-?65
6.rdrladdfutxtobj 54

4
mr11
	l1732
n17

4271
1
cobj
o56000i

o12//0myfilesmyFiles32
.-
.
pbid
o:;,,0bugidbugID-
o++0ok*
rDS
bDQ
bDM
bDI
oDE))0res
mEHattached:
oIL((0ok
mMP

o''0res*?0i
m&&
l%$
n
1#
#
leng
o""0myfilesmyFiles%$> !
 lYY! ! !"#
"rYd$%
$bYb&'
&bY^()
(oYZ0res
)mZ]**++6Added keyword: LLVM_CHECKER
'm^a,,--

%o0res#.
.Iet/
.rdrladkilongobj /01

pbid
0oij0bugidbugID12

keyi
2mmp34
3luu45
5Lu6
6bu78
7bu9:
9bu~;<
;buz=>
=mux??@@(
>oxy0bugidintbugIDInt
<mz}AABB
, """
:o~0res
8mCCDD""")
mEERADRalis^	Future OSĚwH+	Radar.app'	 ApplicationsĚN.Future OS:AppleInternal:Applications:Radar.app	Radar.app	Future OS$AppleInternal/Applications/Radar.app/{F
Fl

GHI
G
	.aevtoappnull****0submitreportsubmitReportHJK
.aevtoappnull****0argvJ0argvK

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EO/E`O[\[Za\Z2E`YjvE`O*__a+EOI}LM0submitreportsubmitReportNN"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFilesL"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles,0myclassificationcodemyClassificationCode.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0okM5 ".0<>JLXZlns}*,?AC
.miscactvnullnull

leng

cobj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOxEOkEOfEOjEOEOf%%%EO%%%EO%%%EO%EO%%%EO%%%EO%%a%EOa%%a%EOa%%a%EOa%%a%EO+ka,Ekh
a%%a%a/%a%E[OYYaEOa&EW'X[a \[Zm\Zi2EOa!%a"%%a#%Oa$%%a%%EOLka,Ekh
a&%a/%a'%EO*a(a/a)*E^Oa+%]%a,%E[OYOa-%a.%EO*a)a/a01Oa2%a3%%a4%Uascrޭ


update apple script

update apple script

FasdUAS 1.101.10
l
O
k
I
.Itrmnwwnnullnull

O

k

I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
mFasciinema rec ~/alien-minimal-1.0.5
I %
.sysodelanullnmbr
m !
I&-
.Itrmsntxnullobj

Text
m()z am-demo !
 I.3"
.sysodelanullnmbr
"m./!#$
#I4;%
.Itrmsntxnullobj %&

Text
&m67''((
false$)*
)I<A+
.sysodelanullnmbr
+m<=*,-
,IBI.
.Itrmsntxnullobj ./

Text
/mDE0011true-23
2IJO4
.sysodelanullnmbr
4mJK356
5IPW7
.Itrmsntxnullobj 78

Text
8mRS99::`AM_VERSIONS_PROMPT=(RUBY PYTHON JAVA GO CRYSTAL)6;<
;IX]=
.sysodelanullnmbr
=mXY<>?
>I^e@
.Itrmsntxnullobj @A

Text
Am`aBBCC0source venv/bin/activate?DE
DIfkF
.sysodelanullnmbr
FmfgEGH
GIlsI
.Itrmsntxnullobj IJ

Text
JmnoKKLLsleep 5 &HMN
MItyO
.sysodelanullnmbr
OmtuNPQ
PIzR
.Itrmsntxnullobj RS

Text
Sm|}TTUUsleep 5 &QVW
VIX
.sysodelanullnmbr
XmWYZ
YI[
.Itrmsntxnullobj [\

Text
\m]]^^sleep 5 &Z_`
_Ia
.sysodelanullnmbr
am
`bc
bId
.Itrmsntxnullobj de

Text
emffgg<export PROMPT_START_TAG='--> 'chi
hIj
.sysodelanullnmbr
jmikl
kIm
.Itrmsntxnullobj mn

Text
nmoopp4export PROMPT_END_TAG=' $'lqr
qIs
.sysodelanullnmbr
smrtu
tIv
.Itrmsntxnullobj vw

Text
wmxxyy
falseuz{
zI|
.sysodelanullnmbr
|m{}~
}I
.Itrmsntxnullobj

Text
mtrue~
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
m<export AM_ERROR_ON_START_TAG=1
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
m
false
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
mtrue
I
.sysodelanullnmbr
m
I

.Itrmsntxnullobj

Text
mJunset PROMPT_START_TAG PROMPT_END_TAG
I
.sysodelanullnmbr
m
I#~}
~.Itrmsntxnullobj }|{
|
Text
m:export AM_SHOW_PROCESS_TIME=1{
I$)zy
z.sysodelanullnmbr
m$%xxy
I*3wv
w.Itrmsntxnullobj vut
u
Text
m,/sleep 2t
I49sr
s.sysodelanullnmbr
m45qqr
I:Cpo
p.Itrmsntxnullobj onm
n
Text
m<?:export AM_SHOW_PROCESS_TIME=2m
IDIlk
l.sysodelanullnmbr
mDEjjk
IJSih
i.Itrmsntxnullobj hgf
g
Text
mLOsleep 0f
ITYed
e.sysodelanullnmbr
mTUccd
IZcba
b.Itrmsntxnullobj a`_
`
Text
m\_sleep 3_
Idk^]
^.sysodelanullnmbr
mdg\\]
Ilu[Z
[.Itrmsntxnullobj ZYX
Y
Text
mnq:export AM_SHOW_PROCESS_TIME=0X
Iv{WV
W.sysodelanullnmbr
mvwUUV
I|TS
T.Itrmsntxnullobj SRQ
R
Text
m~sleep 2Q
IPO
P.sysodelanullnmbr
mNNO
IML
M.Itrmsntxnullobj LKJ
K
Text
m2export AM_SHOW_FULL_DIR=1J
IIH
I.sysodelanullnmbr
mGGH
IFE
F.Itrmsntxnullobj EDC
D
Text
m2export AM_SHOW_FULL_DIR=0C
IBA
B.sysodelanullnmbr
m@@A
I?>
?.Itrmsntxnullobj >=<
=
Text
m
false<
I;:
;.sysodelanullnmbr
m99:
I87
8.Itrmsntxnullobj 765
6
Text
m		true5

I43
4.sysodelanullnmbr
m223

I10
1.Itrmsntxnullobj 0/.
/
Text
m4export AM_HIDE_EXIT_CODE=1.
I-,
-.sysodelanullnmbr
m++,
I*)
*.Itrmsntxnullobj )('
(
Text
m
false'
I&%
&.sysodelanullnmbr
m$$%
I#"!
#.Itrmsntxnullobj "!!"
!
Text
"m##$$true  %&
%I'
.sysodelanullnmbr
'm&()
(I*
.Itrmsntxnullobj *+

Text
+m,,--(export AM_THEME=mono)./
.I
0
.sysodelanullnmbr
0m	/12
1I3
.Itrmsntxnullobj 34

Text
4m55666export AM_THEME=mono_bright278
7I9
.sysodelanullnmbr
9m8:;
:I'
<
.Itrmsntxnullobj
<=

Text
=m #>>??0export AM_THEME=terminal;@A
@I(-
B

.sysodelanullnmbr
Bm()	ACD
CI.7E
.Itrmsntxnullobj EF

Text
Fm03GGHH(export AM_THEME=softDIJ
II8=K
.sysodelanullnmbr
Km89JLM
LI>GN
.Itrmsntxnullobj NO

Text
Om@CPPQQ.export AM_THEME=defaultMRS
RIHMT
.sysodelanullnmbr
TmHISUV
UINWW
.Itrmsntxnullobj WX

Text
XmPSYYZZunset AM_THEMEV[\
[IX]]
.sysodelanullnmbr
]mXY\^_
^I^g`
.Itrmsntxnullobj `a

Text
am`cbbccdeactivate_de
dIhmf
.sysodelanullnmbr
fmhiegh
gInwi
.Itrmsntxnullobj ij

Text
jmpskkllexithmn
mIx}o
.sysodelanullnmbr
omxynp
pI~q
.Itrmsntxnullobj qr

Text
rmssttexit
n
uv
u1

Wcsn
v1

Crwn
mww|ITRMalisMacintosh HDBD	iTerm.app
 cuApplications/:Applications:iTerm.app/	iTerm.appMacintosh HDApplications/iTerm.app/xyx
.aevtoappnull****yz{|
.aevtoappnull****
zk}}{|2w'09BKT]fox#,5>GPYbks
.Itrmnwwnnullnull

Crwn

Wcsn
.sysodelanullnmbr

Text
.Itrmsntxnullobj
*jO*,,wjO*lOjO*lOljO*lOljO*lOljO*lOljO*lOljO*lOkjO*lOkjO*alOajO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOmjO*alOljO*alOljO*alOajO*a lOljO*a!lOajO*a"lOljO*a#lOljO*a$lOljO*a%lOljO*a&lOljO*a'lOljO*a(lOljO*a)lOljO*a*lOljO*a+lOljO*a,lOljO*a-lOljO*a.lOljO*a/lOljO*a0lOjO*a1lUUascrޭ

FasdUAS 1.101.10
l
O
k
I
.Itrmnwwnnullnull

O

k

I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
mFasciinema rec ~/alien-minimal-1.0.4
I %
.sysodelanullnmbr
m !
I&-
.Itrmsntxnullobj

Text
m()z am-demo !
 I.3"
.sysodelanullnmbr
"m./!#$
#I4;%
.Itrmsntxnullobj %&

Text
&m67''((
false$)*
)I<A+
.sysodelanullnmbr
+m<=*,-
,IBI.
.Itrmsntxnullobj ./

Text
/mDE0011true-23
2IJO4
.sysodelanullnmbr
4mJK356
5IPW7
.Itrmsntxnullobj 78

Text
8mRS99::JAM_VERSIONS_PROMPT=(RUBY PYTHON JAVA)6;<
;IX]=
.sysodelanullnmbr
=mXY<>?
>I^e@
.Itrmsntxnullobj @A

Text
Am`aBBCC0source venv/bin/activate?DE
DIfkF
.sysodelanullnmbr
FmfgEGH
GIlsI
.Itrmsntxnullobj IJ

Text
JmnoKKLLsleep 5 &HMN
MItyO
.sysodelanullnmbr
OmtuNPQ
PIzR
.Itrmsntxnullobj RS

Text
Sm|}TTUUsleep 5 &QVW
VIX
.sysodelanullnmbr
XmWYZ
YI[
.Itrmsntxnullobj [\

Text
\m]]^^sleep 5 &Z_`
_Ia
.sysodelanullnmbr
am
`bc
bId
.Itrmsntxnullobj de

Text
emffgg<export PROMPT_START_TAG='--> 'chi
hIj
.sysodelanullnmbr
jmikl
kIm
.Itrmsntxnullobj mn

Text
nmoopp4export PROMPT_END_TAG=' $'lqr
qIs
.sysodelanullnmbr
smrtu
tIv
.Itrmsntxnullobj vw

Text
wmxxyy
falseuz{
zI|
.sysodelanullnmbr
|m{}~
}I
.Itrmsntxnullobj

Text
mtrue~
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
m<export AM_ERROR_ON_START_TAG=1
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
m
false
I
.sysodelanullnmbr
m
I
.Itrmsntxnullobj

Text
mtrue
I
.sysodelanullnmbr
m
I

.Itrmsntxnullobj

Text
mJunset PROMPT_START_TAG PROMPT_END_TAG
I
.sysodelanullnmbr
m
I#~}
~.Itrmsntxnullobj }|{
|
Text
m:export AM_SHOW_PROCESS_TIME=1{
I$)zy
z.sysodelanullnmbr
m$%xxy
I*3wv
w.Itrmsntxnullobj vut
u
Text
m,/sleep 2t
I49sr
s.sysodelanullnmbr
m45qqr
I:Cpo
p.Itrmsntxnullobj onm
n
Text
m<?:export AM_SHOW_PROCESS_TIME=2m
IDIlk
l.sysodelanullnmbr
mDEjjk
IJSih
i.Itrmsntxnullobj hgf
g
Text
mLOsleep 0f
ITYed
e.sysodelanullnmbr
mTUccd
IZcba
b.Itrmsntxnullobj a`_
`
Text
m\_sleep 3_
Idk^]
^.sysodelanullnmbr
mdg\\]
Ilu[Z
[.Itrmsntxnullobj ZYX
Y
Text
mnq:export AM_SHOW_PROCESS_TIME=0X
Iv{WV
W.sysodelanullnmbr
mvwUUV
I|TS
T.Itrmsntxnullobj SRQ
R
Text
m~sleep 2Q
IPO
P.sysodelanullnmbr
mNNO
IML
M.Itrmsntxnullobj LKJ
K
Text
m2export AM_SHOW_FULL_DIR=1J
IIH
I.sysodelanullnmbr
mGGH
IFE
F.Itrmsntxnullobj EDC
D
Text
m2export AM_SHOW_FULL_DIR=0C
IBA
B.sysodelanullnmbr
m@@A
I?>
?.Itrmsntxnullobj >=<
=
Text
m
false<
I;:
;.sysodelanullnmbr
m99:
I87
8.Itrmsntxnullobj 765
6
Text
m		true5

I43
4.sysodelanullnmbr
m223

I10
1.Itrmsntxnullobj 0/.
/
Text
m4export AM_HIDE_EXIT_CODE=1.
I-,
-.sysodelanullnmbr
m++,
I*)
*.Itrmsntxnullobj )('
(
Text
m
false'
I&%
&.sysodelanullnmbr
m$$%
I#"!
#.Itrmsntxnullobj "!!"
!
Text
"m##$$true  %&
%I'
.sysodelanullnmbr
'm&()
(I*
.Itrmsntxnullobj *+

Text
+m,,--(export AM_THEME=mono)./
.I
0
.sysodelanullnmbr
0m	/12
1I3
.Itrmsntxnullobj 34

Text
4m55666export AM_THEME=mono_bright278
7I9
.sysodelanullnmbr
9m8:;
:I'
<
.Itrmsntxnullobj
<=

Text
=m #>>??0export AM_THEME=terminal;@A
@I(-
B

.sysodelanullnmbr
Bm()	ACD
CI.7E
.Itrmsntxnullobj EF

Text
Fm03GGHH(export AM_THEME=softDIJ
II8=K
.sysodelanullnmbr
Km89JLM
LI>GN
.Itrmsntxnullobj NO

Text
Om@CPPQQ.export AM_THEME=defaultMRS
RIHMT
.sysodelanullnmbr
TmHISUV
UINWW
.Itrmsntxnullobj WX

Text
XmPSYYZZunset AM_THEMEV[\
[IX]]
.sysodelanullnmbr
]mXY\^_
^I^g`
.Itrmsntxnullobj `a

Text
am`cbbccdeactivate_de
dIhmf
.sysodelanullnmbr
fmhiegh
gInwi
.Itrmsntxnullobj ij

Text
jmpskkllexithmn
mIx}o
.sysodelanullnmbr
omxynp
pI~q
.Itrmsntxnullobj qr

Text
rmssttexit
n
uv
u1

Wcsn
v1

Crwn
mww|ITRMalisMacintosh HDBD	iTerm.app
 cuApplications/:Applications:iTerm.app/	iTerm.appMacintosh HDApplications/iTerm.app/xyx
.aevtoappnull****yz{|
.aevtoappnull****
zk}}{|2w'09BKT]fox#,5>GPYbks
.Itrmnwwnnullnull

Crwn

Wcsn
.sysodelanullnmbr

Text
.Itrmsntxnullobj
*jO*,,wjO*lOjO*lOljO*lOljO*lOljO*lOljO*lOljO*lOkjO*lOkjO*alOajO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOljO*alOmjO*alOljO*alOljO*alOajO*a lOljO*a!lOajO*a"lOljO*a#lOljO*a$lOljO*a%lOljO*a&lOljO*a'lOljO*a(lOljO*a)lOljO*a*lOljO*a+lOljO*a,lOljO*a-lOljO*a.lOljO*a/lOljO*a0lOjO*a1lUUascrޭ


Removed informational notice from iCal script

--HG--
extra : convert_revision : svn%3A99687598-2e92-11dd-8019-fe7b9d601d1b/trunk%402701

FasdUAS 1.101.10
k
lQK	An applescript that shows today's events from iCal as growl notifications.
l

a[	The script shows how to register and use multiple types of notifications from Applescript:
l

l		"Today's Events"
l			and
l!		"In-Script Notifications"
lD>			are the two notification types that this script registers.
l@: 			The types of notification are separated functionally.
l|v 			So the user can disable the first informational note from the prefpane without disabling the main notifications.
l!!tn-------------------------------------------------------------------------------------------------------------- "#
"l$$tn--------------------------------------------------------------------------------------------------------------#%&
%l&'(
'l()*
)l++A;	Register with growl and show the "gathering" notification.*,-
,l.
.r/0
/J1123
2m44Today's Events35
5m66In-Script Notification
0o 0myallnoteslistmyAllNotesList-78
7l
9
9r
:;
:m<<-'AppleScript iCal today's Event Notifier
;o0appnameappName8=>
=l?
?O@A
@l	B
BIC
.registernullnullCDE

appl
Do0appnameappNameEFG

anot
Fo 0myallnoteslistmyAllNotesListGHI

dnot
Ho 0myallnoteslistmyAllNotesListIJ

iapp
JmKK
iCal
AmLL2null߀LGrowlHelperApp.appP(`z@)(|ː{GRRRalisMacintosh HDgH+LGrowlHelperApp.appLȞV	 	ResourcesfȂ6LLLDDYMacintosh HD:Library:PreferencePanes:Growl.prefPane:Contents:Resources:GrowlHelperApp.app&GrowlHelperApp.appMacintosh HDLLibrary/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/>MN
MlNOP
Ol%Q
Qr%RS
RI#
.misccurdldt null
So0nowPTU
Tl&/V
Vr&/WX
W\&+YZ
Yo&'0now
Zl'*[
[n'*\]
\1(*

time
]o'(0now
Xo0thismorningthisMorningU^_
^l0?`
`r0?ab
a\0;cd
c[09ef
eo030thismorningthisMorning
f]38gh
gm34
h147

days
dm9:
bo0thiseveningthisEvening_ij
il@Ek
kr@Elm
lm@A
boovfals
mo0foundonefoundOnejno
nlopq
plFEr
rOFEst
skLDuuvw
vlLLxxZT	Catch events that start today or that started before today, but have not yet ended.wy
yXLDz{
zXd?|}
|k:~~
r
m
boovtrue
o0foundonefoundOne
O
k
r
1

wr1s
o0thedatetheDate
Q
r
l
b
b
1

wr11
m	 -
n
1

tstr
o0thedatetheDate
o"0theeventsummarytheEventSummary
R
.ascrerr ********
r
b
m
no summary -
n
1

tstr
o0thedatetheDate
o"0theeventsummarytheEventSummary
l
Q
k
r
1

wr12
o*0theeventdescriptiontheEventDescription
I
.ascrcmnt********
o*0theeventdescriptiontheEventDescription
R
.ascrerr ********
r
mno description
o*0theeventdescriptiontheEventDescription
o0	thisevent	thisEvent
l
O:
l	 9
I 9
.notifygrnullnull

name
m$'Today's Events

titl
o*-"0theeventsummarytheEventSummary

desc
o03*0theeventdescriptiontheEventDescription

appl
o450appnameappName
mL0	thisevent	thisEvent
}lg
6g
lgl
ngl
2hl

wrev
ogh0thiscalendarthisCalendar
lo
Go
lp
Fp
@q|
1rv

wr1s
ow{0thismorningthisMorning
B}
1~

wr1s
o0thiseveningthisEvening
l
F
@
1

wr5s
o0now
B
1

wr1s
o0thismorningthisMorning0thiscalendarthisCalendar
{2OT

wres
tmFInull߀iiCal.app@P<(`z@)(|ː{wrbtalisDMacintosh HDgH+iiCal.app?Y	 Applicationsf?Ki"Macintosh HD:Applications:iCal.appiCal.appMacintosh HDApplications/iCal.app/q
l
lFo
ZFo
HFJ
oFI0foundonefoundOne
OMk
l	Qj~
IQj}|
}.notifygrnullnull|{
{
name
mUXIn-Script Notificationz
z
titl
m[^No iCal events todayy
y
desc
madGo outside and play!xw
x
appl
oefvv0appnameappNamew~
mMNLu
ltstsurrq
q.aevtoappnull****ponm
p.aevtoappnull****
ko,7=OT^ipllonkjk0thiscalendarthisCalendarj0	thisevent	thisEvent146i<hLgfedKcba`_^]\[ZYXWVUTSRQPONMLKJIHGi 0myallnoteslistmyAllNotesListh0appnameappName
g
appl
f
anot
e
dnot
d
iappc
b.registernullnull
a.misccurdldt null`0now
_
time^0thismorningthisMorning
]
days\0thiseveningthisEvening[0foundonefoundOne
Z
wres
Y
kocl
X
cobj
W.corecnte********
V
wrev
U
wr1s
T
wr5sS0thedatetheDate
R
wr11
Q
tstrP"0theeventsummarytheEventSummaryON
M
wr12L*0theeventdescriptiontheEventDescription
K.ascrcmnt********
J
name
I
titl
H
desc
G.notifygrnullnullmplvEOEO*UO*j
EO,E`O_k_ kE`OfE`Oa*a-[aalkhڠa-a[[[a,\Z_;\[a,\Z_=A\[[a,\Z;\[a,\Z_=AB1[aalkheE`O_*a,E`O*a,a%_a ,%E`!WX"#a$_a ,%E`!O*a%,E`&O_&j'WX"#a(E`&UO*a)a*a+_!a,_&-U[OYs[OYUO_#*a)a.a+a/a,a0-UYhascrޭ

FasdUAS 1.101.10
k
lQK	An applescript that shows today's events from iCal as growl notifications.
l

a[	The script shows how to register and use multiple types of notifications from Applescript:
l

l		"Today's Events"
l			and
l!		"In-Script Notifications"
lD>			are the two notification types that this script registers.
l@: 			The types of notification are separated functionally.
l|v 			So the user can disable the first informational note from the prefpane without disabling the main notifications.
l!!tn-------------------------------------------------------------------------------------------------------------- "#
"l$$tn--------------------------------------------------------------------------------------------------------------#%&
%l&'(
'l()*
)l*+,
+l--A;	Register with growl and show the "gathering" notification.,./
.l20
0O212
1k13345
4l567
6O89
8k::;<
;r=>
=J??@A
@m	BBToday's EventsAC
Cm
DDIn-Script Notification
>o 0myallnoteslistmyAllNotesList<E
EIF
.registernullnullFGH

appl
GmII-'AppleScript iCal today's Event NotifierHJK

anot
Jo 0myallnoteslistmyAllNotesListKLM

dnot
Lo 0myallnoteslistmyAllNotesListMN

iapp
NmOO
iCal
9mPP2null߀LGrowlHelperApp.appP()P(|0GRRRalisMacintosh HDgH+LGrowlHelperApp.appLȞV	 	ResourcesfȂ6LLLDDYMacintosh HD:Library:PreferencePanes:Growl.prefPane:Contents:Resources:GrowlHelperApp.app&GrowlHelperApp.appMacintosh HDLLibrary/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/7QR
QlRS
SI1T
.notifygrnullnullTUV

name
Ul	 !W
Wm !XXIn-Script NotificationVYZ

titl
Yl	"#[
[m"#\\Please WaitZ]^

desc
]l	&)_
_m&)``^XGathering today's events from iCal... (n.b. Events which are repeats will not be shown!)^a

appl
am*-bb-'AppleScript iCal today's Event Notifier
2mP/cd
cldef
el3<g
gr3<hi
hI38
.misccurdldt null
io0nowfjk
jl=Ll
lr=Lmn
m\=Hop
oo=@0now
pl@Gq
qn@Grs
r1CG

time
so@C0now
no0thismorningthisMorningktu
tlMTv
vIMTw
.ascrcmnt********
wlMPx
xoMP0thismorningthisMorninguyz
ylUd{
{rUd|}
|\U`~
~[U^
oUX0thismorningthisMorning
]X]
mXY
1Y\

days
m^_
}o0thiseveningthisEveningz
lel
Iel
.ascrcmnt********
leh
oeh0thiseveningthisEvening
l
l	Gather today's events
lm
Om
ks
lss
rs}
csy
Jsu
mux

list
o0
currentevents
currentEvents
X~U
OP
kO
lZT	Catch events that start today or that started before today, but have not yet ended.
XO
OJ
kI
I
.ascrcmnt********
l
mCURRENT EVENT!
r
1

wr1s
o0thestarttheStart
r
n
1

tstr
o0thestarttheStart
o0thestarttimetheStartTime
r
/
c
+
K
'0
eventtitle
eventTitle
n
1

wr11
o0	thisevent	thisEvent$0eventdescriptioneventDescription
n
1

wr12
o0	thisevent	thisEvent0	starttime	startTime
o #0thestarttimetheStartTime
m'*

reco
o0myrecordmyRecord
r0=
c09
J05
o030myrecordmyRecord
m58

list
o0newlistnewList
r>I
b>E
o>A0
currentevents
currentEvents
oAD0newlistnewList
o0
currentevents
currentEvents
o0	thisevent	thisEvent0	thisevent	thisEvent
l
6
2

wrev
l
G
l
F
@
1

wr1s
o0thismorningthisMorning
B
1

wr1s
o0thiseveningthisEvening
l
F
@
1

wr5s
o0now
B
1~
~
wr1s
o}}0thismorningthisMorning
o||0thiscalthisCal0thiscalthisCal
2{
{
wres
lVVzyzy
lVVxx	Show the events.
lVVwvwv
ZVut
lVcs
=Vc
nVa
m]ar
r
nmbr
nV]
2Y]q
q
cobj
oVYpp0
currentevents
currentEvents
maboos
Of
l	jn
Ijml
m.notifygrnullnulllk
k
name
l	loj
mloIn-Script Notificationji
i
titl
l	psh
mps		No iCal events todayhg

g
desc

l	vyf
mvy

Go outside and play!fed
e
appl
mz}-'AppleScript iCal today's Event Notifierdn
mfgPut
lcbcb
Xa
k
Q
r
l`
b
b!"
!n#$
#o__0
eventtitle
eventTitle
$o^^"0thiseventrecordthisEventRecord
"m%%	 -
 n&'
&o]]0	starttime	startTime
'o\\"0thiseventrecordthisEventRecord`
o[["0theeventsummarytheEventSummary
RZYX
Z.ascrerr ********YX
r()
(b*+
*m,,
no summary -
+n-.
-oWW0	starttime	startTime
.oVV"0thiseventrecordthisEventRecord
)oUU"0theeventsummarytheEventSummary/0
/lTSTS012
1Q345
3r67
6n89
8oRR$0eventdescriptioneventDescription
9oQQ"0thiseventrecordthisEventRecord
7oPP*0theeventdescriptiontheEventDescription
4RONM
O.ascrerr ********NM
5r:;
:m<<no description
;oLL*0theeventdescriptiontheEventDescription2=>
=lKJKJ>?I
?O@A
@l	BH
BIGFC
G.notifygrnullnullFCEDE
E
name
Dl	FD
FmGGToday's EventsDECHI
C
titl
Hl	JB
JoAA"0theeventsummarytheEventSummaryBI@KL
@
desc
Kl	M?
Mo>>*0theeventdescriptiontheEventDescription?L=N<
=
appl
NmOO-'AppleScript iCal today's Event Notifier<H
AmPIa"0thiseventrecordthisEventRecord
o;;0
currentevents
currentEventsP:
Pl9898:
mmpQQnull߀iiCal.appP<()P(|0wrbtalisDMacintosh HDgH+iiCal.app?Y	 Applicationsf?Ki"Macintosh HD:Applications:iCal.appiCal.appMacintosh HDApplications/iCal.app/RS
Rl7676ST5
Tl434352UV2U1
1.aevtoappnull****V0W/.XY-
0.aevtoappnull****
Wk	ZZ.[[e\\j]]t^^y__``,,/.X+*)+0thiscalthisCal*0	thisevent	thisEvent)"0thiseventrecordthisEventRecordYAPBD('I&%$O#"!X \`bQa

%,<GO( 0myallnoteslistmyAllNotesList
'
appl
&
anot
%
dnot
$
iapp#
".registernullnull
!
name

titl

desc
.notifygrnullnull
.misccurdldt null0now

time0thismorningthisMorning
.ascrcmnt********

days0thiseveningthisEvening

list0
currentevents
currentEvents

wres

kocl

cobj
.corecnte********

wreva

wr1s

wr5s
0thestarttheStart

tstr0thestarttimetheStartTime
0
eventtitle
eventTitle

wr11$0eventdescriptioneventDescription

wr120	starttime	startTime

reco0myrecordmyRecord0newlistnewList

nmbr"0theeventsummarytheEventSummary*0theeventdescriptiontheEventDescription-
/lvEO*UO*aaaUO*jE`O__a,E`O_jO_k_ kE`O_jOajva&E`O*a-[aa l!kh*a"-a#[[[a$,\Z_;\[a$,\Z_=A\[[a%,\Z_;\[a$,\Z_=AB1[aa l!kh\a&jO*a$,E`'O_'a(,E`)Oa*a+,a,a-,a._)a/a0&E`1O_1kva&E`2O__2%E`U[OYU[OY@O_a -a3,j!*a4a5aa6a7UYhO~_[aa l!kha*,a8%a.,%E`9WX:;a<a.,%E`9Oa,,E`=WX:;a>E`=O*a?_9a_=a@U[OYOPUascr
ޭ


No more unnecessary interference with Terminal on start up, as it is now purely done in background

do shell script ("/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background > /dev/null 2>&1 &")

tell application "Terminal"
    do script ("nohup /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &")
    do script ("killall Terminal")
end tell


Arrgh.

Arrgh.

on newPresentation(themeName)
	tell application "Keynote"
		activate
		-- FIXME: Make this selectable?
		set targetWidth to 1024 -- 1440 <-- higher resolution
		set targetHeight to 768 -- 1080 <-- higher resolution

		set props to {document theme:theme (themeName as string), width:targetWidth, height:targetHeight}

		set thisDocument to make new document with properties props
		return id of thisDocument
	end tell
end newPresentation

on openPresentation(posixPath)
	tell application "Keynote"
		open posixPath
	end tell
end openPresentation

on savePresentation(docId, posixPath)
	tell application "Keynote"
		activate
        set theDocument to document id docId
		save theDocument in POSIX file posixPath
        delete theDocument
        open posixPath
	end tell
end savePresentation

on closePresentation(docId)
	tell application "Keynote"
		activate
        set theDocument to document id docId
		close theDocument
	end tell
end savePresentation

on createSlide(docId, masterSlideName)
	tell application "Keynote"
		tell document id docId
			set thisSlide to make new slide with properties {base slide:master slide masterSlideName}
		end tell
	end tell
end createSlide

on deleteAllSlides(docId)
	tell application "Keynote"
		tell document id docId to delete every slide
	end tell
end deleteAllSlides

on finalize(docId)
	tell application "Keynote"
		tell document id docId to delete slide 1
	end tell
end finalize

on themeMasters(docId)
	--	  tell application "Keynote" to get the name of every master slide of thisDocument
	tell application "Keynote"
		set names to the name of every master slide of document id docId
		return names
	end tell
end themeMasters

on addImage(docId, slideIndex, n, filepath)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
  tell application "Keynote"
	tell slide slideIndex of document id docId
		-- TO REPLACE A PLACEHOLDER OR EXISTING IMAGE:
		set thisPlaceholderImageItem to image n
		-- change the value of the “file name” property of the image to be an HFS file reference to the replacement image file
	    set macPath to POSIX file filepath as Unicode text
		set file name of thisPlaceholderImageItem to ¬
			alias macPath
	end tell
  end tell
end addImage

on addTitle(docId, slideIndex, thisSlideTitle)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
			set the object text of the default title item to thisSlideTitle
		end tell
	end tell
end addTitle

on addBody(docId, slideIndex, thisSlideBody)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
            set the object text of the default body item to thisSlideBody
		end tell
	end tell
end addTitle

    (*
  	FIXME: Use slide ID to adress slide instead of "current slide"
    *)
on addPresenterNotes(docId, slideIndex, theNotes)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
			set presenter notes to theNotes
		end tell
	end tell
end addPresenterNotes

on addText(docId, slideIndex, n, theText)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
  tell application "Keynote"
  	tell slide slideIndex of document id docId
		set thisPlaceholderItem to text item n
		set object text of thisPlaceholderItem to theText
	end tell
  end tell
end addText

on newPresentation(themeName)
	tell application "Keynote"
		activate
		-- FIXME: Make this selectable?
		set targetWidth to 1024 -- 1440 <-- higher resolution
		set targetHeight to 768 -- 1080 <-- higher resolution

		set props to {document theme:theme (themeName as string), width:targetWidth, height:targetHeight}

		set thisDocument to make new document with properties props
		return id of thisDocument
	end tell
end newPresentation

on openPresentation(posixPath)
	tell application "Keynote"
		open posixPath
	end tell
end openPresentation

on savePresentation(docId, posixPath)
	tell application "Keynote"
		activate
        set theDocument to document id docId
		save theDocument in POSIX file posixPath
        delete theDocument
        open posixPath
	end tell
end savePresentation

on closePresentation(docId)
	tell application "Keynote"
		activate
        set theDocument to document id docId
		close theDocument
	end tell
end savePresentation

on createSlide(docId, masterSlideName)
	tell application "Keynote"
		tell document id docId
			set thisSlide to make new slide with properties {base slide:master slide masterSlideName}
		end tell
	end tell
end createSlide

on deleteAllSlides(docId)
	tell application "Keynote"
		tell document id docId to delete every slide
	end tell
end deleteAllSlides

on finalize(docId)
	tell application "Keynote"
		tell document id docId to delete slide 1
	end tell
end finalize

on themeMasters(docId)
	--	  tell application "Keynote" to get the name of every master slide of thisDocument
	tell application "Keynote"
		set names to the name of every master slide of document id docId
		return names
	end tell
end themeMasters

on addImage(docId, slideIndex, n, filepath)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
  tell application "Keynote"
	tell slide slideIndex of document id docId
		-- TO REPLACE A PLACEHOLDER OR EXISTING IMAGE:
		set thisPlaceholderImageItem to image n
		-- change the value of the “file name” property of the image to be an HFS file reference to the replacement image file
	    set macPath to POSIX file filepath as Unicode text
		set file name of thisPlaceholderImageItem to ¬
			alias macPath
	end tell
  end tell
end addImage

on addTitle(docId, slideIndex, thisSlideTitle)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
			set the object text of the default title item to thisSlideTitle
		end tell
	end tell
end addTitle

on addBody(docId, slideIndex, thisSlideBody)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
            set the object text of the default body item to thisSlideBody
		end tell
	end tell
end addTitle

on addPresenterNotes(docId, slideIndex, note)
    (*
  	FIXME: Use slide ID to adress slide instead of "current slide"
    *)
	tell application "Keynote"
    	tell slide slideIndex of document id docId
			set presenter notes to note
		end tell
	end tell
end addPresenterNotes

on addText(docId, slideIndex, n, theText)
  (*
	FIXME: Use slide ID to adress slide instead of "current slide"
  *)
  tell application "Keynote"
  	tell slide slideIndex of document id docId
		set thisPlaceholderItem to text item n
		set object text of thisPlaceholderItem to theText
	end tell
  end tell
end addText


add/clean up documentation

add/clean up documentation

--# Current Alfred-Bundler version
property BUNDLER_VERSION : "devel"
--# Path to user's home directory
property _home : POSIX path of (path to "cusr" as text)
--# Path to Alfred-Bundler's root directory
property BUNDLER_DIR : (_home) & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-" & BUNDLER_VERSION
property CACHE_DIR : (_home) & "Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/alfred.bundler-" & BUNDLER_VERSION

(* MAIN API FUNCTION *)

on load_bundler()
	(* Load `AlfredBundler.scpt` from the Alfred-Bundler directory as a script object.
	If the Alfred-Bundler directory does not exist, install it (using `_bootstrap()`).

	:returns: the script object of `AlfredBundler.scpt`
	:rtype: ``script object``

	*)
	--# Check if Alfred-Bundler is installed
	if (my _folder_exists(BUNDLER_DIR)) is not equal to true then
		--# install it if not
		my _bootstrap()
	end if
	delay 0.1
	--# Path to `AlfredBundler.scpt` in Alfed-Bundler directory
	set as_bundler to (BUNDLER_DIR & "/bundler/AlfredBundler.scpt")
	--# Return script object
	return load script as_bundler
end load_bundler

(* AUTO-DOWNLOAD BUNDLER *)

on _bootstrap()
	(* Check if bundler bash bundlet is installed and install it if not.

	:returns: ``None``

	*)
	--# Ask to install the Bundler
	try
		my _install_confirmation()
	on error
		--# Cannot continue to install the bundler, so stop
		return false
	end try
	--# Download the bundler
	set URLs to {"https://github.com/shawnrice/alfred-bundler/archive/" & BUNDLER_VERSION & ".zip", "https://bitbucket.org/shawnrice/alfred-bundler/get/" & BUNDLER_VERSION & ".zip"}
	--# Save Alfred-Bundler zipfile to this location temporarily
	set _zipfile to (quoted form of CACHE_DIR) & "/installer/bundler.zip"
	repeat with _url in URLs
		set _status to (do shell script "curl -fsSL --create-dirs --connect-timeout 5 " & _url & " -o " & _zipfile & " && echo $?")
		if _status is equal to "0" then exit repeat
	end repeat
	--# Could not download the file
	if _status is not equal to "0" then error "Could not download bundler install file" number 23
	--# Ensure directory tree already exists for bundler to be moved into it
	my _check_dir(BUNDLER_DIR)
	--# Unzip the bundler and move it to its data directory
	set _cmd to "cd " & (quoted form of CACHE_DIR) & "; cd installer; unzip -qo bundler.zip; mv ./*/bundler " & (quoted form of BUNDLER_DIR)
	do shell script _cmd
	--# Wait until bundler is fully unzipped and written to disk before finishing
	set as_bundler to (BUNDLER_DIR & "/bundler/AlfredBundler.scpt")
	repeat while not (my _path_exists(as_bundler))
		delay 0.2
	end repeat
	return
end _bootstrap

--# Function to get confirmation to install the bundler
on _install_confirmation()
	(* Ask user for permission to install Alfred-Bundler.
	Allow user to go to website for more information, or even to cancel download.

	:returns: ``True`` or raises Error

	*)
	--# Get path to workflow's `info.plist` file
	set _plist to my _pwd() & "info.plist"
	--# Get name of workflow's from `info.plist` file
	set _cmd to "/usr/libexec/PlistBuddy -c 'Print :name' '" & _plist & "'"
	set _name to do shell script _cmd
	--# Get workflow's icon, or default to system icon
	set _icon to my _pwd() & "icon.png"
	set _icon to my _check_icon(_icon)
	--# Prepare explanation text for dialog box
	set _text to _name & " needs to install additional components, which will be placed in the Alfred storage directory and will not interfere with your system.

You may be asked to allow some components to run, depending on your security settings.

You can decline this installation, but " & _name & " may not work without them. There will be a slight delay after accepting."

	set _response to button returned of (display dialog _text buttons {"More Info", "Cancel", "Proceed"} default button 3 with title "Setup " & _name with icon POSIX file _icon)
	--# If permission granted, continue download
	if _response is equal to "Proceed" then return true
	--# If more info requested, open webpage and error
	if _response is equal to "More Info" then
		tell application "System Events"
			open location "https://github.com/shawnrice/alfred-bundler/wiki/What-is-the-Alfred-Bundler"
		end tell
		error "User looked sought more information" number 23
	end if
	--# If permission denied, stop and error
	if _response is equal to "Cancel" then error "User canceled installation" number 23
end _install_confirmation

(* HELPER HANDLERS *)

on _pwd()
	(* Get path to "present working directory", i.e. the workflow's root directory.

	:returns: Path to this script's parent directory
	:rtype: ``string`` (POSIX path)

	*)
	--# Save default AS delimiters, and set delimiters to "/"
	set {ASTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
	--# Get POSIX path of script's directory
	set _path to (text items 1 thru -2 of (POSIX path of (path to me)) as string) & "/"
	--# Reset AS delimiters to original values
	set AppleScript's text item delimiters to ASTID
	return _path
end _pwd

on _prepare_cmd(_cmd)
	(* Ensure shell `_cmd` is working from the property directory.
	For testing purposes, it also sets the `AB_BRANCH` environmental variable.

	:param _cmd: Shell command to be run in `do shell script`
	:type _cmd: ``string``
	:returns: Shell command with `pwd` set properly
	:rtype: ``string``

	*)
	--# Ensure `pwd` is properly quoted for shell command
	set pwd to quoted form of (my _pwd())
	--# Declare environmental variable
	--#TODO: remove for final release
	set testing_var to "export AB_BRANCH=devel; "
	--# return shell script where `pwd` is properly set
	return testing_var & "cd " & pwd & "; bash " & _cmd
end _prepare_cmd

on _check_icon(_icon)
	(* Check if `_icon` exists, and if not revert to system download icon.

	:returns: POSIX path to `_icon`
	:rtype: ``string`` (POSIX path)

	*)
	try
		POSIX file _icon as alias
		return _icon
	on error
		return "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/SidebarDownloadsFolder.icns"
	end try
end _check_icon

on _check_dir(_folder)
	(* Check if `_folder` exists, and if not create it, including any sub-directories.

	:returns: POSIX path to `_folder`
	:rtype: ``string`` (POSIX path)

	*)
	if not my _folder_exists(_folder) then
		do shell script "mkdir -p " & (quoted form of _folder)
	end if
	return _folder
end _check_dir

on _folder_exists(_folder)
	(* Return ``true`` if `_folder` exists, else ``false``

	:param _folder: Full path to directory
	:type _folder: ``string`` (POSIX path)
	:returns: ``Boolean``

	*)
	if my _path_exists(_folder) then
		tell application "System Events"
			return (class of (disk item _folder) is folder)
		end tell
	end if
	return false
end _folder_exists

on _path_exists(_path)
	(* Return ``true`` if `_path` exists, else ``false``

	:param _path: Any POSIX path (file or folder)
	:type _path: ``string`` (POSIX path)
	:returns: ``Boolean``

	*)
	if _path is missing value or my _is_empty(_path) then return false
	try
		if class of _path is alias then return true
		if _path contains ":" then
			alias _path
			return true
		else if _path contains "/" then
			POSIX file _path as alias
			return true
		else
			return false
		end if
	on error msg
		return false
	end try
end _path_exists

on _is_empty(_obj)
	(* Return ``true`` if `_obj ` is empty, else ``false``

	:param _obj: Any Applescript type
	:type _obj: (optional)
	:returns: ``Boolean``

	*)
	--# Is `_obj ` a ``Boolean``?
	if {true, false} contains _obj then return false
	--# Is `_obj ` a ``missing value``?
	if _obj is missing value then return true
	--# Is `_obj ` a empty string?
	return length of (my _trim(_obj)) is 0
end _is_empty

on _trim(_str)
	(* Remove white space from beginning and end of `_str`

	:param _str: A text string
	:type _str: ``string``
	:returns: trimmed string

	*)
	if class of _str is not text or class of _str is not string or _str is missing value then return _str
	if _str is "" then return _str
	repeat while _str begins with " "
		try
			set _str to items 2 thru -1 of _str as text
		on error msg
			return ""
		end try
	end repeat
	repeat while _str ends with " "
		try
			set _str to items 1 thru -2 of _str as text
		on error
			return ""
		end try
	end repeat
	return _str
end _trim

--# Current Alfred-Bundler version
property BUNDLER_VERSION : "devel"
--# Path to user's home directory
property _home : POSIX path of (path to "cusr" as text)
--# Path to Alfred-Bundler's root directory
property BUNDLER_DIR : (_home) & "Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-" & BUNDLER_VERSION
property CACHE_DIR : (_home) & "Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/alfred.bundler-" & BUNDLER_VERSION

(* MAIN API FUNCTION *)

on load_bundler()
	(* Load `AlfredBundler.scpt` from the Alfred-Bundler directory as a script object.
	If the Alfred-Bundler directory does not exist, install it (using `_bootstrap()`).

	:returns: the script object of `AlfredBundler.scpt`
	:rtype: ``script object``

	*)
	--# Check if Alfred-Bundler is installed
	if (my _folder_exists(BUNDLER_DIR)) is not equal to true then
		--# install it if not
		my _bootstrap()
	end if
	delay 0.1
	--# Path to `AlfredBundler.scpt` in Alfed-Bundler directory
	set as_bundler to (BUNDLER_DIR & "/bundler/AlfredBundler.scpt")
	--# Return script object
	return load script as_bundler
end load_bundler

(* AUTO-DOWNLOAD BUNDLER *)

on _bootstrap()
	(* Check if bundler bash bundlet is installed and install it if not.

	:returns: ``None``

	*)
	--# Ask to install the Bundler
	try
		my _install_confirmation()
	on error
		--# Cannot continue to install the bundler, so stop
		return false

	:returns: ``string`` (POSIX path)

	end try
	--# Download the bundler
	set URLs to {"https://github.com/shawnrice/alfred-bundler/archive/" & BUNDLER_VERSION & ".zip", "https://bitbucket.org/shawnrice/alfred-bundler/get/" & BUNDLER_VERSION & ".zip"}
	--# Save Alfred-Bundler zipfile to this location temporarily
	set _zipfile to (quoted form of CACHE_DIR) & "/installer/bundler.zip"
	repeat with _url in URLs
		set _status to (do shell script "curl -fsSL --create-dirs --connect-timeout 5 " & _url & " -o " & _zipfile & " && echo $?")
		if _status is equal to "0" then exit repeat
	end repeat
	--# Could not download the file
	if _status is not equal to "0" then error "Could not download bundler install file" number 23
	--# Ensure directory tree already exists for bundler to be moved into it
	my _check_dir(BUNDLER_DIR)
	--# Unzip the bundler and move it to its data directory
	set _cmd to "cd " & (quoted form of CACHE_DIR) & "; cd installer; unzip -qo bundler.zip; mv ./*/bundler " & (quoted form of BUNDLER_DIR)
	do shell script _cmd
	--# Wait until bundler is fully unzipped and written to disk before finishing
	set as_bundler to (BUNDLER_DIR & "/bundler/AlfredBundler.scpt")
	repeat while not (my _path_exists(as_bundler))
		delay 0.2
	end repeat
	return
end _bootstrap

--# Function to get confirmation to install the bundler
on _install_confirmation()
	(* Ask user for permission to install Alfred-Bundler.
	Allow user to go to website for more information, or even to cancel download.

	:returns: ``True`` or raises Error

	*)
	--# Get path to workflow's `info.plist` file
	set _plist to my _pwd() & "info.plist"
	--# Get name of workflow's from `info.plist` file
	set _cmd to "/usr/libexec/PlistBuddy -c 'Print :name' '" & _plist & "'"
	set _name to do shell script _cmd
	--# Get workflow's icon, or default to system icon
	set _icon to my _pwd() & "icon.png"
	set _icon to my _check_icon(_icon)
	--# Prepare explanation text for dialog box
	set _text to _name & " needs to install additional components, which will be placed in the Alfred storage directory and will not interfere with your system.

You may be asked to allow some components to run, depending on your security settings.

You can decline this installation, but " & _name & " may not work without them. There will be a slight delay after accepting."

	set _response to button returned of (display dialog _text buttons {"More Info", "Cancel", "Proceed"} default button 3 with title "Setup " & _name with icon POSIX file _icon)
	--# If permission granted, continue download
	if _response is equal to "Proceed" then return true
	--# If more info requested, open webpage and error
	if _response is equal to "More Info" then
		tell application "System Events"
			open location "https://github.com/shawnrice/alfred-bundler/wiki/What-is-the-Alfred-Bundler"
		end tell
		error "User looked sought more information" number 23
	end if
	--# If permission denied, stop and error
	if _response is equal to "Cancel" then error "User canceled installation" number 23
end _install_confirmation

(* HELPER HANDLERS *)

on _pwd()
	(* Get path to "present working directory", i.e. the workflow's root directory.

	:returns: ``string`` (POSIX path)

	*)
	--# Save default AS delimiters, and set delimiters to "/"
	set {ASTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
	--# Get POSIX path of script's directory
	set _path to (text items 1 thru -2 of (POSIX path of (path to me)) as string) & "/"
	--# Reset AS delimiters to original values
	set AppleScript's text item delimiters to ASTID
	return _path
end _pwd

on _prepare_cmd(_cmd)
	(* Ensure shell `_cmd` is working from the property directory.
	For testing purposes, it also sets the `AB_BRANCH` environmental variable.

	:param _cmd: Shell command to be run in `do shell script`
	:type _cmd: ``string``
	:returns: Shell command with `pwd` set properly
	:returns: ``string``

	*)
	--# Ensure `pwd` is properly quoted for shell command
	set pwd to quoted form of (my _pwd())
	--# Declare environmental variable
	--#TODO: remove for final release
	set testing_var to "export AB_BRANCH=devel; "
	--# return shell script where `pwd` is properly set
	return testing_var & "cd " & pwd & "; bash " & _cmd
end _prepare_cmd

on _check_icon(_icon)
	(* Check if `_icon` exists, and if not revert to system download icon.

	:returns: POSIX path to `_icon`
	:rtype: ``string`` (POSIX path)

	*)
	try
		POSIX file _icon as alias
		return _icon
	on error
		return "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/SidebarDownloadsFolder.icns"
	end try
end _check_icon

on _check_dir(_folder)
	(* Check if `_folder` exists, and if not create it, including any sub-directories.

	:returns: POSIX path to `_folder`
	:rtype: ``string`` (POSIX path)

	*)
	if not my _folder_exists(_folder) then
		do shell script "mkdir -p " & (quoted form of _folder)
	end if
	return _folder
end _check_dir

on _folder_exists(_folder)
	(* Return ``true`` if `_folder` exists, else ``false``

	:param _folder: Full path to directory
	:type _folder: ``string`` (POSIX path)
	:returns: ``Boolean``

	*)
	if my _path_exists(_folder) then
		tell application "System Events"
			return (class of (disk item _folder) is folder)
		end tell
	end if
	return false
end _folder_exists

on _path_exists(_path)
	(* Return ``true`` if `_path` exists, else ``false``

	:param _path: Any POSIX path (file or folder)
	:type _path: ``string`` (POSIX path)
	:returns: ``Boolean``

	*)
	if _path is missing value or my _is_empty(_path) then return false
	try
		if class of _path is alias then return true
		if _path contains ":" then
			alias _path
			return true
		else if _path contains "/" then
			POSIX file _path as alias
			return true
		else
			return false
		end if
	on error msg
		return false
	end try
end _path_exists

on _is_empty(_obj)
	(* Return ``true`` if `_obj ` is empty, else ``false``

	:param _obj: Any Applescript type
	:type _obj: (optional)
	:returns: ``Boolean``

	*)
	--# Is `_obj ` a ``Boolean``?
	if {true, false} contains _obj then return false
	--# Is `_obj ` a ``missing value``?
	if _obj is missing value then return true
	--# Is `_obj ` a empty string?
	return length of (my _trim(_obj)) is 0
end _is_empty

on _trim(_str)
	(* Remove white space from beginning and end of `_str`

	:param _str: A text string
	:type _str: ``string``
	:returns: trimmed string

	*)
	if class of _str is not text or class of _str is not string or _str is missing value then return _str
	if _str is "" then return _str
	repeat while _str begins with " "
		try
			set _str to items 2 thru -1 of _str as text
		on error msg
			return ""
		end try
	end repeat
	repeat while _str ends with " "
		try
			set _str to items 1 thru -2 of _str as text
		on error
			return ""
		end try
	end repeat
	return _str
end _trim


fix: Markdown App

fix: Markdown App

FasdUAS 1.101.10
k
l  "Finder" ׼		" TJ "Finder" PZY}QY

l
O

k
l
 ǰӦ T/R_SRM^u(
I
.miscactvnullobj
l

?9 ʾ dialog ʾϢ"±" Ĭ䣺"title"L f>y: dialog cy:O`o"XkQeezh" ؋XkQE"title"
l

I
 !
.sysodlogaskrTEXT
 m
""##XkQeezh!$

dtxt
$m
%%&&
title'(
'l)*)2, ıֵ postTitle ΪⲢ*++8 \Qeveg,KP<~ postTitle O\N:h^vV(,
,r-.
-c/0
/n12
11

ttxt
21

rslt
0m

ctxt
.o0	posttitle	postTitle
m33MACSalistMacintosh HDH+߽B
Finder.appSH	 CoreServicesHA߽B߽A߽@6Macintosh HD:System:Library:CoreServices:Finder.app
Finder.appMacintosh HD&System/Library/CoreServices/Finder.app/45
4l676  "Terminal" ׼788& TJ "Terminal" PZY}QY59:
9l;
;O<=
<k>>?@
?I$A
.coredoscnullctxt
Am BBCC@DE
Dl%%FGF
 ǰӦGHH T/R_SRM^u(EIJ
II%*
.miscactvnullobj JKL
Kl++MNM жϵǰǷдڴNOO R$e_SRMf/T&g	zSbS_LPQ
PZ+SRST
R=+4UV
Ul+2W
WI+2X
.corecnte********
X2+.

cwin
Vm23
Sk7KYYZ[
Zl77\]\.( ûеĻ "System Events" ׼]^^: lg	vTJ "System Events" PZY}QY[_
_O7K`a
`k;Jbbcd
cl;;efe(" ģⰴ Command + N ½һfgg0 j!bc	. Command + N e^NN*zSdh
hI;Jij
.prcskprsnullctxt
im;>kkllnjm

faal
mJAFnno
omAD
eMdsKcmd
am78ppsevsalisMacintosh HDH+߽BSystem Events.app⺯Ó	 CoreServices#(߽B߽A߽@=Macintosh HD:System:Library:CoreServices:System Events.app$System Events.appMacintosh HD-System/Library/CoreServices/System Events.app/
TINS
.miscactvnullobj Qqr
qlTTsts3- õһΪҪִвĴtuu. fRn{,NN*zSO\N:cNgebgLdO\vzSrvw
vrT^xy
x4TZz

cwin
zvVY{{|
|mVW
yo0winw}~
}l__ õǰ Tab n_SRMv Tab~
r_j
n_f
1bf

tcnt
o_b0win
o0
currenttab
currentTab
lkkF@ ڵǰ Tab ִиıĿ¼Ĳ޸ĵԼ Hexo ·L W(_SRM Tab N-bgLe9Sv_UvdO\Oe9R0]v Hexo b@W(_
lkk
lkk+%  postTitle еĿո滻 "-" 6 \ postTitle SؑN-vzzh<fcbb "-"
rk
Jkw
nkr
1nr

txdl
1kn

ascr
mru
J
o0tid
n
1

txdl
1

ascr
r
n
2

citm
o0	posttitle	postTitle
o0temp
r
m-
n
1

txdl
1

ascr
r
c
o0temp
m

ctxt
o0	posttitle	postTitle
r
o0tid
n
1

txdl
1

ascr
l
I
.coredoscnullctxt
mcd ~/hexo

kfil
o0
currenttab
currentTab
l71 ִдµĲ֮ǰıΪ2 bgLR^eezvdO\O QeNKRMQevhO\N:Sep
I
.coredoscnullctxt
b
mhexo new
o0	posttitle	postTitle

kfil
o0
currenttab
currentTab
l	 ӳһ
 ^Ny
I
.sysodelanullnmbr
m
l,&  MacDown 򿪶Ӧ· md ļ4 nu( MacDown bS_[^_v md eN
I
.coredoscnullctxt
b
b
m:open -a Typora source/_posts/
o0	posttitle	postTitle
m.md

kfil
o0
currenttab
currentTab
=m@alislMacintosh HDH+iDTerminal.app+	 	Utilities+=iD߽a2Macintosh HD:Applications:Utilities:Terminal.appTerminal.appMacintosh HD#Applications/Utilities/Terminal.app/:
l
.aevtoappnull****
.aevtoappnull****
k
9&3"%Bpk~}|{zyxwvutsr
.miscactvnullobj

dtxt
.sysodlogaskrTEXT

rslt

ttxt

ctxt0	posttitle	postTitle
.coredoscnullctxt

cwin
.corecnte********

faal
eMdsKcmd
~.prcskprsnullctxt}0win
|
tcnt{0
currenttab
currentTab
z
ascr
y
txdl
x
cobjw0tid
v
citmu0temp
t
kfils
r.sysodelanullnmbr*jOlO,&EUOjO*jO*-jjaaakvlUY*jO*jk
/E`O_a,E`O_a,alvE[ak/E`Z[al/_a,FZOa-E`Oa_a,FO_&EO__a,FOaa _lOa!%a _lOa"j#Oa$%a%%a _lUascr
ޭ

FasdUAS 1.101.10
k
l  "Finder" ׼		" TJ "Finder" PZY}QY

l
O

k
l
 ǰӦ T/R_SRM^u(
I
.miscactvnullobj
l

?9 ʾ dialog ʾϢ"±" Ĭ䣺"title"L f>y: dialog cy:O`o"XkQeezh" ؋XkQE"title"
l

I
 !
.sysodlogaskrTEXT
 m
""##XkQeezh!$

dtxt
$m
%%&&
title'(
'l)*)2, ıֵ postTitle ΪⲢ*++8 \Qeveg,KP<~ postTitle O\N:h^vV(,
,r-.
-c/0
/n12
11

ttxt
21

rslt
0m

ctxt
.o0	posttitle	postTitle
m33MACSalistMacintosh HDH+:
Finder.appP\w	 CoreServiceso:986Macintosh HD:System:Library:CoreServices:Finder.app
Finder.appMacintosh HD&System/Library/CoreServices/Finder.app/45
4l676  "Terminal" ׼788& TJ "Terminal" PZY}QY59:
9l;
;O<=
<k>>?@
?I$A
.coredoscnullctxt
Am BBCC@DE
Dl%%FGF
 ǰӦGHH T/R_SRM^u(EIJ
II%*
.miscactvnullobj JKL
Kl++MNM жϵǰǷдڴNOO R$e_SRMf/T&g	zSbS_LPQ
PZ+SRST
R=+4UV
Ul+2W
WI+2X
.corecnte********
X2+.

cwin
Vm23
Sk7KYYZ[
Zl77\]\.( ûеĻ "System Events" ׼]^^: lg	vTJ "System Events" PZY}QY[_
_O7K`a
`k;Jbbcd
cl;;efe(" ģⰴ Command + N ½һfgg0 j!bc	. Command + N e^NN*zSdh
hI;Jij
.prcskprsnullctxt
im;>kkllnjm

faal
mJAFnno
omAD
eMdsKcmd
am78ppsevsalisMacintosh HDH+:System Events.app/M	 CoreServices:98=Macintosh HD:System:Library:CoreServices:System Events.app$System Events.appMacintosh HD-System/Library/CoreServices/System Events.app/
TINS
.miscactvnullobj Qqr
qlTTsts3- õһΪҪִвĴtuu. fRn{,NN*zSO\N:cNgebgLdO\vzSrvw
vrT^xy
x4TZz

cwin
zvVY{{|
|mVW
yo0winw}~
}l__ õǰ Tab n_SRMv Tab~
r_j
n_f
1bf

tcnt
o_b0win
o0
currenttab
currentTab
lkkF@ ڵǰ Tab ִиıĿ¼Ĳ޸ĵԼ Hexo ·L W(_SRM Tab N-bgLe9Sv_UvdO\Oe9R0]v Hexo b@W(_
lkk
lkk+%  postTitle еĿո滻 "-" 6 \ postTitle SؑN-vzzh<fcbb "-"
rk
Jkw
nkr
1nr

txdl
1kn

ascr
mru
J
o0tid
n
1

txdl
1

ascr
r
n
2

citm
o0	posttitle	postTitle
o0temp
r
m-
n
1

txdl
1

ascr
r
c
o0temp
m

ctxt
o0	posttitle	postTitle
r
o0tid
n
1

txdl
1

ascr
l
I
.coredoscnullctxt
mcd ~/hexo

kfil
o0
currenttab
currentTab
l71 ִдµĲ֮ǰıΪ2 bgLR^eezvdO\O QeNKRMQevhO\N:Sep
I
.coredoscnullctxt
b
mhexo new
o0	posttitle	postTitle

kfil
o0
currenttab
currentTab
l	 ӳһ
 ^Ny
I
.sysodelanullnmbr
m
l,&  MacDown 򿪶Ӧ· md ļ4 nu( MacDown bS_[^_v md eN
I
.coredoscnullctxt
b
b
m<open -a MacDown source/_posts/
o0	posttitle	postTitle
m.md

kfil
o0
currenttab
currentTab
=m@alislMacintosh HDH+XTerminal.app]PS	 	UtilitiesPXZ2Macintosh HD:Applications:Utilities:Terminal.appTerminal.appMacintosh HD#Applications/Utilities/Terminal.app/:
l
.aevtoappnull****
.aevtoappnull****
k
9&3"%Bpk~}|{zyxwvutsr
.miscactvnullobj

dtxt
.sysodlogaskrTEXT

rslt

ttxt

ctxt0	posttitle	postTitle
.coredoscnullctxt

cwin
.corecnte********

faal
eMdsKcmd
~.prcskprsnullctxt}0win
|
tcnt{0
currenttab
currentTab
z
ascr
y
txdl
x
cobjw0tid
v
citmu0temp
t
kfils
r.sysodelanullnmbr*jOlO,&EUOjO*jO*-jjaaakvlUY*jO*jk
/E`O_a,E`O_a,alvE[ak/E`Z[al/_a,FZOa-E`Oa_a,FO_&EO__a,FOaa _lOa!%a _lOa"j#Oa$%a%%a _lUascr
ޭ


Add comment

Add comment

#!/usr/bin/osascript

-- awake time in next morning
set awakeTime to date "8:00:00"

-- calculate and notify remaining time
set {hours: remainHours, minutes: remainMinutes} to (date "0:0") + (awakeTime - (current date))

set messageTitle to "Remaining " & remainHours & " hours " & remainMinutes & " minutes"
set messageDescription to "now " & time string of (current date)

display notification messageDescription with title messageTitle

#!/usr/bin/osascript

set awakeTime to date "8:00:00"

set {hours: remainHours, minutes: remainMinutes} to (date "0:0") + (awakeTime - (current date))
set messageTitle to "Remaining " & remainHours & " hours " & remainMinutes & " minutes"
set messageDescription to "now " & time string of (current date)

display notification messageDescription with title messageTitle


windowWaitUntil 1.3 - make the whichWindow "any" actually work for partial matches

-- windowWaitUntil(windowName:"", windowNameTest:"", whichWindow:"", waitCycleDelaySeconds:"", waitCycleMax:"")
-- Daniel A. Shockley, NYHTC
-- keep checking until the frontmost window matches specified criteria.

(*
HISTORY:
	1.3 - 2016-10-20 ( dshockley ): if using "any", then need to do the name tests in a loop for each window.
	1.2 - 2015-09-30 ( eshagdar ): added 'is not test'.
	1.1 - 2014-xx-xx ( dshockley ): added 'is' as synonymous with 'equals'.
	1.0 - 2014-xx-xx ( dshockley ): created.
*)

on run
	delay 1
	windowWaitUntil({whichWindow:"any", windowNameTest:"contains", windowName:"Authenticate"})
end run

--------------------
-- START OF CODE
--------------------

on windowWaitUntil(prefs)
	-- version 1.3, Daniel A. Shockley

	set defaultPrefs to {windowName:null, windowNameTest:"contains", whichWindow:"any", waitCycleDelaySeconds:0.5, waitCycleMax:20}
	set prefs to prefs & defaultPrefs

	set windowName to windowName of prefs
	set windowNameTest to windowNameTest of prefs
	set whichWindow to whichWindow of prefs

	set checkResult to false

	repeat waitCycleMax of prefs times
		tell application "System Events"
			if whichWindow is "any" then
				set windowNameList to name of every window of application process "FileMaker Pro Advanced"
			else if whichWindow is "front" then
				set frontWindowName to name of window 1 of application process "FileMaker Pro Advanced"
				set windowNameList to {frontWindowName} -- we are only checking ONE window, but need a list (of one item) for below.
			else -- whichWindow  is window index number:
				set windowIndex to whichWindow as number
				set chosenWindowName to name of window windowIndex of application process "FileMaker Pro Advanced"
				set windowNameList to {chosenWindowName} -- we are only checking ONE window, but need a list (of one item) for below.
			end if
		end tell

		repeat with oneWindowName in windowNameList
			-- BEGIN: loop over one (or more) windows.
			set oneWindowName to contents of oneWindowName

			if windowNameTest is "contains" then
				set checkResult to (oneWindowName contains windowName)

			else if windowNameTest is "does not contain" then
				set checkResult to (oneWindowName does not contain windowName)

			else if windowNameTest is "equals" then
				set checkResult to (oneWindowName is equal to windowName)

			else if windowNameTest is "is" then
				set checkResult to (oneWindowName is equal to windowName)

			else if windowNameTest is "starts with" then
				set checkResult to (oneWindowName starts with windowName)

			else if windowNameTest is "does not start with" then
				set checkResult to (oneWindowName does not start with windowName)

			else if windowNameTest is "ends with" then
				set checkResult to (oneWindowName ends with windowName)

			else if windowNameTest is "does not end with" then
				set checkResult to (oneWindowName does not end with windowName)

			else if windowNameTest is "is not" then
				set checkResult to (oneWindowName is not windowName)

			end if

			if checkResult then exit repeat

			-- END OF: loop over one (or more) windows.
		end repeat

		if checkResult then exit repeat

		delay waitCycleDelaySeconds of prefs

		-- END OF: waiting loop.
	end repeat

	return checkResult

end windowWaitUntil

--------------------
-- END OF CODE
--------------------

-- windowWaitUntil(windowName:"", windowNameTest:"", whichWindow:"", waitCycleDelaySeconds:"", waitCycleMax:"")
-- Daniel A. Shockely, NYHTC
-- keep checking until the frontmost window matches specified criteria.

(*
HISTORY:
	1.2 - 2015-09-30 ( eshagdar ): added 'is not test'
	1.1 - added 'is' as synonymous with 'equals'
	1.0 - created
*)

on run
	windowWaitUntil({windowName:"Times Square"})
end run

--------------------
-- START OF CODE
--------------------

on windowWaitUntil(prefs)
	-- version 1.2

	set defaultPrefs to {windowName:null, windowNameTest:"contains", whichWindow:"any", waitCycleDelaySeconds:0.5, waitCycleMax:20}
	set prefs to prefs & defaultPrefs

	set windowName to windowName of prefs
	set windowNameTest to windowNameTest of prefs
	set whichWindow to whichWindow of prefs

	set checkResult to false

	repeat waitCycleMax of prefs times
		tell application "System Events"
			if whichWindow is "any" then
				set windowNameCheck to name of every window of application process "FileMaker Pro Advanced"
			else if whichWindow is "front" then
				set windowNameCheck to name of window 1 of application process "FileMaker Pro Advanced"
			else -- whichWindow  is window index number:
				set windowIndex to whichWindow as number
				set windowNameCheck to name of window windowIndex of application process "FileMaker Pro Advanced"
			end if
		end tell

		if windowNameTest is "contains" then
			set checkResult to (windowNameCheck contains windowName)

		else if windowNameTest is "does not contain" then
			set checkResult to (windowNameCheck does not contain windowName)

		else if windowNameTest is "equals" then
			set checkResult to (windowNameCheck is equal to windowName)

		else if windowNameTest is "is" then
			set checkResult to (windowNameCheck is equal to windowName)

		else if windowNameTest is "starts with" then
			set checkResult to (windowNameCheck starts with windowName)

		else if windowNameTest is "does not start with" then
			set checkResult to (windowNameCheck does not start with windowName)

		else if windowNameTest is "ends with" then
			set checkResult to (windowNameCheck ends with windowName)

		else if windowNameTest is "does not end with" then
			set checkResult to (windowNameCheck does not end with windowName)
		else if windowNameTest is "is not" then
			set checkResult to (windowNameCheck is not windowName)

		end if

		if checkResult then exit repeat

		delay waitCycleDelaySeconds of prefs

	end repeat

	return checkResult

end windowWaitUntil

--------------------
-- END OF CODE
--------------------


Updated drop box script to work also without existing pref file

FasdUAS 1.101.10
k
i
I

.facofgetnullalis
	o0dropboxDropBox

flst
o0droppedfilesDroppedFiles
k

l
lTNset scriptPath to (path to Folder Action scripts as Unicode text) & "tmp.scpt"set scriptPath to (path to Folder Action scripts as Unicode text) & "tmp.scpt"
l
l)# Get the comment from Punakea prefsF Get the comment from Punakea prefs
O
k~ !
 Q."#
"k%$$%&
%r'(
'c)*
)l+
+b,-
,l.
.c/0
/l1
1I23
.earsffdralis afdr
21

dlib34

from
41

fldu
0m

TEXT
-m5566NPreferences:eu.nudgenudge.punakea.plist
*m

alis
(o0	plistfile	pListFile&7
7r%89
8n#:;
:1!#

pcnt
;4!<

plif
<l =
=c >?
>o0	plistfile	pListFile
?m

utxt
9o0plistpList
#R
.ascrerr ********!@A
@l//ABC
Br/2DE
Dm/0FFGG ###begin_tags###
Eo0
thecomment
theCommentCHI
Hl33IJK
JQ3vLMN
Lk6gOOPQ
Pr6@RS
Rn6>TU
T1:>

valL
Un6:VW
V47:X

plii
Xm89YYZZ0ManageFiles.DropBox.Tags
Wo670plistpList
So0tagsQ[\
[lAA\]
]XAg^_
^rUb`a
`bU`bc
bbU\de
dbUZfg
foUV0
thecomment
theComment
gmVYhhii@
eoZ[0tag
cm\_jjkk;
ao0
thecomment
theComment0tag
_oDE0tags
MR
.ascrerr ********
Nrovlm
lbotno
noop0
thecomment
theComment
ompsppqq@untagged;
mo0
thecomment
theCommentKrs
rlwwst
trw~uv
ubw|wx
wowx0
thecomment
theComment
xmx{yyzz###end_tags###
vo0
thecomment
theComment
m{{sevsalistMacÒH+System Events.appc	 CoreServicesÒCQP1Mac:System:Library:CoreServices:System Events.app$System Events.appMac-System/Library/CoreServices/System Events.app/|}
|l}~
~l% Write comment on dropped files> Write comment on dropped files
X
k
r
c
o0afileaFile
m

TEXT
o0f
l
Q
k
l& tell application "System Events"@tell application "System Events"
l60	attach action to folder f using file scriptPath`	attach action to folder f using file scriptPath
lend tellend tell
l
O
r
o0
thecomment
theComment
n
1

comt
4

alis
o0f
mMACSalisVMacÒH+
Finder.appsZ߄	 CoreServicesÒZtQP*Mac:System:Library:CoreServices:Finder.app
Finder.appMac&System/Library/CoreServices/Finder.app/
R
.ascrerr ********
l0afileaFile
o0droppedfilesDroppedFiles
l
.facofgetnullalis
.facofgetnullalis0dropboxDropBox

flst0droppedfilesDroppedFiles	0dropboxDropBox0droppedfilesDroppedFiles0	plistfile	pListFile0plistpList0
thecomment
theComment0tags0tag0afileaFile0f{~5}|{zyxFwYvutshjpyr

dlib

from

fldu
.earsffdralis afdr
~
TEXT
}
alis
|
plif
{
utxt
z
pcntyx
w
plii
v
valL
u
kocl
t
cobj
s.corecnte********
r
comt|#*,*,l&%&EO*&/,EWXhOEO6/a,EO%[aalkha%%a%E[OYWXa%EOa%EUO=[aalkh&EOa*/a,FUWXhOP[OYascrޭ

FasdUAS 1.101.10
k
i
I

.facofgetnullalis
	o0dropboxDropBox

flst
o0droppedfilesDroppedFiles
k

l
lTNset scriptPath to (path to Folder Action scripts as Unicode text) & "tmp.scpt"set scriptPath to (path to Folder Action scripts as Unicode text) & "tmp.scpt"
l
l)# Get the comment from Punakea prefsF Get the comment from Punakea prefs
Oo
kn !
 r"#
"c$%
$l&
&b'(
'l)
)c*+
*l,
,I-.
.earsffdralis afdr
-1

dlib./

from
/1

fldu
+m

TEXT
(m0011NPreferences:eu.nudgenudge.punakea.plist
%m

alis
#o0	plistfile	pListFile!23
2r"45
4n 67
61

pcnt
748

plif
8l9
9c:;
:o0	plistfile	pListFile
;m

utxt
5o0plistpList3<=
<l##=>?
>r#&@A
@m#$BBCC ###begin_tags###
Ao0
thecomment
theComment?DE
Dl''EFG
FQ'fHIJ
Hk*WKKLM
Lr*2NO
Nn*0PQ
P1.0

valL
Qn*.RS
R4+.T

plii
Tm,-UUVV0ManageFiles.DropBox.Tags
So*+0plistpList
Oo0tagsMWX
Wl33XY
YX3WZ[
ZrER\]
\bEP^_
^bEL`a
`bEJbc
boEF0
thecomment
theComment
cmFIddee@
aoJK0tag
_mLOffgg;
]o0
thecomment
theComment0tag
[o670tags
IR
.ascrerr ********
Jr_fhi
hb_djk
jo_`0
thecomment
theComment
km`cllmm@untagged;
io0
thecomment
theCommentGno
nlggop
prgnqr
qbglst
sogh0
thecomment
theComment
tmhkuuvv###end_tags###
ro0
thecomment
theComment
mwwsevsalistMacÒH+System Events.appc	 CoreServicesÒCQP1Mac:System:Library:CoreServices:System Events.app$System Events.appMac-System/Library/CoreServices/System Events.app/xy
xlppyz{
zlpp|}|% Write comment on dropped files}~~> Write comment on dropped files{
Xp
k
r
c
o0afileaFile
m

TEXT
o0f
l
Q
k
l& tell application "System Events"@tell application "System Events"
l60	attach action to folder f using file scriptPath`	attach action to folder f using file scriptPath
lend tellend tell
l
O
r
o0
thecomment
theComment
n
1

comt
4

alis
o0f
mMACSalisVMacÒH+
Finder.appsZ߄	 CoreServicesÒZtQP*Mac:System:Library:CoreServices:Finder.app
Finder.appMac&System/Library/CoreServices/Finder.app/
R
.ascrerr ********
l0afileaFile
ost0droppedfilesDroppedFiles
l
.facofgetnullalis
.facofgetnullalis0dropboxDropBox

flst0droppedfilesDroppedFiles	0dropboxDropBox0droppedfilesDroppedFiles0	plistfile	pListFile0plistpList0
thecomment
theComment0tags0tag0afileaFile0fw0B~U}|{zdfyxluw

dlib

from

fldu
.earsffdralis afdr

TEXT

alis

plif

utxt

pcnt
~
plii
}
valL
|
kocl
{
cobj
z.corecnte********yx
w
comtl*,*,l&%&EO*&/,EOEO2/,EO#[alkha%%a%E[OYWXa%EOa%EUO;[alkh&EOa*/a,FUWXhOP[OYascr
ޭ


paste in license

paste in license

property pTitle : "OmniFocus: Quick Stats"
property pVersion : "2.07"

property pstrDBPath : "$HOME/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2"
property pstrMinOSX : "10.6"

property pTimeOut : 20

-- Original version: https://github.com/RobTrew/tree-tools/blob/master/OmniFocus%20scripts/Statistics/QuickStats.applescript

-- Copyright  2012, 2013, 2014 Robin Trew
--
-- Permission is hereby granted, free of charge,
-- to any person obtaining a copy of this software
-- and associated documentation files (the "Software"),
-- to deal in the Software without restriction,
-- including without limitation the rights to use, copy,
-- modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons
-- to whom the Software is furnished to do so,
-- subject to the following conditions:
--
-- *******
-- The above copyright notice and this permission notice
-- shall be included in ALL copies
-- or substantial portions of the Software.
-- *******
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
-- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-- Ver 0.8 adds clipboard option to dialogue
-- Ver 0.9 gives an error message if the cache schema has changed, leading to an SQL error in the script
-- Ver 1.0 slight simplification of the code
-- Ver 1.1 added count of Pending projects
-- Ver 1.2 added a count of available actions
-- Ver 1.3 added a break-down of unavailable actions
-- Ver 1.4 added count of Current projects to complement Pending projects
-- ver 1.5 replaced Applescript time function with SQL time expression
-- Ver 1.7 Reorganizes menu, and attempts to enable access for .macappstore installations of OF
--Ver 1.8 Adjusts handling of variant bundle identifiers generally
-- Ver 2.00 Redraft of task breakdown, with progressive narrowing of criteria ...

property pToClipboard : "Copy list to clipboard"

if not FileExists(pstrDBPath) then set pstrDBPath to GetCachePath()

tell application "Finder"
	if (version < pstrMinOSX) then
		display dialog "This script requires OSX " & pstrMinOSX & " or higher" buttons {"OK"} default button 1 with title pTitle & "Ver. " & pVersion
		return
	end if
end tell

if pstrDBPath  "" then
	set strCmd to "sqlite3 -separator ': ' \"" & pstrDBPath & "\" " & quoted form of ("
	select \"INBOX GROUPS & ACTIONS\", count(*) from task where (inInbox=1);
	select \"    Inbox action groups\", count(*) from task where (inInbox=1) and (childrenCount>0);
	select \"    Inbox actions\", count(*) from task where (inInbox=1) and (childrenCount=0);
	select null;
	select \"FOLDERS\"	, count(*) from folder;
	select \"    Active folders\", count(*) from folder where effectiveActive=1;
	select \"    Dropped folders\", count(*) from folder where effectiveActive=0;
	select null;
	select \"PROJECTS\", count(*) from projectInfo where containsSingletonActions=0;
	select \"    Active projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"active\");
	select \"            Current projects\", count(*) from projectInfo p join task t on t.projectinfo=p.pk where (p.containsSingletonActions=0) and (p.folderEffectiveActive=1) and (p.status=\"active\") and (t.dateToStart is null or t.dateToStart < (strftime('%s','now') - strftime('%s','2001-01-01')));
	select \"            Pending projects\", count(*) from projectInfo p join task t on t.projectinfo=p.pk where (p.containsSingletonActions=0) and (p.folderEffectiveActive=1) and (p.status=\"active\") and (t.dateToStart > (strftime('%s','now') - strftime('%s','2001-01-01')));
	select \"    On-hold projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"inactive\");
	select \"    Completed projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"done\");
	select \"    Dropped projects\", count(*) from projectInfo where (containsSingletonActions=0) and (( status=\"dropped\") or (folderEffectiveActive=0));
	select null;
	select \"SINGLE ACTION LISTS\", count(*) from projectInfo where containsSingletonActions=1;
	select \"    Active single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"active\");
	select \"    On-hold single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"inactive\");
	select \"    Completed single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"done\");
	select \"    Dropped single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (( status=\"dropped\") or (folderEffectiveActive=0));
	select null;
	select \"CONTEXTS\", count(*) from context;
	select \"    Active contexts\", count(*) from context where (effectiveActive=1) and (allowsNextAction=1);
	select \"    On-hold contexts\", count(*) from context where (effectiveActive=1) and allowsNextAction=0;
	select \"    Dropped contexts\", count(*) from context where effectiveActive=0;
	select null;
	select \"ACTION GROUPS\", count(*) from task where (projectinfo is null) and (childrenCount>0);
	select \"    Remaining action groups\", count(*) from task where (projectinfo is null) and (dateCompleted is null) and (childrenCount>0);
	select \"    Completed action groups\", count(dateCompleted) from task where (projectinfo is null) and (childrenCount>0);
	select null;
	select \"ACTIONS\", count(*) from task where (projectinfo is null) and (childrenCount=0);
	select \"    Completed actions\", count(dateCompleted) from task where (projectinfo is null) and (childrenCount=0);
	select \"    Dropped project actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp where (projectinfo is null) and (childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is not null and (tp.status=\"dropped\" or tp.folderEffectiveActive=0));
	select \"    Dropped context actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and c.effectiveActive= 0;
	select \"    Remaining actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1);
	select \"        Actions in Projects on hold\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is not null and tp.status=\"inactive\");
	select \"        Actions in Contexts on hold\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is not null and c.allowsNextAction=0);
	select \"        Blocked actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1;
	select \"        	Blocked by future start date\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1
				and tp.blockedByFutureStartDate=1;
	select \"        	Sequentially blocked\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1
				and tp.blockedByFutureStartDate=0;
	select \"        Available actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=0;

	")

	-- 		try
	set strList to do shell script strCmd
	-- 		on error
	-- 			display dialog "The SQL schema for the OmniFocus cache may have changed in a recent update of OF." & return & return &
	-- 				"Look on the OmniFocus user forums for an updated version of this script." buttons {"OK"} with title pTitle & "Ver. " & pVersion
	-- 			return
	-- 		end try
	tell application id "sevs"
		activate
		if button returned of (display dialog strList buttons {pToClipboard, "OK"} default button "OK" giving up after pTimeOut with title pTitle & " Ver. " & pVersion)
			is pToClipboard then tell application id "com.apple.finder" to set the clipboard to strList
	end tell
else
	tell application id "sevs"
		activate
		display dialog "OmniFocus cache not found ..." buttons {"OK"} default button 1 with title pTitle & " Ver. " & pVersion
	end tell
end if

on FileExists(strPath)
	(do shell script "test -e " & strPath & " ; echo $?") = "0"
end FileExists

on GetCachePath()
	try
		tell application "Finder" to tell (application file id "OFOC") to "$HOME/Library/Caches/" & its id & "/OmniFocusDatabase2"
	on error
		error "OmniFocus not installed ..."
	end try
end GetCachePath

property pTitle : "OmniFocus: Quick Stats"
property pVersion : "2.07"

property pstrDBPath : "$HOME/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2"
property pstrMinOSX : "10.6"

property pTimeOut : 20

-- Ver 0.8 adds clipboard option to dialogue
-- Ver 0.9 gives an error message if the cache schema has changed, leading to an SQL error in the script
-- Ver 1.0 slight simplification of the code
-- Ver 1.1 added count of Pending projects
-- Ver 1.2 added a count of available actions
-- Ver 1.3 added a break-down of unavailable actions
-- Ver 1.4 added count of Current projects to complement Pending projects
-- ver 1.5 replaced Applescript time function with SQL time expression
-- Ver 1.7 Reorganizes menu, and attempts to enable access for .macappstore installations of OF
--Ver 1.8 Adjusts handling of variant bundle identifiers generally
-- Ver 2.00 Redraft of task breakdown, with progressive narrowing of criteria ...

property pToClipboard : "Copy list to clipboard"

if not FileExists(pstrDBPath) then set pstrDBPath to GetCachePath()

tell application "Finder"
	if (version < pstrMinOSX) then
		display dialog "This script requires OSX " & pstrMinOSX & " or higher" buttons {"OK"} default button 1 with title pTitle & "Ver. " & pVersion
		return
	end if
end tell

if pstrDBPath  "" then
	set strCmd to "sqlite3 -separator ': ' \"" & pstrDBPath & "\" " & quoted form of ("
	select \"INBOX GROUPS & ACTIONS\", count(*) from task where (inInbox=1);
	select \"    Inbox action groups\", count(*) from task where (inInbox=1) and (childrenCount>0);
	select \"    Inbox actions\", count(*) from task where (inInbox=1) and (childrenCount=0);
	select null;
	select \"FOLDERS\"	, count(*) from folder;
	select \"    Active folders\", count(*) from folder where effectiveActive=1;
	select \"    Dropped folders\", count(*) from folder where effectiveActive=0;
	select null;
	select \"PROJECTS\", count(*) from projectInfo where containsSingletonActions=0;
	select \"    Active projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"active\");
	select \"            Current projects\", count(*) from projectInfo p join task t on t.projectinfo=p.pk where (p.containsSingletonActions=0) and (p.folderEffectiveActive=1) and (p.status=\"active\") and (t.dateToStart is null or t.dateToStart < (strftime('%s','now') - strftime('%s','2001-01-01')));
	select \"            Pending projects\", count(*) from projectInfo p join task t on t.projectinfo=p.pk where (p.containsSingletonActions=0) and (p.folderEffectiveActive=1) and (p.status=\"active\") and (t.dateToStart > (strftime('%s','now') - strftime('%s','2001-01-01')));
	select \"    On-hold projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"inactive\");
	select \"    Completed projects\", count(*) from projectInfo where (containsSingletonActions=0) and (status=\"done\");
	select \"    Dropped projects\", count(*) from projectInfo where (containsSingletonActions=0) and (( status=\"dropped\") or (folderEffectiveActive=0));
	select null;
	select \"SINGLE ACTION LISTS\", count(*) from projectInfo where containsSingletonActions=1;
	select \"    Active single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"active\");
	select \"    On-hold single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"inactive\");
	select \"    Completed single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (status=\"done\");
	select \"    Dropped single action lists\", count(*) from projectInfo where (containsSingletonActions=1) and (( status=\"dropped\") or (folderEffectiveActive=0));
	select null;
	select \"CONTEXTS\", count(*) from context;
	select \"    Active contexts\", count(*) from context where (effectiveActive=1) and (allowsNextAction=1);
	select \"    On-hold contexts\", count(*) from context where (effectiveActive=1) and allowsNextAction=0;
	select \"    Dropped contexts\", count(*) from context where effectiveActive=0;
	select null;
	select \"ACTION GROUPS\", count(*) from task where (projectinfo is null) and (childrenCount>0);
	select \"    Remaining action groups\", count(*) from task where (projectinfo is null) and (dateCompleted is null) and (childrenCount>0);
	select \"    Completed action groups\", count(dateCompleted) from task where (projectinfo is null) and (childrenCount>0);
	select null;
	select \"ACTIONS\", count(*) from task where (projectinfo is null) and (childrenCount=0);
	select \"    Completed actions\", count(dateCompleted) from task where (projectinfo is null) and (childrenCount=0);
	select \"    Dropped project actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp where (projectinfo is null) and (childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is not null and (tp.status=\"dropped\" or tp.folderEffectiveActive=0));
	select \"    Dropped context actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and c.effectiveActive= 0;
	select \"    Remaining actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1);
	select \"        Actions in Projects on hold\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is not null and tp.status=\"inactive\");
	select \"        Actions in Contexts on hold\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is not null and c.allowsNextAction=0);
	select \"        Blocked actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1;
	select \"        	Blocked by future start date\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1
				and tp.blockedByFutureStartDate=1;
	select \"        	Sequentially blocked\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=1
				and tp.blockedByFutureStartDate=0;
	select \"        Available actions\", count(*) from (task t left join projectinfo p on t.containingProjectinfo=p.pk) tp left join context c on tp.context=c.persistentIdentifier where (projectinfo is null) and (tp.childrenCount=0)  and (dateCompleted is null)
				and (tp.containingProjectinfo is null or (tp.status !=\"dropped\" and tp.folderEffectiveActive=1))
				and (tp.context is null or c.effectiveActive= 1)
				and (tp.containingProjectInfo is null or tp.status!=\"inactive\")
				and (tp.context is null or c.allowsNextAction=1)
				and tp.blocked=0;

	")

	-- 		try
	set strList to do shell script strCmd
	-- 		on error
	-- 			display dialog "The SQL schema for the OmniFocus cache may have changed in a recent update of OF." & return & return &
	-- 				"Look on the OmniFocus user forums for an updated version of this script." buttons {"OK"} with title pTitle & "Ver. " & pVersion
	-- 			return
	-- 		end try
	tell application id "sevs"
		activate
		if button returned of (display dialog strList buttons {pToClipboard, "OK"} default button "OK" giving up after pTimeOut with title pTitle & " Ver. " & pVersion)
			is pToClipboard then tell application id "com.apple.finder" to set the clipboard to strList
	end tell
else
	tell application id "sevs"
		activate
		display dialog "OmniFocus cache not found ..." buttons {"OK"} default button 1 with title pTitle & " Ver. " & pVersion
	end tell
end if

on FileExists(strPath)
	(do shell script "test -e " & strPath & " ; echo $?") = "0"
end FileExists

on GetCachePath()
	try
		tell application "Finder" to tell (application file id "OFOC") to "$HOME/Library/Caches/" & its id & "/OmniFocusDatabase2"
	on error
		error "OmniFocus not installed ..."
	end try
end GetCachePath