Repeat an action set in Photoshop - adobe

I have an action set in Photoshop that I would like to repeat infinitely.
As the image below, the action set runs 8 batch processes and then ends.
Is it possible to run the action set (F8) automatically again after the last script in the action set has completed?
I have considered using a .bat file to press F8 and use a JSX to call that BAT file at the end of the action set, however, I cannot get this to work so far.
Any help is really appreciated.

Related

tSQLt.run does nothing in one Query window but works in another

I have created 3 test classes.
I can, from one query window run the following for all test classes.
tSQLt.Run 'class1';
tSQLt.Run 'class2';
tSQLt.run 'class3';
But from all other query window, the calls above simply don't work.
So, to make sure I have a clean window, I put the focus on the query window where the calls work ... I hit CTRL+N to get a new windows, same user, same database, and I type tSQLt.Run 'class1', hit F5 and the little green spinner with "executing query" is visible at the bottom and it looks like it will keep spinning for a long long time.
Anyone available to help out on this.
Regards,
Bertin
There probably was a running transaction. I closed everything and re-opened SSMS ... things are back to "normal".
Thanks,
Bertin

SAP GUI script for information window

I need to get this window to click on the continue button if it pops out when no data is changed and continue with the next cell
You need to use something like this...
Note: you need to change this "wnd[1]/usr/tblSAPLV14ATCTRL_D0102" with the script you recorded.
If Not session.findById("wnd[1]/usr/tblSAPLV14ATCTRL_D0102", False) Is Nothing Then
session.findById("wnd[1]/tbar[0]/btn[24]").press
End If

Maxscript, backburner rendering renderElements

I have made a script that takes files from directory, and sends them to backburner for network rendering. When I run the script it renders fine but without the render elements they dont show in the backburner monitor nor do they save.
If I open some of the files manualy and send them to render with backburner it works fine, but not with the script?
The render element is VrayAlpha, but I dont think it matters.
This is the code Im using
on btnRender pressed do
(
outputFilesDir = textModelsOut.text + "*.max"
toRender = getFiles outputFilesDir
man = NetRender.GetManager()
man.connect #automatic "255.255.255.0"
man.GetControl()
for s in toRender do
(
renderModelPath = getFilenamePath s + filenameFromPath s
job = man.newJob file:renderModelPath
job.Submit()
)
man.Disconnect()
)
And this is quote from maxscript documentation, it says that render element data will not be available but it will be processed.
Jobs can not have maps included, and render element data will not be
available for submitted job but render elements will process
correctly. These problems are resent when submitting a job from a
file, but not when submitting the current scene.
Anyways my solution was to use job.newJob() to open each scene and submit the current scene.
You should always include your code (or at least some of it) so that we can check it for issues and test it our selves.
However, I usually use a struct called NetRenderAutomation, developed by Gravey.
You can find it here:
http://forums.cgsociety.org/showthread.php?f=98&t=1059510&page=1&pp=15
I haven't had any problems with it, and it is fairly easy to use, and you are even allowed to modify it, if you need some special features for your self.
Hope you can use the answer.
Else feel free to post some code, and I'll look into it.

How to Right click of File in Windows Explorer by AutoIt

