Nido Apple

Recibe ayuda de expertos

Registrate y pregunta

Es gratis y fácil

Recibe respuestas

Respuestas, votos y comentarios

Vota y selecciona respuestas

Recibe puntos, vota y da la solución

Pregunta

0voto

No logro iniciar un SCRIPT desde una regla de MAIL

Tengo una regla en MAIL que cuando me llega el extracto bancario, mueve el e.mail recibido a una carpeta TEMPORAL y luego ejecuta el siguiente SCRIPT, que imprime el EXTRACTO recibido. El siguiente SCRIPT no opera. Al llegar a: on getWorkflowFolder(), ejecuta solamente el comando: display dialog "entro". Cuando ejecuto este SCRIPT desde el Editor de Scripts me funciona correctamente si elimino las instrucciones on perform mail action with messages theMessages y end perform mail action with messages. Sus recomendaciones para resolver este inconveniente son bienvenidas. Mi equipo es un MacBook Pro I7 Mac OS X Versión 10.6.5. Cordialmente, Hdmesa =========================================================== on perform mail action with messages theMessages display dialog "Iniciando" set theWorkflowFolder to getWorkflowFolder() if theWorkflowFolder = false then return repeat with aMessage in theMessages try set theSubject to getMessageSubject(aMessage) set theWorkflow to getWorkflow(theSubject, theWorkflowFolder) if theWorkflow is not equal to false then do shell script "automator " & theWorkflow end try end repeat end perform mail action with messages end using terms from on getWorkflowFolder() display dialog "entro" tell application "Finder" display dialog "entro a subrutina" set theLibraryFolder to path to library folder from user domain as string display dialog theLibraryFolder set theWorkflowFolder to theLibraryFolder & "Workflows:Mail Rules:" display dialog theWorkflowFolder if (folder theWorkflowFolder exists) = false then return false display dialog "Hello3" return theWorkflowFolder end tell end getWorkflowFolder on getMessageSubject(aMessage) tell application "Mail" to return subject of aMessage end getMessageSubject on getWorkflow(theSubject, theWorkflowFolder) if theSubject does not start with "Extracto - <" then return false set theWorkflowName to "ImprimeExtractoBancarioCitibank" set theCurrentWorkflowPath to theWorkflowFolder & theWorkflowName & ".workflow" tell application "Finder" if (item theCurrentWorkflowPath exists) = false then return false end tell return quoted form of POSIX path of theCurrentWorkflowPath end getWorkflow

4 Respuestas

0voto

Peter Puntos289100
Como estas aplicando el script a los archivos ? Lo guardas como aplicación ? Saludos.

0voto

hdmesa Puntos420
Tengo una regla en MAIL definida que hace que tan pronto como entra un e.mail que tenga en el SUBJECT los caracteres "Extracto -" y sea remitido por una dirección de e.mail específica, traslada el e.mail recibido a un folder de e.mail llamado TEMPORAL y luego ejecuta el script ~/Library/Scripts/LaunchAutomatorWorkflow.scpt. Este escript está almacenado en /Users/hdmesa/Library/Scripts con el nombre LaunchAutomatorWorkflow.scpt. Gracias, Hdmesa

0voto

Peter Puntos289100
Intenta guardando tu script como aplicación y nos dices que pasa. Saludos.

0voto

hdmesa Puntos420
Se comportó exactamente igual.

Por favor, accede o regístrate para responder a esta pregunta.

Otras Preguntas y Respuestas


...