mirror of https://gitlab.com/openlp/packaging.git
Remove unused applescript files.
This commit is contained in:
parent
04c73e4c45
commit
57441ec741
|
@ -1,40 +0,0 @@
|
||||||
on saveImageWithItselfAsIcon(icon_image_file)
|
|
||||||
-- save icon_image_file with itself as icon
|
|
||||||
set icon_image_file_string to icon_image_file as string
|
|
||||||
tell application "Image Events"
|
|
||||||
launch
|
|
||||||
set icon_image to open file icon_image_file_string
|
|
||||||
save icon_image with icon
|
|
||||||
close icon_image
|
|
||||||
end tell
|
|
||||||
end saveImageWithItselfAsIcon
|
|
||||||
|
|
||||||
on copyIconOfTo(aFileOrFolderWithIcon, aFileOrFolder)
|
|
||||||
tell application "Finder" to set f to 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 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
|
|
||||||
set icon_image_file to POSIX file "%s" as alias
|
|
||||||
set dmg_file to POSIX file "%s" as alias
|
|
||||||
|
|
||||||
my saveImageWithItselfAsIcon(icon_image_file)
|
|
||||||
-- wait for virus scanner
|
|
||||||
delay 2
|
|
||||||
my copyIconOfTo(icon_image_file, dmg_file)
|
|
||||||
end run
|
|
|
@ -1,41 +0,0 @@
|
||||||
on saveImageWithItselfAsIcon(icon_image_file)
|
|
||||||
-- save icon_image_file with itself as icon
|
|
||||||
set icon_image_file_string to icon_image_file as string
|
|
||||||
tell application "Image Events"
|
|
||||||
launch
|
|
||||||
set icon_image to open file icon_image_file_string
|
|
||||||
save icon_image with icon
|
|
||||||
close icon_image
|
|
||||||
end tell
|
|
||||||
end saveImageWithItselfAsIcon
|
|
||||||
|
|
||||||
on copyIconOfTo(aFileOrFolderWithIcon, aFileOrFolder)
|
|
||||||
tell application "Finder" to set f to 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 aFileOrFolder as alias
|
|
||||||
my CopyOrPaste(result, "v")
|
|
||||||
end copyIconOfTo
|
|
||||||
|
|
||||||
on CopyOrPaste(i, cv)
|
|
||||||
tell application "Finder"
|
|
||||||
activate
|
|
||||||
set infoWindow to open information window of i
|
|
||||||
set infoWindowName to name of infoWindow
|
|
||||||
end tell
|
|
||||||
tell application "System Events" to tell process "Finder" to tell window infoWindowName
|
|
||||||
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
|
|
||||||
set icon_image_file to POSIX file "%s" as alias
|
|
||||||
set dmg_file to POSIX file "%s" as alias
|
|
||||||
|
|
||||||
my saveImageWithItselfAsIcon(icon_image_file)
|
|
||||||
-- wait for virus scanner
|
|
||||||
delay 2
|
|
||||||
my copyIconOfTo(icon_image_file, dmg_file)
|
|
||||||
end run
|
|
Loading…
Reference in New Issue