I wish to simulate a right click on a file. This is done by opening a Windows Explorer window and then right clicking on it.
The main issue is finding the location of the file in Windows Explorer. I am currently using Autoit v3.3.8.1.
My code 's first line:
RunWait (EXPLORER.EXE /n,/e,/select,<filepath>)
The next step is the problem. Finding the coordinates of the file.
After that, right clicking at that coordinates (it seems to me at this time) is not a problem....
Some background:
OS: Windows 7 64-bit
Software Languages: C#, Autoit (for scripting)
The Autoit script is called by a code similar to that below:
Process p = new Process();
p.StartInfo.FileName = "AutoItScript.exe";
p.StartInfo.UseShellExecute = false;
p.Start();
The code is compiled into a console class file which is run at startup. The autoit script runs as the explorer window opens up.
It seems as though you are taking the wrong approach to the problem, so I'll answer what you are asking and what you should be asking.
First up though, that line of code is not valid, and is not what you want either. You want to automate the explorer window, and RunWait waits for the program to finish. Furthermore you want those items to be strings, that code would never work.
Finding the item in explorer
The explorer window is just a listview, and so you can use normal listview messages to find the coordinates of an item. This is done most simply by AutoIt's GUIListView library:
#include<GUIListView.au3>
Local $filepath = "D:\test.txt"
Local $iPid = Run("explorer.exe /n,/e,/select," & $filepath)
ProcessWait($iPid)
Sleep(1000)
Local $hList = ControlGetHandle("[CLASS:CabinetWClass]", "", "[CLASS:SysListView32; INSTANCE:1]")
Local $aClient = WinGetPos($hList)
Local $aPos = _GUICtrlListView_GetItemPosition($hList, _GUICtrlListView_GetSelectedIndices($hList))
MouseClick("Right", $aClient[0] + $aPos[0] + 4, $aClient[1] + $aPos[1] + 4)
As has already been mentioned, sending the menu key is definitely a better way than having to move the mouse.
Executing a subitem directly
This is how it should be done. Ideally you should never need an explorer window open at all, and everything can be automated in the background. This should always be what you aim to achieve, as AutoIt is more than capable in most cases. It all depends on what item you want to click. If it is one of the first few items for opening the file in various programs, then it is as simple as either:
Using ShellExecute, setting the verb parameter to whatever it is you want to do.
Checking the registry to find the exact command line used by the program. For this you will need to look under HKCR\.ext where ext is the file extension, the default value will be the name of another key in HKCR which has the actions and icon associated with the filetype. This is pretty well documented online, so google it.
If the action is not one of the program actions (so is built into explorer) then it is a little more complex. Usually the best way will be to look at task manager when you start the program and see what it runs. Other things can be found online, for example (un)zipping. Actions like copy, delete, rename, create shortcut, send to... They can all be done directly from AutoIt with the various File* functions.
With more information, it would be possible to give you more specific help.
First, you might want to look at the Microsoft Active Accessibility SDK. In particular look at this interface...
http://msdn.microsoft.com/en-us/library/accessibility.iaccessible.aspx
You can use this to walk the items in the control and find the one with the file name you are looking for and its screen location.
From there, maybe try something like this for simulating the right click.
How can I use automation to right-click with a mouse in Windows 7?
Once you have done the right click, use accessibility again to find the right option on the context menu.
Maybe there's an easier way, you should be able to cobble something together like this if you don't find one. Good luck!
Suppose I have a file named test.txt on D drive. It needs to right click for opening Context Menu. To do this, the following code should work:
Local $filepath = "D:\test.txt"
Local $iPid = Run("explorer.exe /n,/e,/select," & $filepath)
ProcessWait($iPid)
Sleep(1000)
Send('+{F10}')

Opening a file using AutoIt

I am using an AutoIt script to automate my application. Following is the command which I am running:
FileOpenDialog ("File Upload", "C:\Documents and Settings\abhishek.kumar\Desktop\Quadrillion work", "Images (*.jpg;*.bmp)", "","WESTF12433.jpg","" )
Send("{ENTER}")
The first command works as it opens up the file open dialog with WESTF12433.jpg file as selected. Now I want to click on open button. How can I do it?
Send("{ENTER}") is not working.
Send is not a good method as it requires the window to be focused, which you can't guarantee. From what you have posted, I would say the best method would be this:
ControlClick("File Upload", "", "Button1")
Edit in response to comments:
Your problem: The fileOpenDialog is blocking execution. You need to think of it as though AutoIt Reads a line, Runs it, then reads the next.
In this case: AutoIt Reads line 1. It creates a FileOpenDialog and WAITS for you to close it. Once it as been closed it reads the next line, and runs that.
Try the following: Create two au3 files, and put the first line in 1.au3 and the second in 2.au3. Run them in that order and see what happens. Send will struggle as the dialog doesn't have focus, but the ControlClick versions should work.
You're not using FileOpenDialog() properly. Its purpose is to interact with the user. If you don't need that, there's no need for it in the first place.
All it does is return the name(s) of the selected files, which you defined already. Can't you just assign the file path to the variable from the start? As per Documentation - Function Reference - FileOpenDialog() :
Success: Returns the full path of the file(s) chosen. Results for
multiple selections are "Directory|file1|file2|..."
This will never work, because AutoIt is not multi-threaded.
Once you open the dialog, it pauses script execution until the user clicks ok, so a Send() function on the next line won't do anything until after.
What you can do is make another script, compile it, and run it just before you open the dialog.
Run("clickOpen.exe")
FileOpenDialog ("File Upload", "C:\Documents and Settings\abhishek.kumar\Desktop\Quadrillion work", "Images (*.jpg;*.bmp)", "","WESTF12433.jpg","" )
This is what would get executed:
WinWaitActive("File Upload")
Send("{ENTER}")
Simple as that! Hope it helps.

Resources