I am attempting to script a photo proscessing workflow from the finder, through a non-AppleScript complient application then to Portfolio, then to Photoshop and finally back to the finder for storage. Some may call me a fool for taking this on as a first project but I call it just plane fun! AppleScript is a great application.
Anyway, one of the areas I’m struggeling with is using the GUI to “push,” “click,” “press,” “perform action,” or otherwise “activate” a button, in a window of the nonscriptablr app. I’ve even tried “set enabled button to true”. I’ve used the UI Browser app and UIElementInspector to try to pry open the secrets of activating this stupid little button, but so far… no luck.
So I am looking for suggestions.
tell application “Finder”
activate
–This selects and opens the files.
select every file of folder (alias “Scott’s HD:Users:ssmi:Desktop:Scripting Stuff:Test:”)
tell application “System Events”
tell process “Finder”
tell menu bar 1
click menu item “Open” of menu “File”
end tell
end tell
end tell
end tell
activate application “RAW FILE CONVERTER EX”
tell application “System Events”
tell process “RAW FILE CONVERTER EX”
click button 2 of window 1 – this should tell the individual files to open within the application.
end tell
end tell
Thank you for your response and for the shorten version of the script. Being new to scripting I guess I tend to make things harder than they need to be.
The software I’m having difficulty manipulating is FujiFilms RAW file converter EX. It is shipped as a helper application for their FinePixViewer software. I don’t believe there’s any demo version available.
I have a FinePix A-303, but I can’t remember where is my CD-ROM (as I never used FinePix Viewer, btw), so I can’t pick the 2.0 updater…
Anyway, what is the function of this app? Whatever is it, could it be done with PhotoShop? (or Image Capture Scripting, GraphicConverter, ImageMagick…) Perhaps you could use a different approach for this task…
I could use an alternative application (like Photoshop) except that the CCD sensor array of the Fuji SR2 pro digital camera is octagonal. You “can” import the captured RAW files into other tools but, most application import filters are based on the more standard rectangular array. You can lose a significant amount of information not using Fuji’s tools.
I don’t know if this would help but, UI Browser tells me;
application “RAW FILE CONVERTER EX”
window “RAW FILE CONVERTER EX” (1)
button “Queue the CCD_RAW file” (2)
Has the following attribute - Type - Value
0 children - array - (array of 0 items)
1 enabled - boolean - false
2 parent - UIElement - window “RAW FILE CONVERTER EX”
3 position - point - (561, 72) x, y
4 role - string - AXButton
5 role descript - string - “button”
6 size - size - (183, 20) width, height
7 title - string - “Queue the CCD_RAW file”
8 window - UIElement - window “RAW FILE CONVERTER EX”
What does it happen when you click the “Perform” button in UI Browser? (being selected the “press” action of such button) → your code should work fine, btw…
Then perhaps it’s not a UI-Scripting compliant app… Hmmm… Perhaps there is a menu item equivalent for this button? You could try activating the app, then clicking the menu equivalent (if it does exist), or perhaps performing a keystroke equivalent (???)