Hi!
My name is François
I was wondering if you knew anyone who can help me with a Script, I’ve tried different ways to make a script to run a folder item, off the desktop, select, copy to a File maker Folder.
I’ve tried Finder applications and also Safari app.
What it al concerns,
I’ve downloaded 28 thousands song text into a Folder on the desktop, including 1268 subfolders each containing songs of different authors. I want to copy each and everyone documents into a FileMaker Folder as text.
Most of the work has to be done at the Finder level. Has anyone any idea why i c’ant open folder files, folder item at the finder level?
If you d’ont mind a personal reply, i’d apreciate
e-mail address fboudreau1@hotmail.com
Thanks for taking time to read and answer my e-mail
Sincerely yours
François Boudreau
Model: i Mac
AppleScript: 2.0 (v43.1)
Browser: Safari 125
Operating System: Mac OS X (10.3.9)
Not without seeing some AppleScript, fboud. Folder actions, set up correctly, work in Finder windows, not just on the folders themselves. Scripting the Finder can be confusing, but small difficulties can be fixed. Post something and ask why it doesn’t work.
Thanks for taking time to read me, i’d definiteley appreciate any help i can find.
The problem seem to find the proper terms to describe the object within the folder. I’ve tried, item, file, record, get folder content, get specified finder items,document files, but nothing worked.
The files to opened, were download from the net, and inserted in a sub-folder on the desktop.
Hope this can be of any help to find an answer to solve my script problem.
Sincerely yours François
Browser: Safari 312.6
Operating System: Mac OS X (10.4)
on adding folder items to this_folder after receiving added_items
-- where the variable this_folder can be whatever you like - it holds the path to the folder
-- added_items is a list of files or folders added to this_folder.
-- remember that 'added_items' is a LIST even for only one item.
-- if you change the name of an item, the folder action will regard it as a new item added,
-- so for a name change you have to move it to an enclosing folder first.
end adding folder items to
When you have put your code together, you save the script in the Folder Actions folder of your Scripts folder. If there isn’t one there, then go to yourDisk:Library:Scripts:Folder Actions: and run ‘Configure Folder Actions’ (or the equivalent if your setup is not English). Now put the folder to which you want to attach the action where you want it, and then control-click or right-click on it and you will see a contextual menu item “Configure Folder Actions”. Pick that. Add your folder to the left pane and your action script to the right. Done.
Hi!
My name is François
Following the previous questions, here is what i have as a script, there are still actions not getting target.
tell application “Finder”
activate
open folder “MIREILLE MATHIEU” of folder "ARTISTE 2006 " of folder “Desktop” of folder “francoisboudreau” of folder “Users” of startup disk
end tell
=============================================
tell application “Finder”
activate
“File”
choose color label
"red "
end tell Here ( didn"t find te way to apply colour to file name)
=============================================
Begin loop
=============================================
tell application “Finder”
activate
open first item of folder “MIREILLE MATHIEU” of folder "ARTISTE 2006 " of folder “Desktop” of folder “francoisboudreau” of folder “Users” of startup disk
end tell
=============================================
tell application “Finder”
activate “File”
choose color label "blue "
end tell Here ( didn"t find te way to apply colour to file name)
=============================================
tell application “Finder”
activate “Finder preferences”
end tell
tell application “Finder”
applybluecolor to “label index”
end tell
=============================================
tell application “Safari”
activate “menu BAR”
activate “EDIT”
activate “select all”
activate “EDIT”
activate “COPY”
end tell Here ( copy wont " copy" text from Safari document)
=============================================
tell application “Safari”
activate
close window 1
end tell
=============================================
tell application “Finder”
activate application “FileMaker Pro”
end tell
tell application “Finder”
activate “menu BAR”
activate file “FM.MUSIQUE 1 .fp7”
open file “FM.MUSIQUE 1 .fp7”
end tell
=============================================
SELECT “RECORD” (here can’t get “FILEMAKER” to select and open Next record)
=============================================
tell application “FINDER”
activate “menu BAR”
activate “EDIT”
activate “PASTE”" in file maker
end tell
=============================================
tell application “Finder”
activate
open second item of folder “MIREILLE MATHIEU” of folder "ARTISTE 2006 " of folder “Desktop” of folder “francoisboudreau” of folder “Users” of startup disk
end tell
=============================================
end loop
end tell
=============================================
=============================================
If you have any ideas or ways to fix these script problems i’d ppreciate any help
Sincerely yours
François
You get the how to by reading dictionaries in the Script Editor. Examples:
-- To open a Finder window for a folder on the desktop:
tell application "Finder" to open alias ((path to desktop folder as text) & "folderName:")
-- there are a large number of 'path to' in the Standard Additions Dictionary for a list.
-- to set the label color on a file whose path is F (an alias to the file)
tell application "Finder" to set label index of F to k -- where k is a number from 0 to 7
-- the colors are 0 for none, and the others as set in the Labels pane of the Finder Preferences
-- to find files with a specified label color in a Folder, F (an alias)
tell application "Finder" to set redFiles to files of F whose label index is 2
-- to get the text from a Safari document (frontmost)
tell application "Safari" to set S to text of document 1
Hi! my name is François
Thanks a million for the help, i’ll try to put it in application. You’ll have to excuse me for the delays, I’m a newby in the script domain, so it’s a long process just to pass from one to onather. I should have done this 8 months ago, maybe i’d be through today with my project.
Sincerely yours
François