Install & Setup using applescript

hello,
I need to transform these actions into applescript automated action:
1 Open/Unzip the file named “X”
2 Install a package named “Y” using the Installer application.
3 Move the file “X” to the specific location: /HardDisk/username/Public/
4 open the text file named: httpd.conf"
5 search for a sentence containing: document root and replace it with another sentence then save.

i really need your help here guys…!!

tony.

guys why i am not getting any help!!!
i am unexperienced in apple script and i really have to write this script…i just need an example or a hint.,anyone please!!

I think your request has two problems:

  1. Folks here are willing to help, but not willing to write your script for you from scratch.

  2. No one will want to fiddle with their own httpd.conf file in a “do shell script…” context to test a solution before posting it.

Not to get religious, but didn’t somebody somewhere say:

“God helps those who help themselves”

Anyway, you might want to look in to creating a new package with all of your necessary “post-install” scripts included. You can find info at Apple Dev: http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_install_quick_look.html This will resolve any user interaction that might popup while running an installer, wait times, etc.

As far as writing the scripts to include with this new package, I would do a search on these forums for: “Moving Files”, “Open files for writing”, and “Find and Replace”.

If all else fails, and you are as inexperienced as you say, you might want to find a commercial developer.

Good Luck

-N

ok thx a lot for the help nedloh99!!
i ll try my best!! it is just that i wanted to start somewhere…!
I am sorry if i did disturb anyone!!
ciao

Don’t worry, you’re not - it’s actually a (mis)quote from Aesop’s Fables. :slight_smile:

i got somewhere guys with my script…i wasnt that hard after all…i just have a final step that is just not working…:/!!!
so i can now open any text document and edit it…but i cannot save it, Here’s the script:

set new_file to alias (("RDServer HD:Users:admin:Desktop:testing.txt") as Unicode text)
set AppleScript's text item delimiters to ""
set AppleScript's text item delimiters to "good"
set text_items_of_new_file to text items of (read new_file) --A list that contains 2 chunks of text: Everything before the original line, and everything after
set AppleScript's text item delimiters to "moody"
set NEW_new_file to text_items_of_new_file as Unicode text --New text for your new conf file

I tried to save New_new_file in alias ((“RDServer HD:Users:admin:Desktop:testing.txt”) as Unicode text) but it didnt work…any suggestion…!!!:D!!

Look for the “File Read/Write” suite in Standard Addition’s dictionary.

Thx a lot bruce!!!:slight_smile:
now i can edit any text and save it…but it is not refreshing…which means that i can do the change one time only…do u know how i can refresh the thing…so that it would do as if it was the first run…
I dont know if i explained well…anyways thx a lot!!!