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.
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!!
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.
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!!
Thx a lot bruce!!!
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!!!