Switching through programs and renaming files

I posted this before on the os forum, but it seems kinda dead… :?
So I hope someone here can help me:

Ok, it’s easy to activate a program with applescript.
But is it possible with applescript to switch through programs?
is it also possible to rename files with applescript?

Kind of a vague question… do you mean sequentially? randomly? periodically? in any particular order? In general:

Sure:


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

well, sometimes I am working with 2 programs at the same time.
For example: making illustrations with Illustrator, and putting them into Quark.

I was wondering if it was possible to automaticaly switch through programs so that I don’t have to activate each one everytime I need it…

and with renaming files, is it possible to rename them by inserting a name?
because if you need to rename a couple of files with other names you will have to make different scripts for each file.

You don’t need no script at all to do this: just press Command+Tab to switch from one open app to another :wink:

I guess file-renaming is one of the most popular AS issues. If you do a research in the Script Builders section you will find a lot of solutions.

Hope it helps
Farid

The command I showed you simply takes a string argument as the new file name. While I used a literal string in the script you can use any standard AppleScript method of obtaining a string - ask the user, make one up, munge the existing name - the sky’s the limit. Since you were vague in your original question I did the best I could with the information available to me :slight_smile: