Referring to Automator Results from Previous Steps
Is it possible to refer to the results from previous steps in an Automator Workflow? Specifically, I'm trying to modify my backup Workflow to remove files from a folder before archiving it. I'm writing code and I want to back up my progress every so often. I have a decent workflow for archiving my entire project folder, but my executable is 21 MB where as the source code is .5 MB. I could cut the size of my archive dramatically if I could remove the executable file before archiving (plus it's obviously nonportable and redundant anyhow). I'm running into 2 issues when trying to create a Workflow to handle this:
1) Find/Filter Finder Items rely on Spotlight meta tags. Since I'm constantly recreating the executable, it appears Spotlight generally doesn't have the executable indexed so these two functions don't work. They simply don't see the executable.
2) Even if I find the file and delete it, I don't know how to select the folder again to archive it. I'm trying to keep this general so it'll work on any project folder so I don't want to point it directly to the folder.
Is it possible to refer to the results from previous steps in an Automator Workflow? Specifically, I'm trying to modify my backup Workflow to remove files from a folder before archiving it. I'm writing code and I want to back up my progress every so often. I have a decent workflow for archiving my entire project folder, but my executable is 21 MB where as the source code is .5 MB. I could cut the size of my archive dramatically if I could remove the executable file before archiving (plus it's obviously nonportable and redundant anyhow). I'm running into 2 issues when trying to create a Workflow to handle this:
1) Find/Filter Finder Items rely on Spotlight meta tags. Since I'm constantly recreating the executable, it appears Spotlight generally doesn't have the executable indexed so these two functions don't work. They simply don't see the executable.
2) Even if I find the file and delete it, I don't know how to select the folder again to archive it. I'm trying to keep this general so it'll work on any project folder so I don't want to point it directly to the folder.
Similar Messages
-
Use results from previous action to filter
I hope there are some automator pros out there who can shed some light on this one.
I am trying to create an app that will look in a specified folder, find all documents that were created in the last seven days, and then return results of only the files that contain a set of file names I specified.
So far I have this:
Find Finder Items
.....Search (FOLDER)
.....Any of the following are true:
........list of 15 filenames
Get File Information
Copy to Clipboard
Paste Clipboard Content into Word Document
Here is the crux. I need to find only the files with the specified names that were created in the last 7 days. I work for a television station, and all episodes have the same name, with an episode number at the end. I don't want results of every file with that name, there's thousands. Just the new ones. I can't just do a search for last 7 days files, because over 30 are created, and I only need 15. So how can I filter the results of the first action to only give me the results from the last 7 days? I added a Filter Finder Items, thinking it would take its information from the previous task, but it didn't work. Any help would be appreciated.I don't have a smb network drive to test, but if the find shell script works (it does not use Spotlight, and I am guessing that at least one of the actions uses it), the following *Run AppleScript* action may also work (and be shorter than 27 actions).
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- find items by age
searches the specified folder for the specified items newer than the specified number of days
input: nothing (any existing input is passed on)
output: a list of items found matching the search criteria
# search criteria
set theFolder to quoted form of text 1 thru -2 of (POSIX path of (choose folder)) -- no trailing delimiter
set fileNames to {¬
"Example_File_Name_1.txt", ¬
"Example_File_Name_2.txt", ¬
"Example_File_Name_3.txt", ¬
"Example_File_Name_4.txt", ¬
"Example_File_Name_5.txt", ¬
"Example_File_Name_6.txt", ¬
"Example_File_Name_7.txt", ¬
"Example_File_Name_8.txt", ¬
"Example_File_Name_9.txt", ¬
"Example_File_Name_10.txt", ¬
"Example_File_Name_11.txt", ¬
"Example_File_Name_12.txt", ¬
"Example_File_Name_13.txt", ¬
"Example_File_Name_14.txt", ¬
"Example_File_Name_15.txt"} -- a list of names to find
set daysOld to 7
set nameList to {} -- build an evaluation string from the list of names
repeat with anItem in fileNames
set the end of nameList to "-iname " & (quoted form of anItem) & " -or " -- case insensitive match for any of the names
end repeat
set nameList to text 1 thru -6 of (nameList as text) -- strip off the last boolean operator
# find files newer than 7 days old with any of the specified names
do shell script "/usr/bin/find " & theFolder & " -type f -newerBt '" & daysOld & " days ago' \\( " & nameList & " \\)"
return input & (paragraphs of the result) -- add to any input items
end run
</pre> -
Best practices for logging results from Looped steps
Hi all
I would like to start a discussion to document best practices for logging results (to reports and databases) from Looped Steps
As an application example - let's say you are developing a test for one of NI's analog input or output cards and need to measure a voltage across multiple inputs or outputs.
One way to do that would be to create a sequence that switches the appropriate signals and performs a "Voltage Measurement" test in a loop.
What are your techniques for keeping track of the individual measurements so that they can be traced to the individual signal paths that are being measured?
I have used a variety of techniques such as
i )creating a custom step type that generates unique identifiers for each iteration of the loop. This required some customization to the results processing . Also the sequence developer had to include code to ensure that a unique identifier was generated for each iteration
ii) Adding an input parameter to the test function/vi, passing loop iteration to it and adding this to Additional results parameters to log.I have attached a simple example (LV 2012 and TS 2012) that includes steps inside a loop structure as well as a looped test.
If you enable both database and report generation, you will see the following:
1) The numeric limit test in the for loop always generates the same name in the report and database which makes it difficult to determine the result of a particular iteration
2) The Max voltage test report includes the paramater as an additional result but the database does not include any differentiating information
3) The Looped Limit test generates both uniques reports and database entries - you can easily see what the result for each iteration is.
As mentioned, I am seeking to start a discussion for how others handle results for steps inside loops. The only way I have been able to accomplish a result similar to that of the Looped step (unique results and database entry for each iteration of the loop) is to modify the process model results processing.
Attachments:
test.vi 27 KB
Sequence File 2.seq 9 KB -
Copy Appraisal Results From Previous (MBO)
Hi:
There is a business requirement to populate the "criteria" and "notes" from previous year's appraisal form.
This must be populated when the appraisal form is launched.
I probably should be using a BADI for this. However, I don't know which function module I should use.
I hope experts in this forum can help me. Any help is appreciated.
Thank you,
AshHello Ash,
You can use the Value Determination BADI to default value in the VC.
There are some standad BADIs implementation in the following definition:
HRHAP00_VAL_DET Appraisal Document - Value Determination
You may copy/create your own custom implementation from the standard.
Best Regards,
Vincent -
Query Builder problem - query results from previous query
Hi.
I have a 100% repeatable problem in Oracle Query Builder (Version 6.0.7.1.0) where some rows from the results of a previous query appear in the results for the current query. The queries being run are saved in *.brw files. If I close down Query Builder completely between queries, there is no problem. If I run one query, export the results to a CSV file, close that query and then open a second query, when I run the second query there are rows in the results that shouldn't be there (they are remnants of the first query). Interestingly the total number of rows for the second query is correct, so the same number of rows are missing as shouldn't be there. Anyone come across this before? Problem is repeatable for different database users and on different computers.
regards,
Martinas i posted earlier .. queryBuilder as a stand alone product is neither supported nor available anymore. it is only available as part of the report data wizard.
thanks,
ph. -
Combining results of previous steps into numerical test
I'm relatively new to TestStand. Here is what I am trying to do.
Call VI A with numerical limits, make measurement, store value in sequence local.
Call VI B without numerical limits, make measurement, store value in sequence local.
Calculate: measurement A - measurement B. Compare the result to numerical limits.
Do I need to create a very simple VI with just two inputs, a subtraction function, and an output as a LabVIEW numerical limit step to implement step 3, or is there a more recommended way to do it?
Thanks.
Stephen
Solved!
Go to Solution.Here's what I would do:
Call VI A as an action step. Store the measurement in a local variable
Call VI B as an action step. Store the measurement in a local variable
Use the None Adapter to create a Numeric Limit Step. Set the Data Source to Locals.AValue - Locals.BValue
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~ -
I am retrieving high and low limits from step results in VB code that looks something like this:
' (This occurs while processing a UIMsg_Trace event)
Set step = context.Sequence.GetStep(previousStepIndex, context.StepGroup)
'(etc.)
' Get step limits for results
Set oStepProperty = step.AsPropertyObject
If oStepProperty.Exists("limits", 0&) Then
dblLimitHigh = step.limits.high
dblLimitLow = step.limits.low
'(etc.)
So far, so good. I can see these results in
VB debug mode.
Immediately after this is where I try to put the limits into the results list:
'Add Limits to results
call mCurrentExecution.AddExtraResult("Step.Limits.High", "UpperLimit")
call mCurrentExecution.AddExtraResult("Step.Limits.Low", "LowerLimit")
(No apparent errors here while executing)
But in another section of code when I try to extract the limits, I get some of the results, but I do not get any limits results.
That section of code occurs while processing a UIMsg_EndExecution event and looks something like this:
(misc declarations)
'Get the size of the ResultList array
Call oResultList.GetDimensions("", 0, sDummy, sDummy, iElements, eType)
'Step through the ResultList array
For iItem = 0 To iElements - 1
Dim oResult As PropertyObject
Set oResult = oResultList.GetPropertyObject("[" & CStr(iItem) & "]", 0)
sMsg = "StepName = " & oResult.GetValString("TS.StepName", 0) & _
", Status = " & oResult.GetValString("Status", 0)
If oResult.Exists("limits", 0&) Then
Debug.Print "HighLimit: " & CStr(oResult.GetValNumber("Step.Limits.High", 0))
Debug.Print "LowLimit: " & CStr(oResult.GetValNumber("Step.Limits.Low", 0))
End If
'(handle the results)
Next iItem
I can get the step name, I can get the status, but I can't get the limits. The "if" statement above which checks for "limits" never becomes true, because, apparently the limit results never made it to the results array.
So, my question again is how can I pass the low and high limit results to the results list, and how can I retrieve the same from the results list?
Thanks,
GriffGriff,
Hmmmm...
I use this feature all the time and it works for me. The only real
difference between the code you posted and what I do is that I don't
retrieve a property object for each TestStand object, instead I pass the
entire sequence context (of the process model) then retrieve a property
object for the entire sequence context and use the full TestStand object
path to reference sub-properties. For example, to access a step's
ResultList property called "foo" I would use the path:
"Locals.ResultList[0].TS.SequenceCall.ResultList[].Foo"
My guess is the problem has something to do with the object from which
you're retrieving the property object and/or the path used to obtain
sub-properties from the object. You should be able to break-point in the
TestStand sequence editor immediately after the test step in question
executes, then see the extra results in the step's ResultList using the
context viewer.
For example, see the attached sequence file. The first step adds the extra
result "Step.Limits" as "Limits", the second step is a Numeric Limit (which
will have the step property of "Limits") test and the third step pops up a
dialog if the Limits property is found in the Numeric Limit test's
ResultList. In the Sequence Editor, try executing with the first step
enalbled then again with the first step skipped and breakpoint on the third
step. Use the context viewer to observe where the Limits property is added.
That might help you narrow in on how to specify the property path to
retrieve the value.
If in your code, you see the extra results in the context viewer, then the
problem lies in how you're trying to retrieve the property. If the extra
results aren't there, then something is wrong in how you're specifying them,
most likely a problem with the AddExtraResult call itself.
One other thing to check... its hard to tell from the code you posted... but
make sure you're calling AddExtraResult on the correct execution object and
that you're calling AddExtraResult ~before~ executing the step you want the
result to show up for. Another programmer here made the mistake of assuming
he could call AddExtraResult ~after~ the step executed and TestStand would
"back fill" previously executed steps. Thats not the case. Also, another
mistake he made was expecting the extra results to appear for steps that did
not contain the original step properties. For example, a string comparison
step doesn't have a "Step.Limits.High" property, so if this property is
called out explicitly in AddExtraResult, then the extra result won't appear
in the string comparison's ResultList entry. Thats why you should simply
specify "Step.Limits" to AddExtraResul so the Limits container (whose
contents vary depending on the step type) will get copied to the ResultList
regardless of the step type.
I call AddExtraResult at the beginning of my process model, not in a UI
message handler, so there may be some gotcha from calling it that way. If
all else fails, try adding the AddExtraResult near the beginning of your
process model and see if the extra results appear in each step's ResultList.
Good luck,
Bob Rafuse
Etec Inc.
[Attachment DebugExtraResults.seq, see below]
Attachments:
DebugExtraResults.seq 20 KB -
How to get previous step totals from Apple Health
Is there a way (natively or via 3rd party app) to isolate step totals from previous days in Apple Health? All I can find is the weekly view, which won't let you zoom in. The daily view will not let you view anything but the current day.
I've tried a couple of apps (Runkeeper and Jawbone UP) that will read going forward, but nothing will read the historical data.Is there a way (natively or via 3rd party app) to isolate step totals from previous days in Apple Health? All I can find is the weekly view, which won't let you zoom in. The daily view will not let you view anything but the current day.
I've tried a couple of apps (Runkeeper and Jawbone UP) that will read going forward, but nothing will read the historical data. -
Automator in Leopard - Ignore results from last action?
In the Tiger version of Automator there was an option on each (or most) of the actions you placed in the workflow (in the Automator window) to ignore results from the last action. I can't see how to do this in the Leopard version. How do I do it, or where's the option?
It's now called "Ignore Input" and is accessed via right-click on the action menubar-- not the most friendly change!
I wrote up a review of Automator 2 covering this and a few other issues:
http://automatorworld.com/archives/automator-20-review/
Message was edited by: Steve Weintraub -
Viewing errors resulting from automated user replication
hi guys
pls tel me how to view errors resulting from automated user replication
regards
kamalDoes it not appear in default trace?
-
How to get Error Msg from A step in TestStand into a variable (with Record Result disable)
I have disable "Record Result" in a step (action) that call a Labview VI (Minimise memory usage during long run).
But I want to capture the error msg and put it in a local variable (locals.log).
So in the "Post Expression" of that step, I add:
locals.log = step.result.error.msg
But it always an empty string, Is the post expression executed when the there is an error in the step ?
So How can I capture it ?Hi,
The trouble is that when a step errors, the Post Expression doesn't get executed.
Try using one of the Override callbacks - SequenceFilePostStepRuntimeError, ProcessModelPostStepRuntimeError or StationPostStepRuntimeError.
There is an example in the Examples\Callbacks.
The Step properties are passed as a parameter to the callback so you can get the error message and do your logging.
Hope this helps
Ray Farmer
Regards
Ray Farmer -
Can't open tabs from previous session (after Firefox regularly closed)?!
Regularly closed firefox 36.0.4. and shot down computer (Windows 7 Pro 64-bit).
On next start, Firefox doesn't open tabs from previous session (altought it is configured to do this) !?!?!?
I lost about 30 tabs!!
Very, very frustrating!!!
Think to finish using Firefox forever!!!!!Don't exit Firefox! Or if you already did, don't start it back up again!
''If Firefox is running:'' Open your current Firefox settings (AKA Firefox profile) folder using either
* "3-bar" menu button > "?" button > Troubleshooting Information
* (menu bar) Help > Troubleshooting Information
* type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Show Folder" button. This should launch a new window listed various files and folders. For best results, change the view to "Details".
(''If Firefox not running, get to this folder by pasting the following in the Run box on the start menu and pressing Enter:'' %APPDATA%\Mozilla\Firefox\Profiles ''and then double-click into the most recently updated semi-randomly-named folder you find there.'')
In the window that launches, scroll down and double-click into the '''sessionstore-backups''' folder. Save all files here to a safe location, such as your Documents folder, so Firefox doesn't overwrite them. We may be able to use them to recover your lost tabs.
Also, if you return to the main level of the profile folder, you may find some sessionstore files. Copy those to the safe location as well.
Could you report back on what you found?
Note: If Windows hides the .js file extension from you, you can change a setting so that you can see all file extensions (this helps when renaming files). This support article has the steps: http://support.microsoft.com/kb/865219 or http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions
The kinds of files you may find among your sessionstore-backup files are:
* recovery.js: the windows and tabs in your currently live Firefox session (or, if Firefox is closed, your last session)
* recovery.bak: a backup copy of recovery.js
* previous.js: the windows and tabs in your last Firefox session
* upgrade.js-''build_id'': the windows and tabs in the Firefox session that was live at the time of your last update -
Kernel Panic resulting from force restart
My MBP has gone into Kernel Panic and I am not certain how to resolve. By resolve, I mean get back to my desktop/applications The Kernel Panic resulted from a force restart, held down the Power button because I was attempting do a regular shutdown but was not able to force quit some applications..they seemed to be hanging. Safari was one, iPhoto...also I had just synced a new iPad2. Maybe I didn't disconnect the iPad2 properly? I did have anything connected to the MBP...
I tried to startup in Safe Mode...but will not, just the kernel panic with instructions to hold down power button and restart...my MBP runs pretty well and I have never had a Kernel Panic since I bought it in August 2009
I do have most of the files backed up using TimeMachine on an external drive...
I have a my 15-inch MacBook Pro Mac Os X install DVD, that came with the Laptop...
There might have been another DVD that came with the box set/ I also have my Snow Leopard upgrade DVD. I believe I was running 10.6.5 but I keep up with the System Software updates and I was also getting prompted to update to the latest 10.6.7, so maybe I had 10.6.6.
So Kernel Panic is has never happened before, I didn't add anything, except for an iPad2 sync... but I believe that I got too impatient to shutdown when I couldn't force quit apps as quickly as I wanted too
I think the Apple Software updater was open, although I did not initiate an update, other apps included: Microsoft Word Safari, iPhoto, iTunes, Dreamweaver, Adobe Illustrator CS..maybe Photoshop..Yeah I think I had too many apps open when I tried to force restart. In practice I do not force restart...usually never. So to recap, I got impatient, force restarted with way too many apps, some big apps open, and set off a kernel panic on my MBP with no other devices attached.
I know part of the steps to recover involves booting from a DVD, but which one? The Mac OSX X Install DVD or the Snow Leopard Upgrade DVD? then...how to I get back to TimeMachine to do a restore if necessary?
thanks in advance.
PatrickSadly,
After running and completing the hardware test which is passed..I then booted off the Snow Leopard DVD and ran the Disk Utility and to Repair the Disk and it said the Disk is not repairable..
Invalid Node Structure
And told me to back up my files.
So...I suppose the next steps:
Try to run DiskWarrior, to either fix the Invalid Node Structure or at least
retreive the files thru the HD preview.
Boot off the Snow Leopard DVD and reformat the drive and then, I should plug my external hard drive back in with the save Time Machine Data and I can click Restore and pretty much get back what I had when Time Machine made its last back up?
If Disk Warrior does not work. How can I try to get some files off the computer before I reformat the disk ... without using DiskWarrior? With or without DW I want to try a restore...
Is it a best practice to reformat the HD and then do a "Restore" off a bootable DVD? This would eliminate any previous issues and start off with a sound drive as opposed to trying to go right to a "restore" procedure.
Thanks again! -
Need to REMOVE Apple ID account from previously owned iMac
I recently purchased a previously owned iMac and need to REMOVE its previous Apple ID account to remove apps that they obviously purchased. Can this be done? I am being prompted to update these apps and when I try, I am asked to enter this OLD account. I actually want to REMOVE these apps for I have zero interest in them. The system was supposedly wiped of all previous info from previous owner but I guess they over-looked the apps.
Can someone advise and give me a step by step break down on how to do this? Remember, I have my own Apple ID but the apps were downloaded from a previous Apple ID account that is NOT mine but was on this system.
ThanksAnd thanks to you, HW.
I see you got one quick answer. But you need more.
Leave it until your post sinks near the bottom of the list then revive it by writing to your own post ... say, 'can anyone add to these answers?' It's Sunday morning! -
Capturing "Actual Amounts" from previous years
Hi Experts,
We had earlier developed a report to produce a list of projects which can be changed from status TECO to CLSD. If the project cannot be closed then the corresponding reason for failure should be displayed.
Now the problem is that there were some direct costs which were booked under certain WBS elements. These elements were created in the previous year & haven't been settled in that year. Our present program isn't able to capture & display these costs in the current year. We have based our logic up on a join of table COBK with tables COEP, PROJ & PRPS. We are referring to the SAP standard TCODE s_alr_87013533 which is able to find the unsettled dollars (Actual amount) even from previous years. Anyone please help advise as to how we can even capture the actual amounts from previous years.
Regards,
Uday
Our inner join statement is as shown below:
SELECT coep~objnr coep~wogbtr coep~megbtr coep~wrttp coep~kstar
coep~owaer coep~vrgng coep~sgtxt coep~ebeln coep~ebelp
coep~objnr_n1 coep~belnr coep~gjahr coep~perio
cobk~blart cobk~refbn cobk~refbk cobk~refgj
INTO CORRESPONDING FIELDS OF TABLE tb_actual
FROM coep INNER JOIN cobk ON cobk~kokrs = coep~kokrs AND
cobk~belnr = coep~belnr
INNER JOIN prps ON coep~objnr = prps~objnr
INNER JOIN proj ON proj~pspnr = prps~psphi
WHERE proj~pspnr = wa_proj-pspnr "project definition
AND prps~pspnr = wa_prps-pspnr "WBS element
AND prps~belkz = c_x "Account assignment
AND coep~wogbtr <> 0 "amount
AND coep~lednr = c_00 "Ledger (needed to hit index)
AND coep~wrttp IN (c_04, c_11) "actual value type - real & stat
AND coep~beknz IN r_beknz. "D/C Ind <> Settlementbased on the data provided -
I-001688
Cost line 7143.28 71710000
Cost line 42874.74 73120000
Cost line 22752.77 73120000
TOTAL COST 72770.79
Settlement line 65627.51 81650000
Settlement line 7143.28 81650000
TOTAL SETL 72770.79
you should be able to set CLSD to this project as there is no unsettled value in the project
CJI3 report confirms that there is no outstanding settlement and hence project can be set to CLSD. This report shows all the line items against project
The report S_ALR_87013533 shows the actual cost incurred in the project, but not settlement. This does not mean that the project is unsettled.
see another report (project cost element report) - that might help you S_ALR_87013542
Maybe you are looking for
-
I sent my iphone in for repair and the status was canceled repair request.
I sent my iphone 3GS in for repair and when I checked on the status of the repair, it said repair request canceled. Does this mean it has been fixed and on its way back or they are sending a new one back? I am confused.
-
Dynamic structure handling in PI
Hi All, Here is the detailed description of the issue I am facing in PI for dynamically handling receiver structure change. Sender : GIS (Through Web Service) Receiver: SAP ( ABAP Proxy ) Interface : Synch Equipment and Functional Location will be se
-
When to clone both appl and Db.
Hi, I have 10g DB and R12.0.6 ebs PROD we use to clone TEST instance as of PROD when developers or consultants request for a TEST instance same as PROD. My Question is. What are the scenario in which : 1)I need to clone only DB and just run autoconfi
-
SRM 7. 0 with ECC 6.0 Enhancement Pack
1) My client just upgraded their R/3 to ECC 6.0, but no Enhancement Pack. 2) They are trying to upgrade from SRM 5.0 to SRM 7.0 in the near futures. 3) During their first SRM phase, their scenario is limited to the following: a. R/3 RFQs are pushed t
-
After Effects (v 12.2.0.52) warning: unable to create font
Hi, I just installed After Effects 12.2.0.52 and get the error message: "After Effects warning: unable to create font." I'm running Windows 8 on a mac. I've looked in the forum but it seems like this issue should be resolved in the new update but for