Fixed one problem with the dmg script: The Growl package is now named Growl.pkg, not Growl.mpkg as the script was expecting. This is what was causing the icon positions to not get set.

on run -- for testing in script editor
	process_disk_image("Growl", "/Users/evands/growl/Release/Artwork")
end run

on process_disk_image(volumeName, artPath)
	tell application "Finder"
		tell disk volumeName
			open
			tell container window
				set current view to icon view
				set toolbar visible to false
				set statusbar visible to false
				--set the bounds to {30, 50, 579, 600}
			end tell
			close
			set opts to the icon view options of container window
			tell opts
				set icon size to 64
				set arrangement to not arranged
			end tell
			set background picture of opts to file ".background:growlDMGBackground.png"
			set position of item "Growl.pkg" to {147, 75}
			set position of item "Extras" to {100, 320}
			--set position of item "Scripts" to {36, 153}
			set position of item "Growl Documentation.webloc" to {100, 218}
			set position of item "Growl version history.webloc" to {275, 218}
			set position of item "Get more styles.webloc" to {415, 218}
			set position of item "Uninstall Growl.app" to {415, 320}

			-- Custom icons
			my copyIconOfTo(artPath & "/GrowlIcon", "/Volumes/" & volumeName & "/Growl.mpkg")

			update without registering applications
			tell container window
				open
				set the_window_id to id
			end tell
			update without registering applications
		end tell
		set bounds of window id the_window_id to {30, 50, 575, 450}
		--give the finder some time to write the .DS_Store file
		delay 5
	end tell
end process_disk_image

on copyIconOfTo(aFileOrFolderWithIcon, aFileOrFolder)
	tell application "Finder" to set f to POSIX file aFileOrFolderWithIcon as alias
	-- grab the file's icon
	my CopyOrPaste(f, "c")
	-- now the icon is in the clipboard
	tell application "Finder" to set c to POSIX file aFileOrFolder as alias
	my CopyOrPaste(result, "v")
end copyIconOfTo

on CopyOrPaste(i, cv)
	tell application "Finder"
		activate
		open information window of i
	end tell
	tell application "System Events" to tell process "Finder" to tell window 1
		keystroke tab -- select icon button
		keystroke (cv & "w") using command down (* (copy or paste) + close window *)
	end tell -- window 1 then process Finder then System Events
end CopyOrPaste

on run -- for testing in script editor
	process_disk_image("Growl", "/Users/evands/growl/Release/Artwork")
end run

on process_disk_image(volumeName, artPath)
	tell application "Finder"
		tell disk volumeName
			open
			tell container window
				set current view to icon view
				set toolbar visible to false
				set statusbar visible to false
				--set the bounds to {30, 50, 579, 600}
			end tell
			close
			set opts to the icon view options of container window
			tell opts
				set icon size to 64
				set arrangement to not arranged
			end tell
			set background picture of opts to file ".background:growlDMGBackground.png"
			set position of item "Growl.mpkg" to {147, 75}
			set position of item "Extras" to {100, 320}
			--set position of item "Scripts" to {36, 153}
			set position of item "Growl Documentation.webloc" to {100, 218}
			set position of item "Growl version history.webloc" to {275, 218}
			set position of item "Get more styles.webloc" to {415, 218}
			set position of item "Uninstall Growl.app" to {415, 320}

			-- Custom icons
			my copyIconOfTo(artPath & "/GrowlIcon", "/Volumes/" & volumeName & "/Growl.mpkg")

			update without registering applications
			tell container window
				open
				set the_window_id to id
			end tell
			update without registering applications
		end tell
		set bounds of window id the_window_id to {30, 50, 575, 450}
		--give the finder some time to write the .DS_Store file
		delay 5
	end tell
end process_disk_image

on copyIconOfTo(aFileOrFolderWithIcon, aFileOrFolder)
	tell application "Finder" to set f to POSIX file aFileOrFolderWithIcon as alias
	-- grab the file's icon
	my CopyOrPaste(f, "c")
	-- now the icon is in the clipboard
	tell application "Finder" to set c to POSIX file aFileOrFolder as alias
	my CopyOrPaste(result, "v")
end copyIconOfTo

on CopyOrPaste(i, cv)
	tell application "Finder"
		activate
		open information window of i
	end tell
	tell application "System Events" to tell process "Finder" to tell window 1
		keystroke tab -- select icon button
		keystroke (cv & "w") using command down (* (copy or paste) + close window *)
	end tell -- window 1 then process Finder then System Events
end CopyOrPaste


updated todo for getObjectAndSubs

updated todo for getObjectAndSubs

-- getObjectAndSubs({someObjectRef:null, outputType:"TEXT", maxSubLevel:null, subLevel:0})
-- Daniel A. Shockley & Erik Shagdar, NYHTC
-- Gets detailed UI Scripting info for the specified object, recursively for all sub-objects.

(*
HISTORY:
	1.0 - 2016-10-21 ( dshockley ): first created.

TODO:
	2017-01-12 ( dshockley ): Try to figure out a way to preseve human-friendly class names (without the chevrons)

REQUIRES:
	coerceToString
	quoteString
	repeatString
*)

property helper : ""

on run
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of ((path to me) as string)
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of pathHelper
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of pathHelper
	set pathHelper to POSIX file (pathHelper & "/main.scpt") as string
	set helper to load script file pathHelper

	tell application "System Events"
		tell application process "FileMaker Pro Advanced"
			set frontmost to true
			delay 0.5

			-- WARNING!!! If you pick a high (or no) maxSubLevel, it can take a LONG time for objects with many sub-objects.
			set objectString to my getObjectAndSubs({someObjectRef:window 1, maxSubLevel:4})

			set the clipboard to objectString

			return objectString

		end tell
	end tell

end run

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

on getObjectAndSubs(prefs)
	-- version 1.0

	set defaultPrefs to {someObjectRef:null, outputType:"TEXT", maxSubLevel:null, subLevel:0}
	(*
		Other options:
		  outputType:"TEXT", "Record"
	*)

	set prefs to prefs & defaultPrefs

	set someObjectRef to someObjectRef of prefs
	set outputType to outputType of prefs
	set maxSubLevel to maxSubLevel of prefs
	set subLevel to subLevel of prefs

	set indentString to my repeatString({someString:tab, repeatCount:subLevel})
	set subIndentString to my repeatString({someString:tab, repeatCount:subLevel + 1})

	tell application "System Events"

		set thisObjectInfo to properties of someObjectRef

		try
			set thisObjClass to class of someObjectRef
		end try
		try
			set thisObjectName to name of someObjectRef
		end try

		if maxSubLevel is null then
			set doSub to true
		else if subLevel is greater than or equal to maxSubLevel then
			set doSub to false
		else
			set doSub to true
		end if

		if not doSub then
			set thisSubObjectList to null
		else

			try
				set subObjects to UI elements of someObjectRef

				(*
				if subLevel is 1 then
					tell me to activate
					display dialog my coerceToString(someObjectRef)
					display dialog "subObjects : " & my coerceToString(subObjects)
					display dialog (length of indentString) as string
					error -128
				end if
				*)

				if outputType is "Record" then
					set thisSubObjectList to {}
				else if outputType is "TEXT" then
					if (count of subObjects) is 0 then
						set thisSubObjectList to "{}"
					else
						set subList_START to "{ " & return & subIndentString & ""
						set subList_BeforeEach to return & subIndentString
						set subList_BetweenAdjacent to ", " & return & subIndentString & ""
						set thisSubObjectList to subList_START
						set subObjectsListHasItems to false

					end if
				end if

				if (count of subObjects) is greater than 0 then

					repeat with oneSubObject in subObjects
						set subObjectInfo to my getObjectAndSubs({someObjectRef:oneSubObject, subLevel:subLevel + 1} & prefs)
						if outputType is "Record" then
							copy subObjectInfo to end of thisSubObjectList
						else if outputType is "TEXT" then
							if subObjectsListHasItems then
								set thisSubObjectList to thisSubObjectList & subList_BetweenAdjacent
							else
								set subObjectsListHasItems to true
							end if
							set thisSubObjectList to thisSubObjectList & subList_BeforeEach & subObjectInfo
						end if
					end repeat

					-- had sub-objects, so need to put on ending string:
					if outputType is "TEXT" then
						set thisSubObjectList to thisSubObjectList & "" & return & indentString & "}"
					end if
				end if

			on error errMsg number errNum
				if errNum is -128 then error -128
				-- had no sub-objects, so list will be/remain empty
				if outputType is "TEXT" then set thisSubObjectList to "missing value"
			end try

		end if

		if outputType is "Record" then
			return {objClass:thisObjClass, objName:thisObjectName, objRef:someObjectRef, objInfo:thisObjectInfo, subObjList:thisSubObjectList}
		else if outputType is "TEXT" then

			(*  CANNOT make uppercase until we figure out how to preserve classes without chevrons... 2016-10-21 ( dshockley )
			-- make the class uppercase for legibility:
			set thisObjClass to my coerceToString(thisObjClass)
			set thisObjClass to do shell script "echo " & quoted form of thisObjClass & " | tr [:lower:] [:upper:]"
			*)

			set resultString to ""
			set resultString to resultString &
				"{objClass: " & my coerceToString(thisObjClass) & ", "

			set resultString to resultString & return &
				indentString & "objName: " & my quoteString(thisObjectName) & ", "

			set resultString to resultString & return &
				indentString & "objRef: " & my coerceToString(someObjectRef) & ", "

			set resultString to resultString & return &
				indentString & "objInfo: " & my coerceToString(thisObjectInfo) & ", "

			if thisSubObjectList is null then
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
			else if (count of thisSubObjectList) is 0 then
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
			else
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
				(*
					set resultString to resultString & return &
					indentString & "subObjList: " & return & thisSubObjectList & " "
				*)

			end if

			set resultString to resultString & return & indentString & "}"

			return resultString

		end if

	end tell

end getObjectAndSubs

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

on coerceToString(incomingObject)
	tell helper to coerceToString(incomingObject)
end coerceToString

on quoteString(someString)
	tell helper to quoteString(someString)
end quoteString

on repeatString(prefs)
	tell helper to repeatString(prefs)
end repeatString

-- getObjectAndSubs({someObjectRef:null, outputType:"TEXT", maxSubLevel:null, subLevel:0})
-- Daniel A. Shockley & Erik Shagdar, NYHTC
-- Gets detailed UI Scripting info for the specified object, recursively for all sub-objects.

(*
HISTORY:
	1.0 - 2016-10-21 ( dshockley ): first created.

TODO:
	- improvements or things to fix
	- another improvements or things to fix

REQUIRES:
	coerceToString
	quoteString
	repeatString
*)

property helper : ""

on run
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of ((path to me) as string)
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of pathHelper
	set pathHelper to do shell script "dirname " & quoted form of POSIX path of pathHelper
	set pathHelper to POSIX file (pathHelper & "/main.scpt") as string
	set helper to load script file pathHelper

	tell application "System Events"
		tell application process "FileMaker Pro Advanced"
			set frontmost to true
			delay 0.5

			-- WARNING!!! If you pick a high (or no) maxSubLevel, it can take a LONG time for objects with many sub-objects.
			set objectString to my getObjectAndSubs({someObjectRef:window 1, maxSubLevel:4})

			set the clipboard to objectString

			return objectString

		end tell
	end tell

end run

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

on getObjectAndSubs(prefs)
	-- version 1.0

	set defaultPrefs to {someObjectRef:null, outputType:"TEXT", maxSubLevel:null, subLevel:0}
	(*
		Other options:
		  outputType:"TEXT", "Record"
	*)

	set prefs to prefs & defaultPrefs

	set someObjectRef to someObjectRef of prefs
	set outputType to outputType of prefs
	set maxSubLevel to maxSubLevel of prefs
	set subLevel to subLevel of prefs

	set indentString to my repeatString({someString:tab, repeatCount:subLevel})
	set subIndentString to my repeatString({someString:tab, repeatCount:subLevel + 1})

	tell application "System Events"

		set thisObjectInfo to properties of someObjectRef

		try
			set thisObjClass to class of someObjectRef
		end try
		try
			set thisObjectName to name of someObjectRef
		end try

		if maxSubLevel is null then
			set doSub to true
		else if subLevel is greater than or equal to maxSubLevel then
			set doSub to false
		else
			set doSub to true
		end if

		if not doSub then
			set thisSubObjectList to null
		else

			try
				set subObjects to UI elements of someObjectRef

				(*
				if subLevel is 1 then
					tell me to activate
					display dialog my coerceToString(someObjectRef)
					display dialog "subObjects : " & my coerceToString(subObjects)
					display dialog (length of indentString) as string
					error -128
				end if
*)

				if outputType is "Record" then
					set thisSubObjectList to {}
				else if outputType is "TEXT" then
					if (count of subObjects) is 0 then
						set thisSubObjectList to "{}"
					else
						set subList_START to "{ " & return & subIndentString & ""
						set subList_BeforeEach to return & subIndentString
						set subList_BetweenAdjacent to ", " & return & subIndentString & ""
						set thisSubObjectList to subList_START
						set subObjectsListHasItems to false

					end if
				end if

				if (count of subObjects) is greater than 0 then

					repeat with oneSubObject in subObjects
						set subObjectInfo to my getObjectAndSubs({someObjectRef:oneSubObject, subLevel:subLevel + 1} & prefs)
						if outputType is "Record" then
							copy subObjectInfo to end of thisSubObjectList
						else if outputType is "TEXT" then
							if subObjectsListHasItems then
								set thisSubObjectList to thisSubObjectList & subList_BetweenAdjacent
							else
								set subObjectsListHasItems to true
							end if
							set thisSubObjectList to thisSubObjectList & subList_BeforeEach & subObjectInfo
						end if
					end repeat

					-- had sub-objects, so need to put on ending string:
					if outputType is "TEXT" then
						set thisSubObjectList to thisSubObjectList & "" & return & indentString & "}"
					end if
				end if

			on error errMsg number errNum
				if errNum is -128 then error -128
				-- had no sub-objects, so list will be/remain empty
				if outputType is "TEXT" then set thisSubObjectList to "missing value"
			end try

		end if

		if outputType is "Record" then
			return {objClass:thisObjClass, objName:thisObjectName, objRef:someObjectRef, objInfo:thisObjectInfo, subObjList:thisSubObjectList}
		else if outputType is "TEXT" then

			(*  CANNOT make uppercase until we figure out how to preserve classes without chevrons... 2016-10-21 ( dshockley )
			-- make the class uppercase for legibility:
			set thisObjClass to my coerceToString(thisObjClass)
			set thisObjClass to do shell script "echo " & quoted form of thisObjClass & " | tr [:lower:] [:upper:]"
			*)

			set resultString to ""
			set resultString to resultString &
				"{objClass: " & my coerceToString(thisObjClass) & ", "

			set resultString to resultString & return &
				indentString & "objName: " & my quoteString(thisObjectName) & ", "

			set resultString to resultString & return &
				indentString & "objRef: " & my coerceToString(someObjectRef) & ", "

			set resultString to resultString & return &
				indentString & "objInfo: " & my coerceToString(thisObjectInfo) & ", "

			if thisSubObjectList is null then
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
			else if (count of thisSubObjectList) is 0 then
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
			else
				set resultString to resultString & return &
					indentString & "subObjList: " & thisSubObjectList & " "
				(*
					set resultString to resultString & return &
					indentString & "subObjList: " & return & thisSubObjectList & " "
				*)
			end if

			set resultString to resultString & return & indentString & "}"

			return resultString

		end if

	end tell

end getObjectAndSubs

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

on coerceToString(incomingObject)
	tell helper to coerceToString(incomingObject)
end coerceToString

on quoteString(someString)
	tell helper to quoteString(someString)
end quoteString

on repeatString(prefs)
	tell helper to repeatString(prefs)
end repeatString


remove is_running script file

remove is_running script file

tell application "System Events"
  set ProcessList to name of every process
  return "Spotify" is in ProcessList
end tell


Activate iterm when running specs

Activate iterm when running specs

on run argv
    set command to (item 1 of argv)

    tell application "iTerm2"
      activate

      set _window to (current window)

      if _window is equal to missing value then
        create window with default profile
      end if

      tell current window
        tell current session
          write text command
        end tell
      end tell
    end tell
end run

on run argv
    set command to (item 1 of argv)

    tell application "iTerm2"
      set _window to (current window)

      if _window is equal to missing value then
        create window with default profile
      end if

      tell current window
        tell current session
          write text command
        end tell
      end tell
    end tell
end run


Scripts update

Scripts update

FasdUAS 1.101.10
k
i
I	0resize_app_window

o0app_name

o0win_position

o0win_size
Z=
=
n
1

prun
4

capp
o0app_name
m
boovtrue
O9
O8
k7
r&
J  !
 n"#
"4$

cobj
$m
#o0win_position!%
%n&'
&4(

cobj
(m
'o0win_position
n)*
)1#%

posn
*l #+
+2 #

cwin,
,r'7-.
-J'1//01
0n'+23
24(+4

cobj
4m)*
3o'(0win_size15
5n+/67
64,/8

cobj
8m-.
7o+,0win_size
.n9:
9146

ptsz
:l14;
;214

cwin
4<

prcs
<o0app_name
m==sevsalis\Macintosh HDBDSystem Events.app
 cuCoreServices0/:System:Library:CoreServices:System Events.app/$System Events.appMacintosh HD-System/Library/CoreServices/System Events.app/>?
