Pretty Self explanatory. I want to Click one program, and have that program and another open at the same time. In my case, When I open iTunes, I want Bowtie to open also.
Create a simple AppleScript that will open both and run that instead of iTunes.
Alright... do you happen to know what that script is? I tried to search and post a topic elsewhere in this forum asking for such a script and I got no answers
Yes, but think how more satisfying it would be for you to do a tiny amount of research and work it out for yourself. The most basic of AppleScript will activate (this word is itself a hint) and application.
A very quick Google search brings up this tutorial.
GreatI'm happy that you've both got what you wanted working and learnt something too
![]()
on idle
tell application "System Events"
set x to the number of processes
repeat with n from 1 to x
if (name of process n) is "iTunes" then
tell application "Bowtie" to activate
end if
end repeat
end tell
end idle
The problem with your question is that you're heading toward an idle script and AppleScript just doesn't handle those very well (unless you've got a fairly decent processor, and even if you do, you might not be happy with the performance).
Essentially, you'll create a script that says something like:
Code:on idle tell application "System Events" set x to the number of processes repeat with n from 1 to x if (name of process n) is "iTunes" then tell application "Bowtie" to activate end if end repeat end tell end idle
I don't have Bowtie loaded so I can't test this.
And I couldn't find a simpler way of assuring that iTunes was working without testing the name of each process.
This will run every 30 seconds.
mt