Modify iWeb pages to auto-start embedded music

May 15, '06 07:30:00AM

Contributed by: freddyg

Here is a fairly easy way to get iWeb to autoplay any song you have added to your site. The solution requires that you download and install TextWrangler, a great text editing app from Bare Bones. Mount your iDisk, open the Script Editor application, and Record the following steps:

  1. Launch TextWrangler.
  2. Select Find... from the Search menu.
  3. In the 'Search for' field at the top of the dialog, type autoplay=false.
  4. In the 'Replace with' field, type autoplay=true.
  5. Check the Multi File Search Box.
  6. Click the Other... button on the right-hand side
  7. Select your iWeb folder using the following path: iDisk/Web/Sites/iWeb.
  8. You might want to click the Saved Search Sources and choose Remember this Set. This helps for future reference, but is not necessary for the script.
  9. Hit the Replace All button.
  10. Hit the Proceed button in the dialog box that appears. I wouldn't recommend changing any of these settings.
  11. Hit Save when it replaces the found text in a webpage. The Save box will appear for each web page you have created with embedded music.
  12. When finished, Quit TextWrangler.
Back in Script Editor, you can stop recording, and save the script. Save it as an application to enable double-clicking from the Finder. You can now double-click the script to autoplay whenever you republish using iWeb.

BTW, you might want to run TextWrangler first once you download it to register and install all of its components. Then you can quit it and run the Script Editor.

Hopefully this will help some people, and you can obviously customize the Find command to do a whole lot more. I just wanted songs to autoplay.

Comments (18)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060510214415718