>l?@A
@lB
BrCD
CJEEFG
FmGH
Hm(
Do0narrow_center_positionAIJ
Il
K
Kr
LM
LJNNOP
Om"PQ
Qm	m
Mo0narrow_center_sizeJRS
RlSTU
TlV
VrWX
WJYYZ[
Zm[\
\m(
Xo0wide_center_positionU]^
]l_
_r`a
`Jbbcd
cmde
emm
ao0wide_center_size^fg
flghi
hl$j
jI$k0resize_app_windowklm
lmnnoo1Passwordmpq
po0narrow_center_positionqr
ro 0narrow_center_sizeist
sl%-u
uI%-v0resize_app_windowvwx
wm&'yyzzApp Storex{|
{o'(0narrow_center_position|}
}o()0narrow_center_sizet~
~l.6
I.60resize_app_window
m/0Calendar
o010narrow_center_position
o120narrow_center_size
l7B
I7B0resize_app_window
m89CARROTweather
o9:0narrow_center_position
J:>
m:;"
m;<
lCP
ICP0resize_app_window
mDGDiscord
oGH0narrow_center_position
JHL
mHI"
mIJ
lQ[
IQ[0resize_app_window
mRUFantastical
oUV0narrow_center_position
oVW0narrow_center_size
l\f
I\f0resize_app_window
m]`Google Chrome
o`a0narrow_center_position
oab0narrow_center_size
lgq
Igq0resize_app_window
mhkMail
okl0narrow_center_position~
olm}}0narrow_center_size~
lr|{
Irzyz0resize_app_window
msvMessages
Jv|
mvyxxw
myzvv(wu
J|
m|tts
mrrsuy|{
lqp
Iono0resize_app_window
m
Music
omm0narrow_center_positionl
okk0narrow_center_sizelnqp
lji
Ihgh0resize_app_window
mNews
off0narrow_center_positione
odd0narrow_center_sizeegji
lcb
Ia`a0resize_app_window
m
Notes
o__0narrow_center_position^
J
m]]"\
m[[\^`cb
lZY
IXWX0resize_app_window
mPhotos
oVV0narrow_center_position
U

oTT0narrow_center_sizeUWZY
l
SR

IQPQ0resize_app_window
mPhotoshop
oOO0narrow_center_positionN
oMM0narrow_center_sizeNPSR
lLK
IJIJ0resize_app_window
mPreview
oHH0narrow_center_position G
 oFF0narrow_center_sizeGILK!"
!l#ED
#IC$BC0resize_app_window$%&
%m''((RadarScope&)*
)oAA0narrow_center_position*+@
+o??0narrow_center_size@BED",-
,l.>=
.I</;<0resize_app_window/01
0m2233Reflect145
4o::0narrow_center_position569
6o880narrow_center_size9;>=-78
7l976
9I5:450resize_app_window:;<
;m==>>Safari<?@
?o330narrow_center_position@A2
Ao110narrow_center_size24768BC
BlD0/
DI.E-.0resize_app_windowEFG
FmHHIISiftieGJK
Jo,,0narrow_center_positionKL+
Lo**0narrow_center_size+-0/CMN
MlO)(
OI'P&'0resize_app_windowPQR
QmSSTT
SlackRUV
Uo%%0narrow_center_positionVW$
WJXXYZ
Ym##"Z["
[m!!"$&)(N\]
\l^
^I_0resize_app_window_`a
`m
bbccTextEditade
dJ
ffgh
gm

hi
im
]ej
jJkklm
lmRmn
nm4 ]op
ol,q
qI,r0resize_app_windowrst
sm #uuvvThingstwx
wo#$0narrow_center_positionxy
yJ$(zz{|
{m$%"|}
}m%&

p~
~l-A
I-A

0resize_app_window
m.1Tweetbot
J17
m14
m45(
J7=
m7:
m:;
lBO
IBO0resize_app_window
mCFzoom.us
oFG0narrow_center_position
JGK
mGH"
mHI
0resize_app_window
.aevtoappnull****0narrow_center_position0narrow_center_size0wide_center_position0wide_center_size0resize_app_window0app_name0win_position0win_size0app_name0win_position0win_size=

capp

prun

prcs

cobj

cwin

posn

ptsz>*/,e3+*/#k/l/lv*-,FOk/l/lv*-,FUUYh
.aevtoappnull****
kO@IT]hs~!,7BM\o~)ny'2=HSbu(0narrow_center_position"m0narrow_center_size0wide_center_position0wide_center_size0resize_app_window]R4PlvEOlvEOlvEOlvEO*m+O*m+O*m+O*lvm+O*alvm+O*am+O*am+O*am+O*aalvalvm+O*am+O*am+O*alvm+O*am+O*am+O*am+O*am+O*am+O*am+O*a m+O*a!lvm+O*a"aa#lva$a%lvm+O*a&lvm+O*a'alvalvm+O*a(lvm+("m(mascr
ޭ

FasdUAS 1.101.10
k
i
I	0resize_app_window

o0app_name

o0win_position

o0win_size
Z=
=
n
1

prun
4

capp
o0app_name
m
boovtrue
O9
O8
k7
r&
J  !
 n"#
"4$

cobj
$m
#o0win_position!%
%n&'
&4(

cobj
(m
'o0win_position
n)*
)1#%

posn
*l #+
+2 #

cwin,
,r'7-.
-J'1//01
0n'+23
24(+4

cobj
4m)*
3o'(0win_size15
5n+/67
64,/8

cobj
8m-.
7o+,0win_size
.n9:
9146

ptsz
:l14;
;214

cwin
4<

prcs
<o0app_name
m==sevsalis\Macintosh HDBDSystem Events.app
 cuCoreServices0/:System:Library:CoreServices:System Events.app/$System Events.appMacintosh HD-System/Library/CoreServices/System Events.app/>?
>l?@A
@lB
BrCD
CJEEFG
FmGH
Hm(
Do0narrow_center_positionAIJ
Il
K
Kr
LM
LJNNOP
Om"PQ
Qm	m
Mo0narrow_center_sizeJRS
RlSTU
TlV
VrWX
WJYYZ[
Zm[\
\m(
Xo0wide_center_positionU]^
]l_
_r`a
`Jbbcd
cmde
emm
ao0wide_center_size^fg
flghi
hl$j
jI$k0resize_app_windowklm
lmnnoo1Password 7mpq
po0narrow_center_positionqr
ro 0narrow_center_sizeist
sl%-u
uI%-v0resize_app_windowvwx
wm&'yyzzApp Storex{|
{o'(0narrow_center_position|}
}o()0narrow_center_sizet~
~l.6
I.60resize_app_window
m/0Calendar
o010narrow_center_position
o120narrow_center_size
l7B
I7B0resize_app_window
m89CARROTweather
o9:0narrow_center_position
J:>
m:;"
m;<
lCP
ICP0resize_app_window
mDGDiscord
oGH0narrow_center_position
JHL
mHI"
mIJ
lQ[
IQ[0resize_app_window
mRUFantastical
oUV0narrow_center_position
oVW0narrow_center_size
l\f
I\f0resize_app_window
m]`Google Chrome
o`a0narrow_center_position
oab0narrow_center_size
lgq
Igq0resize_app_window
mhkMail
okl0narrow_center_position~
olm}}0narrow_center_size~
lr|{
Irzyz0resize_app_window
msvMessages
Jv|
mvyxxw
myzvv(wu
J|
m|tts
mrrsuy|{
lqp
Iono0resize_app_window
m
Music
omm0narrow_center_positionl
okk0narrow_center_sizelnqp
lji
Ihgh0resize_app_window
mNews
off0narrow_center_positione
odd0narrow_center_sizeegji
lcb
Ia`a0resize_app_window
m
Notes
o__0narrow_center_position^
J
m]]"\
m[[\^`cb
lZY
IXWX0resize_app_window
mPhotos
oVV0narrow_center_position
U

oTT0narrow_center_sizeUWZY
l
SR

IQPQ0resize_app_window
mPhotoshop
oOO0narrow_center_positionN
oMM0narrow_center_sizeNPSR
lLK
IJIJ0resize_app_window
mPreview
oHH0narrow_center_position G
 oFF0narrow_center_sizeGILK!"
!l#ED
#IC$BC0resize_app_window$%&
%m''((RadarScope&)*
)oAA0narrow_center_position*+@
+o??0narrow_center_size@BED",-
,l.>=
.I</;<0resize_app_window/01
0m2233Reflect145
4o::0narrow_center_position569
6o880narrow_center_size9;>=-78
7l976
9I5:450resize_app_window:;<
;m==>>Safari<?@
?o330narrow_center_position@A2
Ao110narrow_center_size24768BC
BlD0/
DI.E-.0resize_app_windowEFG
FmHHIISiftieGJK
Jo,,0narrow_center_positionKL+
Lo**0narrow_center_size+-0/CMN
MlO)(
OI'P&'0resize_app_windowPQR
QmSSTT
SlackRUV
Uo%%0narrow_center_positionVW$
WJXXYZ
Ym##"Z["
[m!!"$&)(N\]
\l^
^I_0resize_app_window_`a
`m
bbccTextEditade
dJ
ffgh
gm

hi
im
]ej
jJkklm
lmRmn
nm4 ]op
ol,q
qI,r0resize_app_windowrst
sm #uuvvThingstwx
wo#$0narrow_center_positionxy
yJ$(zz{|
{m$%"|}
}m%&

p~
~l-A
I-A

0resize_app_window
m.1Tweetbot
J17
m14
m45(
J7=
m7:
m:;
lBO
IBO0resize_app_window
mCFzoom.us
oFG0narrow_center_position
JGK
mGH"
mHI
0resize_app_window
.aevtoappnull****0narrow_center_position0narrow_center_size0wide_center_position0wide_center_size0resize_app_window0app_name0win_position0win_size0app_name0win_position0win_size=

capp

prun

prcs

cobj

cwin

posn

ptsz>*/,e3+*/#k/l/lv*-,FOk/l/lv*-,FUUYh
.aevtoappnull****
kO@IT]hs~!,7BM\o~)ny'2=HSbu(0narrow_center_position"m0narrow_center_size0wide_center_position0wide_center_size0resize_app_window]R4PlvEOlvEOlvEOlvEO*m+O*m+O*m+O*lvm+O*alvm+O*am+O*am+O*am+O*aalvalvm+O*am+O*am+O*alvm+O*am+O*am+O*am+O*am+O*am+O*am+O*a m+O*a!lvm+O*a"aa#lva$a%lvm+O*a&lvm+O*a'alvalvm+O*a(lvm+("m(mascr
ޭ


Change startup script to disgard its own changes on startup

FasdUAS 1.101.10
k
l
r
n

1

psxp
l
I
.earsffdralis afdr

f
	o0script_path
l

r

l

I

.sysoexecTEXTTEXT
b

m
dirname
o0script_path
o0project_path
l
r
mtrak.io.js
o0project_name !
 l!"
"l#
#O$%
$k&&'(
'I!
.miscactvnullnull()*
)l""*+,
+l""-.- make a new terminal.//( make a new terminal,01
0r"+23
2l")4
4I")5
.corecrel****null56

kocl
6m$%

Ptrm
3o0
trak_terminal178
7l,,89:
9l,,;<; talk to the new terminal<==2 talk to the new terminal:>?
>O,@A
@k0BBCD
Cl00DEF
EI07G
.ITRMLNCHPssnobj GH

Pssn
Hm23IIJJSmall TextFKL
KO8fMN
Mk@eOOPQ
Pr@KRS
Rb@ETU
Tm@CVVWWServer
UoCD0project_name
S1EJ

pnamQXY
XILYZ
.ITRMWrtenullobj Z[

iTxt
[bPU\]
\mPS^^__cd
]oST0project_pathY`
`IZea
.ITRMWrtenullobj ab

iTxt
bm^accddmake server
N18=

CssnLef
elggfgh
gIgpi
.ITRMLNCHPssnobj ij

Pssn
jmilkkllSmall Texthmn
mOqop
okyqqrs
rrytu
tby~vw
vmy|xxyyGuard
wo|}0project_name
u1~

pnamsz{
zI|
.ITRMWrtenullobj |}

iTxt
}b~
~mcd
o0project_path{
I
.ITRMWrtenullobj

iTxt
m
guard
p1qv

Cssnn
l
I
.ITRMLNCHPssnobj

Pssn
mSmall Text
O
k
r
o0project_name
1

pnam
I
.ITRMWrtenullobj

iTxt
b
mcd
o0project_path
I
.ITRMWrtenullobj

iTxt
mBgit checkout start-iterm-env.scpt
1

Cssn
l
Ao,-0
trak_terminal?
l
%mITRMalisHMacintosh HDH+3	iTerm.app
=F	 ApplicationsF3$Macintosh HD:Applications:iTerm.app	iTerm.appMacintosh HDApplications/iTerm.app/
.aevtoappnull****
.aevtoappnull****
k"~}|{IzyVxw^vckx
.earsffdralis afdr

psxp0script_path
.sysoexecTEXTTEXT0project_path0project_name
.miscactvnullnull

kocl
~
Ptrm
}.corecrel****null|0
trak_terminal
{
Pssn
z.ITRMLNCHPssnobj
y
Cssn
x
pnam
w
iTxt
v.ITRMWrtenullobj )j,EO%jEOEO*j	O*lEO*lO*a,'a%*a,FO*aa%lO*aalUO*alO*a,'a%*a,FO*aa%lO*aalUO*alO*a,#*a,FO*aa%lO*aalUOPUOPUascr
ޭ

FasdUAS 1.101.10
k
l
r
n

1

psxp
l
I
.earsffdralis afdr

f
	o0script_path
l

r

l

I

.sysoexecTEXTTEXT
b

m
dirname
o0script_path
o0project_path
l
r
mtrak.io.js
o0project_name !
 l!"
"l#
#O$%
$k&&'(
'I!
.miscactvnullnull()*
)l""*+,
+l""-.- make a new terminal.//( make a new terminal,01
0r"+23
2l")4
4I")5
.corecrel****null56

kocl
6m$%

Ptrm
3o0
trak_terminal178
7l,,89:
9l,,;<; talk to the new terminal<==2 talk to the new terminal:>?
>O,@A
@k0BBCD
Cl00DEF
EI07G
.ITRMLNCHPssnobj GH

Pssn
Hm23IIJJSmall TextFKL
KO8fMN
Mk@eOOPQ
Pr@KRS
Rb@ETU
Tm@CVVWWServer
UoCD0project_name
S1EJ

pnamQXY
XILYZ
.ITRMWrtenullobj Z[

iTxt
[bPU\]
\mPS^^__cd
]oST0project_pathY`
`IZea
.ITRMWrtenullobj ab

iTxt
bm^accddmake server
N18=

CssnLef
elggfgh
gIgpi
.ITRMLNCHPssnobj ij

Pssn
jmilkkllSmall Texthmn
mOqop
okyqqrs
rrytu
tby~vw
vmy|xxyyGuard
wo|}0project_name
u1~

pnamsz{
zI|
.ITRMWrtenullobj |}

iTxt
}b~
~mcd
o0project_path{
I
.ITRMWrtenullobj

iTxt
m
guard
p1qv

Cssnn
l
I
.ITRMLNCHPssnobj

Pssn
mSmall Text
O
k
r
o0project_name
1

pnam
I
.ITRMWrtenullobj

iTxt
b
mcd
o0project_path
1

Cssn
l
Ao,-0
trak_terminal?
l
%mITRMalisHMacintosh HDH+M	iTerm.app>eB	 ApplicationsW2M$Macintosh HD:Applications:iTerm.app	iTerm.appMacintosh HDApplications/iTerm.app/

.aevtoappnull****0script_path0project_path0project_name0
trak_terminal
.aevtoappnull****
k"~}|{zyxwvuItsVrq^pckx
.earsffdralis afdr

psxp~0script_path
}.sysoexecTEXTTEXT|0project_path{0project_name
z.miscactvnullnull
y
kocl
x
Ptrm
w.corecrel****nullv0
trak_terminal
u
Pssn
t.ITRMLNCHPssnobj
s
Cssn
r
pnam
q
iTxt
p.ITRMWrtenullobj )j,EO%jEOEO*j	O*lEO*lO*a,'a%*a,FO*aa%lO*aalUO*alO*a,'a%*a,FO*aa%lO*aalUO*alO*a,*a,FO*aa%lUOPUOPU/Users/msaspence/Projects/trak.io/code/trak.io.js/start-iterm-env.scptb/Users/msaspence/Projects/trak.io/code/trak.io.json
o
Ptrmnascr
ޭ


fixed username

fixed username

-- Script to connect IPsec VPN and pass a password automagically!

tell application "System Events"
	-- get current clipboard contents as a string
	set CurrentClipboard to the clipboard as string

	-- set the clipboad to your password
	set the clipboard to (do shell script "cat '" & "/Users/skali/Dropbox/Private/work_VPN_pwd.txt" & "'")

	-- start playing with the VPN
	tell current location of network preferences

		-- set the name of the VPN service from your Network Settings
		set VPNService to service "vpn iptv work"
		-- determine current VPN connection status
		set isConnected to connected of current configuration of VPNService

		-- if connected, then disconnect
		if isConnected then
			disconnect VPNService

		else -- otherwise, connect to the VPN

			connect VPNService

			-- wait 10 seconds before pasting in the password
			delay 10

			tell application id "com.apple.systemevents"
				-- paste clipboard contents into password box
				keystroke "v" using {command down}
				-- press "Enter"
				keystroke (key code 36)
				-- wait 10 seconds to connect
				delay 10
				-- determine current VPN connection status (after providing password)
				set nowConnected to connected of current configuration of VPNService

				-- if we're now connected ...
				if nowConnected then

					-- press "Enter" again to get rid of a dialog confirmation prompt, if one exists
					keystroke (key code 36)

					-- now, execute any other commands you want (ping a server to check its status, open mail, etc.)

				end if
			end tell

		end if

	end tell
	-- now reset the clipboard to what it was before we started
	set the clipboard to CurrentClipboard
end tell

-- Script to connect IPsec VPN and pass a password automagically!

tell application "System Events"
	-- get current clipboard contents as a string
	set CurrentClipboard to the clipboard as string

	-- set the clipboad to your password
	set the clipboard to (do shell script "cat '" & "/Users/srg/Dropbox/Private/work_VPN_pwd.txt" & "'")

	-- start playing with the VPN
	tell current location of network preferences

		-- set the name of the VPN service from your Network Settings
		set VPNService to service "VPN (Cisco IPsec)"
		-- determine current VPN connection status
		set isConnected to connected of current configuration of VPNService

		-- if connected, then disconnect
		if isConnected then
			disconnect VPNService

		else -- otherwise, connect to the VPN

			connect VPNService

			-- wait 10 seconds before pasting in the password
			delay 10

			tell application id "com.apple.systemevents"
				-- paste clipboard contents into password box
				keystroke "v" using {command down}
				-- press "Enter"
				keystroke (key code 36)
				-- wait 10 seconds to connect
				delay 10
				-- determine current VPN connection status (after providing password)
				set nowConnected to connected of current configuration of VPNService

				-- if we're now connected ...
				if nowConnected then

					-- press "Enter" again to get rid of a dialog confirmation prompt, if one exists
					keystroke (key code 36)

					-- now, execute any other commands you want (ping a server to check its status, open mail, etc.)

				end if
			end tell

		end if

	end tell
	-- now reset the clipboard to what it was before we started
	set the clipboard to CurrentClipboard
end tell


killall -> /usr/bin/killall

killall -> /usr/bin/killall

try
    display dialog "Are you sure you want to remove NoEjectDelay?" buttons {"Cancel", "OK"}
    if the button returned of the result is "OK" then
        try
            do shell script "test -f '/Library/Application Support/org.pqrs/NoEjectDelay/uninstall.sh'"
            try
                do shell script "sh '/Library/Application Support/org.pqrs/NoEjectDelay/uninstall.sh'" with administrator privileges
                display alert "NoEjectDelay has been uninstalled. Please restart OS X."
                do shell script "/usr/bin/killall 'NoEjectDelay Utility'"
            on error
                display alert "Failed to uninstall NoEjectDelay."
            end try
        on error
            display alert "NoEjectDelay is not installed."
        end try
    end if
on error
    display alert "NoEjectDelay uninstallation was canceled."
end try

try
    display dialog "Are you sure you want to remove NoEjectDelay?" buttons {"Cancel", "OK"}
    if the button returned of the result is "OK" then
        try
            do shell script "test -f '/Library/Application Support/org.pqrs/NoEjectDelay/uninstall.sh'"
            try
                do shell script "sh '/Library/Application Support/org.pqrs/NoEjectDelay/uninstall.sh'" with administrator privileges
                display alert "NoEjectDelay has been uninstalled. Please restart OS X."
                do shell script "killall 'NoEjectDelay Utility'"
            on error
                display alert "Failed to uninstall NoEjectDelay."
            end try
        on error
            display alert "NoEjectDelay is not installed."
        end try
    end if
on error
    display alert "NoEjectDelay uninstallation was canceled."
end try


Update script to get ALL macros instead of just hotkeyed macros.

try
	get application id "com.stairways.keyboardmaestro.engine"
on error err_msg number err_num
	return "Keyboard Maestro not found. First install it and then use this workflow."
end try

tell application id "com.stairways.keyboardmaestro.engine"
	gethotkeys with asstring and getall
end tell

try
	get application id "com.stairways.keyboardmaestro.engine"
on error err_msg number err_num
	return "Keyboard Maestro not found. First install it and then use this workflow."
end try

tell application id "com.stairways.keyboardmaestro.engine"
	gethotkeys with asstring
end tell


Default reproducibility to "Not applicable"

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@56860 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 classification 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
1o,0myclassificationcodemyClassificationCode/56
5r.478
7n.29:
94/2;

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

cobj
Bm78
Ao560argv
?o 0myproblemtitlemyProblemTitle=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0
mydescription
myDescriptionDJK
JrCMLM
LnCINO
N4DIP

cobj
PmEH
OoCD0argv
Mo0mydiagmyDiagKQR
QrNVST
SnNRUV
U4ORW

cobj
WmPQ
VoNO0argv
To0myconfigmyConfigRXY
XZWwZ[\
Z?WZ]^
]oWX0nN
^mXY
[r]n_`
_n]jab
a7^jcd

cobj
cmbf
dogi0nN
bo]^0argv
`o0myfilesmyFiles
\rqwef
eJqs
fo0myfilesmyFilesYgh
grxij
iIxk0submitreportsubmitReportklm
loyz"0mycomponentnamemyComponentNamemno
noz{(0mycomponentversionmyComponentVersionopq
po{|,0myclassificationcodemyClassificationCodeqrs
ro|}0
mypersonid
myPersonIDstu
to}~ 0myproblemtitlemyProblemTitleuvw
vo~0
mydescription
myDescriptionwxy
xo0mydiagmyDiagyz{
zo0myconfigmyConfig{|
|o0myfilesmyFiles
jo0resh}
}L~
~o0res
l
l
i
I0submitreportsubmitReport
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o,0myclassificationcodemyClassificationCode
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
k
O

I
.miscactvnullnull
mRADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/
l
O
k
l set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;8 set myClassificationCode to 4 -- 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#,
b#*
b#(
b#&
o#$0res
m$%Component:
o&'"0mycomponentnamemyComponentName
m()

o0res
r-6
b-4
b-2
b-0
o-.0res
m./&Component Version:
o01(0mycomponentversionmyComponentVersion
m23

o0res
r7@
b7>
b7<
b7:
o780res
m89Person ID:
o:;0
mypersonid
myPersonID
m<=

o0res
rAF

bAD

oAB0res

mBC--

o0res
rGP
bGN
bGL
bGJ
oGH0res
mHITitle:
oJK 0myproblemtitlemyProblemTitle
mLM

o~~0res
rQZ !
 bQX"#
"bQV$%
$bQT&'
&oQR}}0res
'mRS(())Description:
%oTU||0
mydescription
myDescription
#mVW**++

!o{{0res,-
,r[f./
.b[d01
0b[`23
2b[^45
4o[\zz0res
5m\]6677Diagnosis:
3o^_yy0mydiagmyDiag
1m`c8899

/oxx0res-:;
:rgt<=
<bgr>?
>bgn@A
@bglBC
Boghww0res
CmhkDDEEConfig:
Aolmvv0myconfigmyConfig
?mnqFFGG

=ouu0res;HI
HruJK
JbuLM
Lbu|NO
NbuzPQ
Pouvtt0res
QmvyRRSS*Classification Code:
Ooz{ss,0myclassificationcodemyClassificationCode
Mm|TTUU

Korr0resIVW
VrXY
XbZ[
Zb\]
\b^_
^oqq0res
_m``aa,Reproducibility Code:
]opp.0myreproducibilitycodemyReproducibilityCode
[mbbcc

Yooo0resWdn
dYemfgl
erhi
hbjk
jblm
lbno
nbpq
pbrs
rokk0res
smttuu
File
qojj0i
omvvww:
mnxy
x4iz
i
cobj
zohh0i
yogg0myfilesmyFiles
km{{||

ioff0resm0i
fmee
gl}dc
}n~
~1b
b
leng
oaa0myfilesmyFilesdcln
k
r
I`_
`.rdrlnprb****obj _^
^
desc
l
]\
o[[0
mydescription
myDescription]\Z
Z
diag
l
YX
oWW0mydiagmyDiagYXV
V
cmvr
l
UT
oSS(0mycomponentversionmyComponentVersionUTR
R
cmnm
l
QP
oOO"0mycomponentnamemyComponentNameQPN
N
rcod
l
ML
oKK.0myreproducibilitycodemyReproducibilityCodeMLJ
J
orig
l
IH
oGG0
mypersonid
myPersonIDIHF
F
pbti
l
ED
oCC 0myproblemtitlemyProblemTitleEDB
B
conf
l
A@
o??0myconfigmyConfigA@>
>
clcd
l
=<
o;;,0myclassificationcodemyClassificationCode=<:9
:
dsav
o880savenewprobsaveNewProb9
o770bugidbugID
l654654
l3393 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q$
r
c
o220bugidbugID
m1
1
long
o000bugidintbugIDInt
R/.-
/.ascrerr ********.-
k$
r
n
7,
,
ctxt
m
++
m**
o))0bugidbugID
o((0errormessageerrorMessage'
L$
b#
b
b
b
m(
o&&0bugidintbugIDInt
m
, """
o%%0errormessageerrorMessage
m"""")'
l%%$#"$#"
r%2
b%0
b%,
b%*
o%&!!0res
m&)Filed:
o*+  0bugidbugID
m,/

o0res
l33
Y3
kB}
rBT
bBR
bBN
bBG
oBC0res
mCFAttached:
lGM
nGM
4HM

cobj
oKL0i
oGH0myfilesmyFiles
mNQ

o0res
rUm
IUi
.rdrladdfutxtobj

mr11
lY_
nY_
4Z_

cobj
o]^0i
oYZ0myfilesmyFiles

pbid
obc0bugidbugID
o0ok
rn}
bn{
bnw
bns
ono0res
	mor

  Result:
osv0ok
mwz

o0res0i
m67
l7=
n7=
18<

leng
o780myfilesmyFiles
l
r
b
b
o0res
m6Added keyword: LLVM_CHECKER
m

o0res
I
.rdrladkilongobj  !"

pbid
!o0bugidbugID"#

keyi
#m$%
$l%&
&L'
'b()
(b*+
*b,-
,b./
.m0011(
/o0bugidintbugIDInt
-m2233
, """
+o0res
)m4455""")
m66RADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/7
7l89:;<=>?@ABCD8
.aevtoappnull****0submitreportsubmitReport0nN0res"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles9EF
.aevtoappnull****0argvE0argvF

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig	0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EOa/E`O/E`O[\[Za\Z2E`YjvE`O*___a+EO:GH0submitreportsubmitReportI	I	"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFilesG"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0okHA(*68DFRT`btv{
024
.miscactvnullnull

leng

cobj

desc

diag

cmvr

cmnm

rcod

orig

pbti

conf

clcd

dsav
.rdrlnprb****obj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOEOfEOjEOEOf%%%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%EONka,Ekh
a1%a/%a2%EO*a3a/a4a56E^Oa7%]%a8%E[OYOa9%a:%EO*a4a;a<a5=Oa>%a?%%a@%U	;JJ(6257428, """Filed: 6257428
Attached: /tmp/scan-build-2008-09-30-34/report-IiREds.html
  Result: 1

Added keyword: LLVM_CHECKER
""")<KK8Bugs found by Clang Analyzer=LLX>MM3?NN@OOleakAPP4Bug reported by the clang static analyzer.

Description: leak

File: /Volumes/Data/Users/kremenek/llvm/tools/clang/test/Analysis/CFDate.m

Line: 120

BQQCRRD~S~STTUU`/tmp/scan-build-2008-09-30-34/report-IiREds.htmlascr
ޭ

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 classification 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
1o,0myclassificationcodemyClassificationCode/56
5r.478
7n.29:
94/2;

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

cobj
Bm78
Ao560argv
?o 0myproblemtitlemyProblemTitle=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0
mydescription
myDescriptionDJK
JrCMLM
LnCINO
N4DIP

cobj
PmEH
OoCD0argv
Mo0mydiagmyDiagKQR
QrNVST
SnNRUV
U4ORW

cobj
WmPQ
VoNO0argv
To0myconfigmyConfigRXY
XZWwZ[\
Z?WZ]^
]oWX0nN
^mXY
[r]n_`
_n]jab
a7^jcd

cobj
cmbf
dogi0nN
bo]^0argv
`o0myfilesmyFiles
\rqwef
eJqs
fo0myfilesmyFilesYgh
grxij
iIxk0submitreportsubmitReportklm
loyz"0mycomponentnamemyComponentNamemno
noz{(0mycomponentversionmyComponentVersionopq
po{|,0myclassificationcodemyClassificationCodeqrs
ro|}0
mypersonid
myPersonIDstu
to}~ 0myproblemtitlemyProblemTitleuvw
vo~0
mydescription
myDescriptionwxy
xo0mydiagmyDiagyz{
zo0myconfigmyConfig{|
|o0myfilesmyFiles
jo0resh}
}L~
~o0res
l
l
i
I0submitreportsubmitReport
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o,0myclassificationcodemyClassificationCode
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
k
O

I
.miscactvnullnull
mRADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/
l
O
k
l set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;8 set myClassificationCode to 4 -- 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#,
b#*
b#(
b#&
o#$0res
m$%Component:
o&'"0mycomponentnamemyComponentName
m()

o0res
r-6
b-4
b-2
b-0
o-.0res
m./&Component Version:
o01(0mycomponentversionmyComponentVersion
m23

o0res
r7@
b7>
b7<
b7:
o780res
m89Person ID:
o:;0
mypersonid
myPersonID
m<=

o0res
rAF

bAD

oAB0res

mBC--

o0res
rGP
bGN
bGL
bGJ
oGH0res
mHITitle:
oJK 0myproblemtitlemyProblemTitle
mLM

o~~0res
rQZ !
 bQX"#
"bQV$%
$bQT&'
&oQR}}0res
'mRS(())Description:
%oTU||0
mydescription
myDescription
#mVW**++

!o{{0res,-
,r[d./
.b[b01
0b[`23
2b[^45
4o[\zz0res
5m\]6677Diagnosis:
3o^_yy0mydiagmyDiag
1m`a8899

/oxx0res-:;
:rer<=
<bep>?
>bel@A
@bejBC
Boefww0res
CmfiDDEEConfig:
Aojkvv0myconfigmyConfig
?mloFFGG

=ouu0res;HI
HrsJK
Jbs~LM
LbszNO
NbsxPQ
Posttt0res
QmtwRRSS*Classification Code:
Ooxyss,0myclassificationcodemyClassificationCode
Mmz}TTUU

Korr0resIVW
VrXY
XbZ[
Zb\]
\b^_
^oqq0res
_m``aa,Reproducibility Code:
]opp.0myreproducibilitycodemyReproducibilityCode
[mbbcc

Yooo0resWdn
dYemfgl
erhi
hbjk
jblm
lbno
nbpq
pbrs
rokk0res
smttuu
File
qojj0i
omvvww:
mnxy
x4iz
i
cobj
zohh0i
yogg0myfilesmyFiles
km{{||

ioff0resm0i
fmee
gl}dc
}n~
~1b
b
leng
oaa0myfilesmyFilesdcln
k
r
I`_
`.rdrlnprb****obj _^
^
desc
l
]\
o[[0
mydescription
myDescription]\Z
Z
diag
l
YX
oWW0mydiagmyDiagYXV
V
cmvr
l
UT
oSS(0mycomponentversionmyComponentVersionUTR
R
cmnm
l
QP
oOO"0mycomponentnamemyComponentNameQPN
N
rcod
l
ML
oKK.0myreproducibilitycodemyReproducibilityCodeMLJ
J
orig
l
IH
oGG0
mypersonid
myPersonIDIHF
F
pbti
l
ED
oCC 0myproblemtitlemyProblemTitleEDB
B
conf
l
A@
o??0myconfigmyConfigA@>
>
clcd
l
=<
o;;,0myclassificationcodemyClassificationCode=<:9
:
dsav
o880savenewprobsaveNewProb9
o770bugidbugID
l654654
l3393 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q"
r
c
o220bugidbugID
m1
1
long
o000bugidintbugIDInt
R/.-
/.ascrerr ********.-
k"
r
n
7,
,
ctxt
m	++
m**
o))0bugidbugID
o((0errormessageerrorMessage'
L"
b!
b
b
b
m(
o&&0bugidintbugIDInt
m
, """
o%%0errormessageerrorMessage
m """)'
l##$#"$#"
r#0
b#.
b#*
b#(
o#$!!0res
m$'Filed:
o()  0bugidbugID
m*-

o0res
l11
Y1
k@{
r@R
b@P
b@L
b@E
o@A0res
mADAttached:
lEK
nEK
4FK

cobj
oIJ0i
oEF0myfilesmyFiles
mLO

o0res
rSk
ISg
.rdrladdfutxtobj

mr11
lW]
nW]
4X]

cobj
o[\0i
oWX0myfilesmyFiles

pbid
o`a0bugidbugID
o0ok
rl{
bly
blu
blq
olm0res
	mmp

  Result:
oqt0ok
mux

o0res0i
m45
l5;
n5;
16:

leng
o560myfilesmyFiles
l
r
b
b
o0res
m6Added keyword: LLVM_CHECKER
m

o0res
I
.rdrladkilongobj  !"

pbid
!o0bugidbugID"#

keyi
#m$%
$l%&
&L'
'b()
(b*+
*b,-
,b./
.m0011(
/o0bugidintbugIDInt
-m2233
, """
+o0res
)m4455""")
m66RADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/7
7l89:;<=>?@ABCD8
.aevtoappnull****0submitreportsubmitReport0nN0res"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles9EF
.aevtoappnull****0argvE0argvF

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig	0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EOa/E`O/E`O[\[Za\Z2E`YjvE`O*___a+EO:GH0submitreportsubmitReportI	I	"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFilesG"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0okH@(*68DFRT`btv{
024
.miscactvnullnull

leng

cobj

desc

diag

cmvr

cmnm

rcod

orig

pbti

conf

clcd

dsav
.rdrlnprb****obj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOkEOfEOjEOEOf%%%EO%%%EO%%%EO%EO%%%EO%%%EO%%%EOa%%a%EOa%%a%EOa%%a%EO+ka,Ekh
a%%a%a/%a%E[OYY*aaaaaa a!a"a#a$a%&EOa'&EW'X()[a*\[Zm\Zi2EOa+%a,%%a-%Oa.%%a/%EONka,Ekh
a0%a/%a1%EO*a2a/a3a45E^Oa6%]%a7%E[OYOa8%a9%EO*a3a:a;a4<Oa=%a>%%a?%U	;JJ(6257187, """Filed: 6257187
Attached: /tmp/scan-build-2008-09-30-15/report-W5e09y.html
  Result: 1

Added keyword: LLVM_CHECKER
""")<KK8Bugs found by Clang Analyzer=LLX>MM7?NN@OOdead assignmentAPPRBug reported by the clang static analyzer.

Description: dead assignment

File: /Volumes/Data/Users/kremenek/llvm/tools/clang/test/Analysis/dead-stores.c

Line: 33

BQQCRRDSSTTUU`/tmp/scan-build-2008-09-30-15/report-W5e09y.htmlascrޭ


update Reminders to choose first list in alphabetical order

on sortList(unsortedList)
	set oldDelimiters to AppleScript's text item delimiters
	set AppleScript's text item delimiters to (ASCII character 10)
	set sortedList to paragraphs of (do shell script "echo " & quoted form of (unsortedList as string) & "| sort  -d -f")
	set AppleScript's text item delimiters to oldDelimiters
	return sortedList
end sortList

-- sort the list
tell application "Reminders"
	activate
	get the name of every account
	set theAccount to name of first account
	tell account theAccount
		set allLists to the name of every list
	end tell
end tell
set sortedList to sortList(allLists)
set theList to first item of sortedList

tell application "Reminders"
	tell account theAccount to set myReminder to (make new reminder at list theList with properties {name:"{popclip text}"})
end tell

tell application "Reminders"
	activate
	set theAccount to name of first account
	tell account theAccount
		set theList to name of first list
		set myReminder to (make new reminder at list theList with properties {name:"{popclip text}"})
	end tell
end tell


Find chrome tab URL by regex match; Close #536

-- Copyright (c) 2015-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.

on run argv
  set theURL to item 1 of argv

  tell application "Chrome"

    if (count every window) = 0 then
      make new window
    end if

    -- Find a tab currently running the debugger
    set found to false
    set theTabIndex to -1
    repeat with theWindow in every window
      set theTabIndex to 0
      repeat with theTab in every tab of theWindow
        set theTabIndex to theTabIndex + 1

        -- Find by tab URL regex match
        set tabURL to theTab's URL as string
        set escaped to do shell script "echo '" & theURL & "' | sed 's/\\//\\\\\\//g'"
        set regex to "echo '" & tabURL & "' | sed 's/.*" & escaped & ".*/*match*(&)/'" as string
        set execShell to do shell script regex
        set match to execShell starts with "*match*"

        if match then
          set found to true
          exit repeat
        end if
      end repeat

      if found then
        exit repeat
      end if
    end repeat

    if found then
      tell theTab to reload
      set index of theWindow to 1
      set theWindow's active tab index to theTabIndex
    else
      tell window 1
        activate
        make new tab with properties {URL:theURL}
      end tell
    end if
  end tell
end run

-- Copyright (c) 2015-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.

on run argv
  set theURL to item 1 of argv

  tell application "Chrome"

    if (count every window) = 0 then
      make new window
    end if

    -- Find a tab currently running the debugger
    set found to false
    set theTabIndex to -1
    repeat with theWindow in every window
      set theTabIndex to 0
      repeat with theTab in every tab of theWindow
        set theTabIndex to theTabIndex + 1
        if theTab's URL is theURL then
          set found to true
          exit repeat
        end if
      end repeat

      if found then
        exit repeat
      end if
    end repeat

    if found then
      tell theTab to reload
      set index of theWindow to 1
      set theWindow's active tab index to theTabIndex
    else
      tell window 1
        activate
        make new tab with properties {URL:theURL}
      end tell
    end if
  end tell
end run


設定 Mac Terminal Title

設定 Mac Terminal Title

on run argv
    tell app "Terminal"
        activate
        set tab1 to do script item 1 of argv
		tell tab1 to set custom title to "CodeCanaan"
    end tell
end run

on run argv
    tell app "Terminal"
        activate
		set custom title to "CodeCanaan"
        set tab1 to do script item 1 of argv
    end tell
end run


applescript v2.0.1

applescript v2.0.1


Add an image to a slide (with an image placeholder)

on newPresentation(themeName)
    tell application "Keynote"
    	activate
    	-- set the chosenTheme to themeName

    	set targetWidth to 1024 -- 1440 <-- higher resolution
    	set targetHeight to 768 -- 1080 <-- higher resolution

    	set thisDocument to ¬
    		make new document with properties ¬
                {document theme:theme (themeName as string)}
    			--{document theme:theme (themeName as string), width:targetWidth, height:targetHeight}
        return name of thisDocument
    end tell
end newPresentation

on createSlide(docname, masterSlideName, thisSlideTitle, thisSlideBody)
	try
		tell application "Keynote"
			tell document named docname
				set thisSlide to make new slide with properties {base slide:master slide masterSlideName}
				tell thisSlide
					-- set the transition properties to {transition effect:dissolve, transition duration:defaultTransitionDuration, transition delay:defaultTransitionDelay, automatic transition:defaultAutomaticTransition}
					if title showing is true then
						set the object text of the default title item to thisSlideTitle
					end if
					if body showing is true then
						set the object text of the default body item to thisSlideBody
					end if
				end tell
			end tell
      return thisSlide
		end tell
	on error
		return 0
	end try
end createSlide

on finalize(docname)
	tell application "Keynote"
		tell document named docname to delete slide 1
    end tell
end finalize

on themeMasters(docname)
    --    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 named docname
        return names
    end tell
end themeMasters

on addImage(docname, filepath)
  (*
    FIXME: Use slide ID to adress slide instead of "current slide"
  *)
  tell application "Keynote"
  	tell document named docname
  		tell the current slide

  			-- TO REPLACE A PLACEHOLDER OR EXISTING IMAGE:
  			set thisPlaceholderImageItem to image 1
  			-- 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 tell
end addImage


fix protocol

fix protocol

--
--  slideshow -- Observe and Control Slideshow Applications
--  Copyright (c) 2014 Ralf S. Engelschall <http://engelschall.com>
--
--  This Source Code Form is subject to the terms of the Mozilla Public
--  License (MPL), version 2.0. If a copy of the MPL was not distributed
--  with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
--  File:     connector-osx-kn.js
--  Purpose:  connector engine for Apple Keynote 5 under Mac OS X
--  Language: AppleScript
--

--  utility function
on filterText(this_text, allowed_chars)
   set new_text to ""
   repeat with this_char in this_text
       set x to the offset of this_char in allowed_chars
       if x is not 0 then
           set new_text to (new_text & this_char) as string
       end if
   end repeat
   return new_text
end filterText

--  utility function
on replaceText(this_text, search_string, replacement_string)
   set AppleScript's text item delimiters to the search_string
   set the item_list to every text item of this_text
   set AppleScript's text item delimiters to the replacement_string
   set this_text to the item_list as string
   set AppleScript's text item delimiters to ""
   return this_text
end replace_chars

--  utility function
on asciiCharset()
    set charset to " \"'!#$%()*+,-./:;<=>?@[\\]^_{|}~"
    set charset to (charset & "0123456789")
    set charset to (charset & "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    set charset to (charset & "abcdefghijklmnopqrstuvwxyz")
    return charset
end asciiCharset

--  get application state
on knGetState()
    set state to "closed"
    tell application "System Events"
        set is_running to (exists (some process whose name is "Keynote"))
    end tell
    if is_running then
       try
            set state to "running"
            tell application "Keynote"
                if playing then
                    set state to "viewing"
                else if (get count of slides of front document) > 0 then
                    set state to "editing"
                end if
            end tell
        on error errMsg
        end try
    end if
    return state
end knGetState

--  get Apple Keynote current slide
on knGetCurSlide()
    try
        tell application "Keynote"
            if playing then
                return (get slide number of current slide of front document)
            else
                return (get slide number of current slide of front document)
            end if
        end tell
    on error errMsg
        return 0
    end try
end knGetCurSlide

--  get Apple Keynote maximum slide
on knGetMaxSlide()
    try
        tell application "Keynote"
            return (get count of slides of front document)
        end tell
    on error errMsg
        return 0
    end try
end knGetMaxSlide

--  the STATE command
on cmdSTATE()
    set state to knGetState()
    if state is "closed" then
        set position to 0
        set slides to 0
    else
        set position to knGetCurSlide()
        set slides to knGetMaxSlide()
    end if
    return ("{ \"response\": { " & ¬
        "\"state\": \"" & state & "\", " & ¬
        "\"position\": " & position & ", " & ¬
        "\"slides\": " & slides & " " & ¬
    "} }")
end cmdSTATE

--  the INFO command
on cmdINFO()
    set output to ""
    if knGetMaxSlide() is 0 then
        error "still no active presentation"
    end if
    tell application "Keynote"
        set thePresentation to front document
        set theTitles to ""
        set theNotes to ""
        set slideCount to (get count of slides of thePresentation)
        repeat with slideNum from 1 to slideCount
            set theSlide to slide slideNum of thePresentation

            set theTitle to (title of theSlide) as string
            if theTitles is not "" then
                set theTitles to (theTitles & ", ")
            end if
            set theTitles to (theTitles & "\"" & (my replaceText(theTitle, "\"", "\\\"")) & "\"")

            set theNote to (notes of theSlide) as string
            set theNote to (my filterText(theNote, my asciiCharset()))
            if theNotes is not "" then
                set theNotes to (theNotes & ", ")
            end if
            set theNotes to (theNotes & "\"" & (my replaceText(theNote, "\"", "\\\"")) & "\"")

        end repeat
        set theTitles to ("[ " & theTitles & " ]")
        set theNotes to ("[ " & theNotes & " ]")
        set output to ("{ \"response\": { \"titles\": " & theTitles & ", \"notes\": " & theNotes & " } }")
    end tell
    return output
end cmdINFO

--  the control commands
on cmdCTRL(command, arg)
    set state to knGetState()
    if command is "BOOT" then
        if state is not "closed" then
            error "application already running"
        end if
        tell application "Keynote"
            activate
        end tell
    else if command is "QUIT" then
        if state is "closed" then
            error "application already closed"
        end if
        tell application "Keynote"
            quit
        end tell
    else if command is "OPEN" then
        if state is "editing" or state is "viewing" then
            error "active presentation already existing"
        end if
        tell application "Keynote"
            tell application "Finder" to set thePath to ¬
                POSIX file (POSIX path of (container of (path to me) as string) & (arg)) as alias
            open thePath
        end tell
    else if command is "CLOSE" then
        if state is "closed" or state is "running" then
            error "still no active presentation"
        end if
        tell application "Keynote"
            close front document
        end tell
    else if command is "START" then
        if state is "closed" or state is "running" then
            error "still no active presentation"
        end if
        if state is "viewing" then
            error "active presentation already viewing"
        end if
        tell application "Keynote"
            start from (slide 1 of front document)
        end tell
    else if command is "STOP" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            stop slideshow (slideshow 1)
        end tell
    else if command is "PAUSE" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            activate
            tell application "System Events" to keystroke "b"
        end tell
    else if command is "RESUME" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            activate
            tell application "System Events" to keystroke "b"
        end tell
    else if command is "FIRST" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item 1 of slides of slideshow 1)
        end tell
    else if command is "LAST" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item (get count of slides of slideshow 1) of slides of slideshow 1)
        end tell
    else if command is "GOTO" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item (arg as integer) of slides of slideshow 1)
        end tell
    else if command is "PREV" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show previous
        end tell
    else if command is "NEXT" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show next
        end tell
    end if
    return "{ \"response\": \"OK\" }"
end cmdCTRL

--  main procedure
on run argv
    set cmd to item 1 of argv
    set arg to ""
    if count of argv is 2 then
        set arg to item 2 of argv
    end if
    try
        if cmd is "STAT" then
            set output to cmdSTATE()
        else if cmd is "INFO" then
            set output to cmdINFO()
        else if cmd is "BOOT" ¬
            or cmd is "QUIT" ¬
            or cmd is "OPEN" ¬
            or cmd is "CLOSE" ¬
            or cmd is "START" ¬
            or cmd is "STOP" ¬
            or cmd is "PAUSE" ¬
            or cmd is "RESUME" ¬
            or cmd is "FIRST" ¬
            or cmd is "LAST" ¬
            or cmd is "GOTO" ¬
            or cmd is "PREV" ¬
            or cmd is "NEXT" then
            set output to cmdCTRL(cmd, arg)
        else
            set output to "{ \"error\": \"invalid command\" }"
        end if
    on error errMsg
        set output to ("{ \"error\": \"" & errMsg & "\" }")
    end try
    copy output to stdout
end run

--
--  slideshow -- Observe and Control Slideshow Applications
--  Copyright (c) 2014 Ralf S. Engelschall <http://engelschall.com>
--
--  This Source Code Form is subject to the terms of the Mozilla Public
--  License (MPL), version 2.0. If a copy of the MPL was not distributed
--  with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
--  File:     connector-osx-kn.js
--  Purpose:  connector engine for Apple Keynote 5 under Mac OS X
--  Language: AppleScript
--

--  utility function
on filterText(this_text, allowed_chars)
   set new_text to ""
   repeat with this_char in this_text
       set x to the offset of this_char in allowed_chars
       if x is not 0 then
           set new_text to (new_text & this_char) as string
       end if
   end repeat
   return new_text
end filterText

--  utility function
on replaceText(this_text, search_string, replacement_string)
   set AppleScript's text item delimiters to the search_string
   set the item_list to every text item of this_text
   set AppleScript's text item delimiters to the replacement_string
   set this_text to the item_list as string
   set AppleScript's text item delimiters to ""
   return this_text
end replace_chars

--  utility function
on asciiCharset()
    set charset to " \"'!#$%()*+,-./:;<=>?@[\\]^_{|}~"
    set charset to (charset & "0123456789")
    set charset to (charset & "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    set charset to (charset & "abcdefghijklmnopqrstuvwxyz")
    return charset
end asciiCharset

--  get application state
on knGetState()
    set state to "closed"
    tell application "System Events"
        set is_running to (exists (some process whose name is "Keynote"))
    end tell
    if is_running then
       try
            set state to "running"
            tell application "Keynote"
                if playing then
                    set state to "viewing"
                else if (get count of slides of front document) > 0 then
                    set state to "editing"
                end if
            end tell
        on error errMsg
        end try
    end if
    return state
end knGetState

--  get Apple Keynote current slide
on knGetCurSlide()
    try
        tell application "Keynote"
            if playing then
                return (get slide number of current slide of front document)
            else
                return (get slide number of current slide of front document)
            end if
        end tell
    on error errMsg
        return 0
    end try
end knGetCurSlide

--  get Apple Keynote maximum slide
on knGetMaxSlide()
    try
        tell application "Keynote"
            return (get count of slides of front document)
        end tell
    on error errMsg
        return 0
    end try
end knGetMaxSlide

--  the STATE command
on cmdSTATE()
    set state to knGetState()
    if state is "closed" then
        set position to 0
        set slides to 0
    else
        set position to knGetCurSlide()
        set slides to knGetMaxSlide()
    end if
    return ("{ \"response\": { " & ¬
        "\"state\": \"" & state & "\", " & ¬
        "\"position\": " & position & ", " & ¬
        "\"slides\": " & slides & " " & ¬
    "} }")
end cmdSTATE

--  the INFO command
on cmdINFO()
    set output to ""
    if knGetMaxSlide() is 0 then
        error "still no active presentation"
    end if
    tell application "Keynote"
        set thePresentation to front document
        set theTitles to ""
        set theNotes to ""
        set slideCount to (get count of slides of thePresentation)
        repeat with slideNum from 1 to slideCount
            set theSlide to slide slideNum of thePresentation

            set theTitle to (title of theSlide) as string
            if theTitles is not "" then
                set theTitles to (theTitles & ", ")
            end if
            set theTitles to (theTitles & "\"" & (my replaceText(theTitle, "\"", "\\\"")) & "\"")

            set theNote to (notes of theSlide) as string
            set theNote to (my filterText(theNote, my asciiCharset()))
            if theNotes is not "" then
                set theNotes to (theNotes & ", ")
            end if
            set theNotes to (theNotes & "\"" & (my replaceText(theNote, "\"", "\\\"")) & "\"")

        end repeat
        set theTitles to ("[ " & theTitles & " ]")
        set theNotes to ("[ " & theNotes & " ]")
        set output to ("{ \"response\": { \"titles\": " & theTitles & ", \"notes\": " & theNotes & " } }")
    end tell
    return output
end cmdINFO

--  the control commands
on cmdCTRL(command, arg)
    set state to knGetState()
    if command is "BOOT" then
        if state is not "closed" then
            error "application already running"
        end if
        tell application "Keynote"
            activate
        end tell
    else if command is "QUIT" then
        if state is "closed" then
            error "application already closed"
        end if
        tell application "Keynote"
            quit
        end tell
    else if command is "OPEN" then
        if state is "editing" or state is "viewing" then
            error "active presentation already existing"
        end if
        tell application "Keynote"
            tell application "Finder" to set thePath to ¬
                POSIX file (POSIX path of (container of (path to me) as string) & (arg)) as alias
            open thePath
        end tell
    else if command is "CLOSE" then
        if state is "closed" or state is "running" then
            error "still no active presentation"
        end if
        tell application "Keynote"
            close front document
        end tell
    else if command is "START" then
        if state is "closed" or state is "running" then
            error "still no active presentation"
        end if
        if state is "viewing" then
            error "active presentation already viewing"
        end if
        tell application "Keynote"
            start from (slide 1 of front document)
        end tell
    else if command is "STOP" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            stop slideshow (slideshow 1)
        end tell
    else if command is "PAUSE" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            activate
            tell application "System Events" to keystroke "b"
        end tell
    else if command is "RESUME" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            activate
            tell application "System Events" to keystroke "b"
        end tell
    else if command is "FIRST" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item 1 of slides of slideshow 1)
        end tell
    else if command is "LAST" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item (get count of slides of slideshow 1) of slides of slideshow 1)
        end tell
    else if command is "GOTO" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show (item (arg as integer) of slides of slideshow 1)
        end tell
    else if command is "PREV" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show previous
        end tell
    else if command is "NEXT" then
        if state is not "viewing" then
            error "no active slideshow"
        end if
        tell application "Keynote"
            show next
        end tell
    end if
    return "{ \"result\": \"OK\" }"
end cmdCTRL

--  main procedure
on run argv
    set cmd to item 1 of argv
    set arg to ""
    if count of argv is 2 then
        set arg to item 2 of argv
    end if
    try
        if cmd is "STAT" then
            set output to cmdSTATE()
        else if cmd is "INFO" then
            set output to cmdINFO()
        else if cmd is "BOOT" ¬
            or cmd is "QUIT" ¬
            or cmd is "OPEN" ¬
            or cmd is "CLOSE" ¬
            or cmd is "START" ¬
            or cmd is "STOP" ¬
            or cmd is "PAUSE" ¬
            or cmd is "RESUME" ¬
            or cmd is "FIRST" ¬
            or cmd is "LAST" ¬
            or cmd is "GOTO" ¬
            or cmd is "PREV" ¬
            or cmd is "NEXT" then
            set output to cmdCTRL(cmd, arg)
        else
            set output to "{ \"error\": \"invalid command\" }"
        end if
    on error errMsg
        set output to ("{ \"error\": \"" & errMsg & "\" }")
    end try
    copy output to stdout
end run


Add Shebang to Applescript

Add Shebang to Applescript

#!/usr/bin/osascript

on run args
	if count of args is greater than 0
		set applescript's text item delimiters to " "
		set pn to (args as string)
		repeat
			log pn
		end
	else
		repeat
			log "y"
		end
	end
end


The width now fits the image

The width now fits the image

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

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			set the bounds to {30, 50, 480, 350}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 56
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {45, 41}
		set position of item "Extras" to {162, 33}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {128, 123}
		set position of item "Growl version history.webloc" to {265, 41}
		set position of item "Get more styles.webloc" to {383, 41}
		set position of item "Uninstall Growl.app" to {383, 123}
		update without registering applications
		tell container window
			set the bounds to {31, 50, 579, 4000}
			set the bounds to {30, 50, 579, 4000}
		end tell
		update without registering applications
	end tell
	--give the finder some time to write the .DS_Store file
	delay 5
end tell

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			set the bounds to {30, 50, 480, 350}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 56
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {45, 41}
		set position of item "Extras" to {162, 33}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {128, 123}
		set position of item "Growl version history.webloc" to {265, 41}
		set position of item "Get more styles.webloc" to {383, 41}
		set position of item "Uninstall Growl.app" to {383, 123}
		update without registering applications
		tell container window
			set the bounds to {31, 50, 480, 350}
			set the bounds to {30, 50, 480, 350}
		end tell
		update without registering applications
	end tell
	--give the finder some time to write the .DS_Store file
	delay 5
end tell


Change viewer.xml to tundra-client.json and plugins.xml to tundra.json in AppleScript main.scpt

FasdUAS 1.101.10
k
l
r
I

.earsffdralis afdr

f
	o0
bundlepath
bundlePath
l

r

n
1

psxp
o	0
bundlepath
bundlePath
o"0posixbundlepathposixBundlePath
l
lHB Default handler when Tundra.app is double-clicked (normal launch) Default handler when Tundra.app is double-clicked (normal launch)
l
I
.sysoexecTEXTTEXT
b
o"0posixbundlepathposixBundlePath
m  Contents/MacOS/Tundra --config tundra-client.json --trustserverstorages --accept_unknown_http_sources --accept_unknown_local_sources --fpslimit 60 --hide_benign_ogre_messages --nofilewatcher > /dev/null 2>&1&!"
!l"#$
#l%&%;5 Handler for opening Tundra with tundra:// URL format&''j Handler for opening Tundra with tundra:// URL format$()
(i*+
*I,
.GURLGURLnullTEXT
,o0this_urlthis_URL
+k--./
.r01
0I2
.earsffdralis afdr
2f
1o0
bundlepath
bundlePath/34
3r
56
5n78
71

psxp
8o	0
bundlepath
bundlePath
6o"0posixbundlepathposixBundlePath49:
9l:;
;I<
.sysoexecTEXTTEXT
<b=>
=b?@
?bAB
Ao"0posixbundlepathposixBundlePath
BmCCDDhContents/MacOS/Tundra --config tundra.json --login "
@o0this_urlthis_URL
>mEEFF@" --trustserverstorages --accept_unknown_http_sources --accept_unknown_local_sources --fpslimit 60 --hide_benign_ogre_messages --nofilewatcher > /dev/null 2>&1&)GH
GlHIJ
IlKLK82 Handler for opening txml files with double-click:LMMd Handler for opening txml files with double-click:JNO
NiPQ
PIR
.aevtodocnullalis
Ro0anfileanFile
Qk*SSTU
TrVW
VIX
.earsffdralis afdr
Xf
Wo0
bundlepath
bundlePathUYZ
Yr
[\
[n]^
]1

psxp
^o	0
bundlepath
bundlePath
\o"0posixbundlepathposixBundlePathZ_`
_l`ab
arcd
cnef
e1

psxp
fo0anfileanFile
do0	posixfile	posixFilebgh
gIi
.sysoexecTEXTTEXT
ibjk
jblm
lbno
no"0posixbundlepathposixBundlePath
omppqqLContents/MacOS/Tundra --splash --file
mo0	posixfile	posixFile
kmrrss$ > /dev/null 2>&1&ht
tI *u
0	log_eventuv
vb!&wx
wb!$yz
ym!"{{||2Opening Tundra scene XML
zo"#0	posixfile	posixFile
xm$%}}~~B for viewing in a local server...O
l
l=7 Helper function to format log messages for this scriptn Helper function to format log messages for this script
i
I
0	log_event
o0
themessage
k
r

b
b
l
I
.sysoexecTEXTTEXT
m4date  +'%Y-%m-%d %H:%M:%S'

rtyp
m

TEXT
m
o
0
themessage
o0thelinetheLine
I
.sysoexecTEXTTEXT
b
b
m
echo
o0thelinetheLine
mT >> ~/Library/Logs/Tundra-launchevents.log
.GURLGURLnullTEXT
.aevtodocnullalis
0	log_event
.aevtoappnull****+
.GURLGURLnullTEXT0this_urlthis_URL0this_urlthis_URL0
bundlepath
bundlePath"0posixbundlepathposixBundlePathCE
.earsffdralis afdr

psxp
.sysoexecTEXTTEXT)jEO,EO%%%jQ
.aevtodocnullalis0anfileanFile0anfileanFile0
bundlepath
bundlePath"0posixbundlepathposixBundlePath0	posixfile	posixFilepr{}
.earsffdralis afdr

psxp
.sysoexecTEXTTEXT
0	log_event+)jEO,EO,EO%%%jO*%%k+
0	log_event0
themessage0
themessage0thelinetheLine

rtyp

TEXT
.sysoexecTEXTTEXTl%%EO%%j~}|
.aevtoappnull****
k{{~}zyxwv
z.earsffdralis afdry0
bundlepath
bundlePath
x
psxpw"0posixbundlepathposixBundlePath
v.sysoexecTEXTTEXT|)jEO,EO%jascrޭ

FasdUAS 1.101.10
k
l
r
I

.earsffdralis afdr

f
	o0
bundlepath
bundlePath
l

r

n
1

psxp
o	0
bundlepath
bundlePath
o"0posixbundlepathposixBundlePath
l
lHB Default handler when Tundra.app is double-clicked (normal launch) Default handler when Tundra.app is double-clicked (normal launch)
l
I
.sysoexecTEXTTEXT
b
o"0posixbundlepathposixBundlePath
m  Contents/MacOS/Tundra --config viewer.xml --trustserverstorages --accept_unknown_http_sources --accept_unknown_local_sources --fpslimit 60 --hide_benign_ogre_messages --nofilewatcher > /dev/null 2>&1&!"
!l"#$
#l%&%;5 Handler for opening Tundra with tundra:// URL format&''j Handler for opening Tundra with tundra:// URL format$()
(i*+
*I,
.GURLGURLnullTEXT
,o0this_urlthis_URL
+k--./
.r01
0I2
.earsffdralis afdr
2f
1o0
bundlepath
bundlePath/34
3r
56
5n78
71

psxp
8o	0
bundlepath
bundlePath
6o"0posixbundlepathposixBundlePath49:
9l:;
;I<
.sysoexecTEXTTEXT
<b=>
=b?@
?bAB
Ao"0posixbundlepathposixBundlePath
BmCCDDhContents/MacOS/Tundra --config plugins.xml --login "
@o0this_urlthis_URL
>mEEFF@" --trustserverstorages --accept_unknown_http_sources --accept_unknown_local_sources --fpslimit 60 --hide_benign_ogre_messages --nofilewatcher > /dev/null 2>&1&)GH
GlHIJ
IlKLK82 Handler for opening txml files with double-click:LMMd Handler for opening txml files with double-click:JNO
NiPQ
PIR
.aevtodocnullalis
Ro0anfileanFile
Qk*SSTU
TrVW
VIX
.earsffdralis afdr
Xf
Wo0
bundlepath
bundlePathUYZ
Yr
[\
[n]^
]1

psxp
^o	0
bundlepath
bundlePath
\o"0posixbundlepathposixBundlePathZ_`
_l`ab
arcd
cnef
e1

psxp
fo0anfileanFile
do0	posixfile	posixFilebgh
gIi
.sysoexecTEXTTEXT
ibjk
jblm
lbno
no"0posixbundlepathposixBundlePath
omppqqLContents/MacOS/Tundra --splash --file
mo0	posixfile	posixFile
kmrrss$ > /dev/null 2>&1&ht
tI *u
0	log_eventuv
vb!&wx
wb!$yz
ym!"{{||2Opening Tundra scene XML
zo"#0	posixfile	posixFile
xm$%}}~~B for viewing in a local server...O
l
l=7 Helper function to format log messages for this scriptn Helper function to format log messages for this script
i
I
0	log_event
o0
themessage
k
r

b
b
l
I
.sysoexecTEXTTEXT
m4date  +'%Y-%m-%d %H:%M:%S'

rtyp
m

TEXT
m
o
0
themessage
o0thelinetheLine
I
.sysoexecTEXTTEXT
b
b
m
echo
o0thelinetheLine
mT >> ~/Library/Logs/Tundra-launchevents.log
.GURLGURLnullTEXT
.aevtodocnullalis
0	log_event
.aevtoappnull****+
.GURLGURLnullTEXT0this_urlthis_URL0this_urlthis_URL0
bundlepath
bundlePath"0posixbundlepathposixBundlePathCE
.earsffdralis afdr

psxp
.sysoexecTEXTTEXT)jEO,EO%%%jQ
.aevtodocnullalis0anfileanFile0anfileanFile0
bundlepath
bundlePath"0posixbundlepathposixBundlePath0	posixfile	posixFilepr{}
.earsffdralis afdr

psxp
.sysoexecTEXTTEXT
0	log_event+)jEO,EO,EO%%%jO*%%k+
0	log_event0
themessage0
themessage0thelinetheLine

rtyp

TEXT
.sysoexecTEXTTEXTl%%EO%%j~}|
.aevtoappnull****
k{{~}zyxwv
z.earsffdralis afdry0
bundlepath
bundlePath
x
psxpw"0posixbundlepathposixBundlePath
v.sysoexecTEXTTEXT|)jEO,EO%jascrޭ


Fix #114: GrowlTunes hanging if pictd has died.

As noted in the ticket, the fix here is to ask for the raw data, not the PICT data, for the artwork.

FasdUAS 1.101.10
k
lH
QH

O=
k<

r

mfsck
o0returnvaluereturnValue
r
n
1

pnam
1

pPla
o0alibraryaLibrary
r
1

pTrk
o0atrackaTrack
r !
 m

null
!o0
atrackartwork
aTrackArtwork"#
"Z5$%
$@&&'
&l$(
(I$)
.corecnte********
)n *+
*m

cArt
+o0atrackaTrack
'm$%
%r)1,-
,n)/./
.1-/

pRaw
/n)-01
04*-2

cArt
2m+,
1o)*0atrackaTrack
-o0
atrackartwork
aTrackArtwork#3
3r6<45
4J6:6678
7o670
atrackartwork
aTrackArtwork89
9o780alibraryaLibrary
5o0returnvaluereturnValue
m::hookalisLSnow-Leopardƺ8H+
iTunes.appuƀ*	 ApplicationsƻƁM$Snow-Leopard:Applications:iTunes.app
iTunes.appSnow-LeopardApplications/iTunes.app/
	R
.ascrerr ********

rEH;<
;mEF==>>fsck
<o0returnvaluereturnValue?@
?lIKA
ALIKB
BoIJ0returnvaluereturnValue@C
ClDED
.aevtoappnull****EFGH
.aevtoappnull****
FkKIIJJ?GH:=0returnvaluereturnValue

pPla

pnam0alibraryaLibrary

pTrk0atrackaTrack

null0
atrackartwork
aTrackArtwork

cArt
.corecnte********

pRawL?7EO*,,EO*,EOEO,jk
k/,EYhOlvEUW
X
EOascrޭ

FasdUAS 1.101.10
k
lH
QH

O=
k<

r

m
fsck
o0returnvaluereturnValue
r
n
1

pnam
1

pPla
o0alibraryaLibrary
r
1

pTrk
o0atrackaTrack
r
m

null
 o0
atrackartwork
aTrackArtwork!"
!Z5#$
#@&%&
%l$'
'I$(
.corecnte********
(n )*
)m

cArt
*o0atrackaTrack
&m$%
$r)1+,
+n)/-.
-1-/

pPCT
.n)-/0
/4*-1

cArt
1m+,
0o)*0atrackaTrack
,o0
atrackartwork
aTrackArtwork"2
2r6<34
3J6:5567
6o670
atrackartwork
aTrackArtwork78
8o780alibraryaLibrary
4o0returnvaluereturnValue
m99null:
iTunes.app007`20$)|( ߀hookalis>SaulireH+:
iTunes.app#/	 ApplicationsM:Saulire:Applications:iTunes.app
iTunes.appSaulireApplications/iTunes.app/
	R
.ascrerr ********

rEH:;
:mEF<<
fsck
;o0returnvaluereturnValue=>
=lIK?
?LIK@
@oIJ0returnvaluereturnValue>A
AlBCB
.aevtoappnull****CDEF
.aevtoappnull****
DkKGGHH=EF9<0returnvaluereturnValue

pPla

pnam0alibraryaLibrary

pTrk0atrackaTrack

null0
atrackartwork
aTrackArtwork

cArt
.corecnte********

pPCTL?7EO*,,EO*,EOEO,jk
k/,EYhOlvEUW
X
EOascrޭ