Re: Get access to input from other handlers before on run?
Re: Get access to input from other handlers before on run?
- Subject: Re: Get access to input from other handlers before on run?
- From: Itai Rom <email@hidden>
- Date: Fri, 30 Oct 2009 18:29:23 -0700
Yes, update parameters is called in between, but there still isn't any
input available at that time.
It sounds like you might be better off displaying a dialog of your own
making when your action runs. Otherwise you'll be relying on the user
turning on "show when run," which they may not do. There are other
actions that do this kind of thing, for example when any of the Ask
for Items actions are run, they display various different dialog
windows from which users can select photos, files, etc. All you have
to do is add another nib to your project, configure it how you want
it, and display it from within your run method.
-Itai
On Oct 30, 2009, at 6:12 PM, Me wrote:
Yeah, I'm thinking that might be a problem, but on update parameters
runs after activation but before on run doesn't it?
This is what I'm trying to do:
1. Action takes in a big chunk of text into input
2. I want to extract terms from that text
3. Action's view has a "Tags" NSTextField where you can enter tags
for the post.
4. The text will be posted to a blogging site via cURL do shell script
5. I want the person to choose "show on run" and when the view pops
up, have the action suggest tags by preprocessing and extracting key
words from the input.
Kind of like in firefox when you press bookmark, and it suggests some
tags before you do anything.
On Fri, Oct 30, 2009 at 8:06 PM, Itai Rom <email@hidden> wrote:
The input literally does not exist until just before the action is
run,
hence there is no way to access it any earlier than the run handler.
However, I'm wondering what specifically you're trying to do?
Generally
actions do not populate their views with any of the data they get
as input.
-Itai
On Oct 30, 2009, at 5:55 PM, Me wrote:
In an Applescript automator action, is there a way to get access to
the input from a handler that runs before on run like on opened or
awake from NIB?
I'm trying to preprocess some of the input before it populates the
action's view.
I've looked through all of the applescript terminology docs and
event
codes references, not seeing how to do anything like that.
this is what I'm trying right now (in a handler like on update
parameters):
set this_name to the name of theObject
if this_name is "content view" then
set the contentview_reference to theObject
set the actionview_reference to the super view of
theObject
set the action_input to (call method "input" of
(call
method
"action" of the actionview_reference))
end if
This works for snagging parameters, but not for input. I get "Can't
make current application into type anything"
Any input, I mean help, from the crowd? :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden