Help with clean program...

Hello, I would like to make a program in AppleScript that does the following (please do it all in code, not code and pre-set functions like in Automator. Thanks!)

Here is what I want the app to do:

I want to have the app go into the: Documents, iTunes Music, Movies (iMovie projects), and the desktop, and I want it to move all files and folders from those folders, put the files and or folders onto the desktop. And then move the files from the desktop to the trash and empty the trash.

I want the app to run in the background so it doesn’t show up on the dock and can not be quit.

I also want to make the app display a window with the yellow triangle with the “!” mark and I want it to display A LOT OF TEXT (more than the “display dialog” function). I will add my text on my own. I want it to show up with only 1 button (says, “Understood”) that you have to click once, and then it pops up one more time and you have to click it one more time.

Please help. All questions will be answered to my best ability.

Thanks!

Sounds like you’re either getting ready to sell this machine or you intend a really dirty trick. Because you want to run in the background, etc., I suspect the latter. No dice.

Im not selling my computer, and it’s no trick. I am running this on a public computer so that after every log in the computer desktop, documents, ect… are all fresh and ready for the next user and the computer is running at top speed.

Benjamin

Can you use the Guest login, Is that not supposed to do what you want.
The only thing would be getting the message popup

Good idea, however, it doesn’t do everything I want…

Thanks!

I found this, not sure if it will work for you,
customize-the-guest-user-account-in-os-x

admins tools webpage

And also you can use “choose from list” to get a big display of words.

With it you will always have two buttons not one.
And you will need to format the text so each line is not too long, as it will use the longest line to fix the width.
To help, can do a find and replace with
Example.

        Find: .

Replace with: .\r

set aList to paragraphs of "
If you are new to this forum, we understand you may not be able to phrase your question well because you don't know the terminology.
 One great feature of this bbs, however, is that we're interested in attracting new scripters; we won't flame you, but you probably won't get an answer if we don't understand your question.
 In short, help us help you by following this simple guide.
 

The very best way to get a response is to obey these short, but fundamental rules:

Search First: Use the search button.
 Your issue may potentially have been covered previously.
 We also urge you to search ScriptBuilders, Code Exchange
 or the AppleScript FAQ.
 The idea you're looking for may already exist.


Think It Through: Take some time to look over exactly what the parameters are; the filenames involved, and the specific issues you're experiencing.
 A well thought out post whose words are carefully chosen will get more response than a frantic cry for help that only the person posting can understand.
 In short, be sure you list out what it is you want to accomplish.
 

If you need help with a script, you should post the overall goal as well as the piece you're trying to work out.
 If you have already written some script but can't get it to work or compile properly, don't hesitate to include it.
 No one here will sneer or laugh; you'll get corrections or questions.


Choose An Appropriate Forum; Post to the appropriate forum category.
 Forum Categories are clearly marked.
 Obviously, if you're running OS X, you wouldn't post to the Mac OS 9 forum.


Give Your Topic A Proper Name: Be descriptive of the problem.
 The Topic is what everyone sees first, so ensure you name it appropriately! Telling us you're new to AppleScript, or naming your topic \"
Can this be done?\"
, \"
HELP!\"
 or \"
911\"
 doesn't help us help you.
 It will even reduce the chance of someone replying to your post.
 It's much better to ask: \"
How do I .
\"

Posting Etiquette; It is considered proper etiquette to make use of the scripting centric features this BBS provides.
 When posting code, always ensure you compile in your editor (if possible), click the AppleScript BBCode button and paste your code between the brackets.
 The system will natively render it, as well as automatically generate the Applescript Protocol link for others to use.
 Aside from making your code easier to read, it expedites the process of helping solve your problem.

Treat Others As You Deserve To Be Treated: We have strived to provide an environment conducive to scripting; where everyone can enjoy an excellent community
 of wonderful people; who have a genuine desire
 to give back to the community by helping you.
 Please treat others as you would want to be treated.
 This is a zero-tolerance board.
 Flames or slamming someone for posting code, which they have genuinely felt worthy, is never tolerated and most likely will result in suspension.

Proffer Your Project: This is important.
 Once you have found a solution to your issue, given your GUI polish, and engineered a Read Me which fully describes your project, we urge you to post your script to Code Exchange
 as a formal solution, or to ScriptBuilders as a package.
 At the very minimum, post a full 'fixed' solution back to your thread.
 By doing so you're coming full circle by giving back to the community which helped get you there.

If you are new to this forum, we understand you may not be able to phrase your question well because you don't know the terminology.
 One great feature of this bbs, however, is that we're interested in attracting new scripters; we won't flame you, but you probably won't get an answer if we don't understand your question.
 In short, help us help you by following this simple guide.
 
The very best way to get a response is to obey these short, but fundamental rules:

Search First: Use the search button.
 Your issue may potentially have been covered previously.
 We also urge you to search ScriptBuilders, Code Exchange
 or the AppleScript FAQ.
 The idea you're looking for may already exist.

Think It Through: Take some time to look over exactly what the parameters are; the filenames involved, and the specific issues you're experiencing.
 A well thought out post whose words are carefully chosen will get more response than a frantic cry for help that only the person posting can understand.
 In short, be sure you list out what it is you want to accomplish.
 
If you need help with a script, you should post the overall goal as well as the piece you're trying to work out.
 If you have already written some script but can't get it to work or compile properly, don't hesitate to include it.
 No one here will sneer or laugh; you'll get corrections or questions.

Choose An Appropriate Forum; Post to the appropriate forum category.
 Forum Categories are clearly marked.
 Obviously, if you're running OS X, you wouldn't post to the Mac OS 9 forum.

Give Your Topic A Proper Name: Be descriptive of the problem.
 The Topic is what everyone sees first, so ensure you name it appropriately! Telling us you're new to AppleScript, or naming your topic \"
Can this be done?\"
, \"
HELP!\"
 or \"
911\"
 doesn't help us help you.
 It will even reduce the chance of someone replying to your post.
 It's much better to ask: \"
How do I .

Posting Etiquette; It is considered proper etiquette to make use of the scripting centric features this BBS provides.
 When posting code, always ensure you compile in your editor (if possible), click the AppleScript BBCode button and paste your code between the brackets.
 The system will natively render it, as well as automatically generate the Applescript Protocol link for others to use.
 Aside from making your code easier to read, it expedites the process of helping solve your problem.

Treat Others As You Deserve To Be Treated: We have strived to provide an environment conducive to scripting; where everyone can enjoy an excellent community
 of wonderful people; who have a genuine desire
 to give back to the community by helping you.
 Please treat others as you would want to be treated.
 This is a zero-tolerance board.
 Flames or slamming someone for posting code, which they have genuinely felt worthy, is never tolerated and most likely will result in suspension.

Proffer Your Project: This is important.
 Once you have found a solution to your issue, given your GUI polish, and engineered a Read Me which fully describes your project, we urge you to post your script to Code Exchange
 as a formal solution, or to ScriptBuilders as a package.
 At the very minimum, post a full 'fixed' solution back to your thread.
 By doing so you're coming full circle by giving back to the community which helped get you there.

If you are new to this forum, we understand you may not be able to phrase your question well because you don't know the terminology.
 One great feature of this bbs, however, is that we're interested in attracting new scripters; we won't flame you, but you probably won't get an answer if we don't understand your question.
 In short, help us help you by following this simple guide.
 
The very best way to get a response is to obey these short, but fundamental rules:

Search First: Use the search button.
 Your issue may potentially have been covered previously.
 We also urge you to search ScriptBuilders, Code Exchange
 or the AppleScript FAQ.
 The idea you're looking for may already exist.

Think It Through: Take some time to look over exactly what the parameters are; the filenames involved, and the specific issues you're experiencing.
 A well thought out post whose words are carefully chosen will get more response than a frantic cry for help that only the person posting can understand.
 In short, be sure you list out what it is you want to accomplish.
 
If you need help with a script, you should post the overall goal as well as the piece you're trying to work out.
 If you have already written some script but can't get it to work or compile properly, don't hesitate to include it.
 No one here will sneer or laugh; you'll get corrections or questions.

Choose An Appropriate Forum; Post to the appropriate forum category.
 Forum Categories are clearly marked.
 Obviously, if you're running OS X, you wouldn't post to the Mac OS 9 forum.


Give Your Topic A Proper Name: Be descriptive of the problem.
 The Topic is what everyone sees first, so ensure you name it appropriately! Telling us you're new to AppleScript, or naming your topic \"
Can this be done?\"
, \"
HELP!\"
 or \"
911\"
 doesn't help us help you.
 It will even reduce the chance of someone replying to your post.
 It's much better to ask: \"
How do I .

Posting Etiquette; It is considered proper etiquette to make use of the scripting centric features this BBS provides.
 When posting code, always ensure you compile in your editor (if possible), click the AppleScript BBCode button and paste your code between the brackets.
 The system will natively render it, as well as automatically generate the Applescript Protocol link for others to use.
 Aside from making your code easier to read, it expedites the process of helping solve your problem.

Treat Others As You Deserve To Be Treated: We have strived to provide an environment conducive to scripting; where everyone can enjoy an excellent community
 of wonderful people; who have a genuine desire
 to give back to the community by helping you.
 Please treat others as you would want to be treated.
 This is a zero-tolerance board.
 Flames or slamming someone for posting code, which they have genuinely felt worthy, is never tolerated and most likely will result in suspension.

Proffer Your Project: This is important.
 Once you have found a solution to your issue, given your GUI polish, and engineered a Read Me which fully describes your project, we urge you to post your script to Code Exchange
 as a formal solution, or to ScriptBuilders as a package.
 At the very minimum, post a full 'fixed' solution back to your thread.
 By doing so you're coming full circle by giving back to the community which helped get you there.
"


choose from list aList cancel button name "Understood" OK button name "Understood"


Hi,

display dialog can display a hugh amount of text


display dialog "Hello, I would like to make a program in AppleScript that does the following (please do it all in code, not code and pre-set functions like in Automator. Thanks!)

Here is what I want the app to do:

I want to have the app go into the: Documents, iTunes Music, Movies (iMovie projects), and the desktop, and I want it to move all files and folders from those folders, put the files and or folders onto the desktop. And then move the files from the desktop to the trash and empty the trash.

I want the app to run in the background so it doesn't show up on the dock and can not be quit.

I also want to make the app display a window with the yellow triangle with the \"!\" mark and I want it to display A LOT OF TEXT (more than the \"display dialog\" function). I will add my text on my own. I want it to show up with only 1 button (says, \"Understood\") that you have to click once, and then it pops up one more time and you have to click it one more time.

Please help. All questions will be answered to my best ability." buttons {"Understood"} default button 1 with icon 2
display dialog "Go" buttons {"Cancel", "Understood"} default button 2 with icon 2

to delete the files I recommend to use the shell command rm, it deletes files and folders immediatiely without any “detour” (desktop or trash)

Hi stefan,
display dialog can display a lot of text, but it is limited to the depth of your screen and wraps the text to about 7 - 8 words across, It will not give you a scroll bar. So any text that falls below its bottom margin, does not show.

With display dialog this is all you see from the text in my post.

Just tested the Admin tools.
I saved the script I post as an application and added it to my Applications folder. (open and run it once, so the system
recognises it as ok to run)

In Workgroup manager I went to View menu and selected Show records
This needs to be done to show the Guest login in 10.6.2
( by the way do not use Guest login for snow leopard below 10.6.2, or you may be hit with a bug that delete YOUR user data. This is reported Fixed with 10.6.2)

I went to the preference part as described in the webpage.
But I went to Login instead of the Dock.

I selected the tab items and then ticked always
I clicked the add button to add the app.

Applied the changes. And quit.

When I went logged into the Guest User. The Dialog popped up.

**Edit
I would back you mac up, before you use the Guest User.
I just logged out and got a Blue screen. To say I Sh*t myself is an understatement.
I had to hard reboot. Luckily everything came back. Using Time Machine NOW.

not applescript and not free, but deepfreeze for my Mac will do all this for you. Allows you to let the user be free, installs, personaliztion etc and on reboot jumps back to a save point.

http://www.faronics.com/html/deepfreeze.asp

Thanks, I guess.

Best,

Ben