I need to know how to use automator to take a value passed into the "Ask for Finder Items" action and then is converted into the variable 'Storage' By the action "Get Value of Variable." I then want that value to be typed into a text document such as:
on run {input, parameters}
-- Type Storage
delay 1.285987
set timeoutSeconds to 2.0
set uiScript to Storage
my doWithTimeout(uiScript, timeoutSeconds)
return input
end run
on doWithTimeout(uiScript, timeoutSeconds)
set endDate to (current date) + timeoutSeconds
repeat
try
run script "tell application \"System Events\"
" & uiScript & "
end tell"
exit repeat
on error errorMessage
if ((current date) > endDate) then
error "Can not " & uiScript
end if
end try
end repeat
end doWithTimeout
This does not work though, and the value of Storage when finished is the path that I selected...
Im sure that there is a way to do this, so your help is greatly appreciated.
on run {input, parameters}
-- Type Storage
delay 1.285987
set timeoutSeconds to 2.0
set uiScript to Storage
my doWithTimeout(uiScript, timeoutSeconds)
return input
end run
on doWithTimeout(uiScript, timeoutSeconds)
set endDate to (current date) + timeoutSeconds
repeat
try
run script "tell application \"System Events\"
" & uiScript & "
end tell"
exit repeat
on error errorMessage
if ((current date) > endDate) then
error "Can not " & uiScript
end if
end try
end repeat
end doWithTimeout
This does not work though, and the value of Storage when finished is the path that I selected...
Im sure that there is a way to do this, so your help is greatly appreciated.