text
stringlengths
0
15.7k
source
stringlengths
6
112
if (count of inchar) = 1 then return offset of inchar in alphabet
LIB_Excel.applescript
set letterList to every character of inchar
LIB_Excel.applescript
set letterValueList to {}
LIB_Excel.applescript
repeat with i in (items 1 through ((count of inchar) - 1) of letterList as list)
LIB_Excel.applescript
set letterValueList to letterValueList & {((offset of i in alphabet) * 26)}
LIB_Excel.applescript
set sum to 0
LIB_Excel.applescript
repeat with i from 1 to (count of letterValueList) in letterValueList
LIB_Excel.applescript
set sum to sum + ((item i of letterValueList) * (((count of letterValueList) - i) * 26))
LIB_Excel.applescript
return sum + (last item of letterValueList) + (offset of (last item of inchar) in alphabet)
LIB_Excel.applescript
end alphaToNumeric
LIB_Excel.applescript
on numericToAlpha(inNumber)
LIB_Excel.applescript
set temp to ""
LIB_Excel.applescript
repeat until inNumber is 0
LIB_Excel.applescript
set modNumber to inNumber mod 26
LIB_Excel.applescript
set inNumber to inNumber div 26
LIB_Excel.applescript
if modNumber is 0 then
LIB_Excel.applescript
set modNumber to 26
LIB_Excel.applescript
set inNumber to inNumber - 1
LIB_Excel.applescript
set temp to (item modNumber of alphabet) & temp
LIB_Excel.applescript
return temp
LIB_Excel.applescript
end numericToAlpha
LIB_Excel.applescript
on saveExcelToCSV(filePath)
LIB_Excel.applescript
set _sourceWorkbook to open workbook workbook file name filePath
LIB_Excel.applescript
set _sourcepath to full name of _sourceWorkbook
LIB_Excel.applescript
set _newFilename to my stripExtension(my stripPath(_sourcepath)) & ".csv"
LIB_Excel.applescript
set _sourceWorksheet to worksheet 1 of _sourceWorkbook
LIB_Excel.applescript
save as _sourceWorksheet ¬
LIB_Excel.applescript
filename _newFilename ¬
LIB_Excel.applescript
file format CSV Mac file format with overwrite
LIB_Excel.applescript
if full name of active workbook is _sourcepath then close active workbook saving yes
LIB_Excel.applescript
if name of active workbook is _newFilename then
LIB_Excel.applescript
set _newPath to full name of active workbook
LIB_Excel.applescript
close active workbook saving yes
LIB_Excel.applescript
return _newPath
LIB_Excel.applescript
end saveExcelToCSV
LIB_Excel.applescript
set archivosOrigen to choose file with prompt "Elija la carpeta que contiene los archivos de origen" default location (path to desktop folder) with multiple selections allowed
importarMusica.scpt
set current encoder to encoder "Lossless Encoder"
importarMusica.scpt
with timeout of 3600 seconds
importarMusica.scpt
set nuevasPistas to convert archivosOrigen
importarMusica.scpt
repeat with cadaPista in nuevasPistas
importarMusica.scpt
tell cadaPista
importarMusica.scpt
display notification "El proceso finalizo con éxito " with title "Importación finalizada"
importarMusica.scpt
[AppleScript]
simple.applescript
display dialog "Hello World"
simple.applescript
repeat 1 times
find-select-lines-delete.scpt
keystroke "g" using command down
find-select-lines-delete.scpt
key code 124 using {command down, shift down}
find-select-lines-delete.scpt
key code 124 using shift down
find-select-lines-delete.scpt
keystroke "x" using command down
find-select-lines-delete.scpt
global _desktopWidth, _desktopHeight
position-window.applescript
global _frontApp, _frontAppName
position-window.applescript
global _gap
position-window.applescript
set _gap to 15
position-window.applescript
set _desktopSize to bounds of window of desktop
position-window.applescript
set _desktopWidth to item 3 of _desktopSize
position-window.applescript
set _desktopHeight to item 4 of _desktopSize
position-window.applescript
set _frontApp to first application process whose frontmost is true
position-window.applescript
set _frontAppName to name of _frontApp
position-window.applescript
set argv1 to item 1 of argv
position-window.applescript
if argv1 is "left" then
position-window.applescript
set position to leftPosition(_desktopWidth, _desktopHeight, _gap)
position-window.applescript
else if argv1 is "right" then
position-window.applescript
set position to rightPosition(_desktopWidth, _desktopHeight, _gap)
position-window.applescript
else if argv1 is "full" then
position-window.applescript
set position to fullPosition(_desktopWidth, _desktopHeight, _gap)
position-window.applescript
else if argv1 is "center" then
position-window.applescript
set position to centerPosition(_desktopWidth, _desktopHeight, _gap)
position-window.applescript
display alert "Position window with unknown position, exiting"
position-window.applescript
set x to item 1 of position
position-window.applescript
set y to item 2 of position
position-window.applescript
set width to item 3 of position
position-window.applescript
set height to item 4 of position
position-window.applescript
positionCurrentWindow(_frontAppName, x, y, width, height)
position-window.applescript
on positionCurrentWindow(appName, x, y, width, height)
position-window.applescript
tell application "System Events" to tell process appName
position-window.applescript
set theWindows to (every UI element whose subrole is "AXStandardWindow")
position-window.applescript
if theWindows is {} then set theWindows to (every UI element whose subrole is "AXDialog")
position-window.applescript
if theWindows is {} then
position-window.applescript
set theWindow to (first item of theWindows)
position-window.applescript
set position of theWindow to {x, y}
position-window.applescript
set size of theWindow to {width, height}
position-window.applescript
end positionCurrentWindow
position-window.applescript
on leftPosition(desktopWidth, desktopHeight, gap)
position-window.applescript
set width to (desktopWidth - 3 * gap) / 2
position-window.applescript
set height to desktopHeight - 2 * gap
position-window.applescript
set x to gap
position-window.applescript
set y to gap
position-window.applescript
return {x, y, width, height}
position-window.applescript
end leftPosition
position-window.applescript
on rightPosition(desktopWidth, desktopHeight, gap)
position-window.applescript
set x to width + 2 * gap
position-window.applescript
end rightPosition
position-window.applescript
on fullPosition(desktopWidth, desktopHeight, gap)
position-window.applescript
set width to desktopWidth - 2 * gap
position-window.applescript
end fullPosition
position-window.applescript
on centerPosition(desktopWidth, desktopHeight, gap)
position-window.applescript
set width to desktopWidth * 0.67 - gap
position-window.applescript
set height to desktopHeight * 0.85
position-window.applescript
set x to desktopWidth * 0.33
position-window.applescript
end centerPosition
position-window.applescript