cloneryan02 Posted September 23, 2016 Share Posted September 23, 2016 display dialog "*Welcome to ISpammer! - Version 1.1.3*" & return & "--Note-- This version only works with AT&T Phone Numbers." & return & return & "Before we begin, We need to know if you want to spam anybody, or somebody specific. Phone Numbers ONLY." buttons {"Cancel Actions", "Spam Anyone", "I have a specific number."} default button 1 set the button_pressed to the button returned of the result if the button_pressed is "Cancel Actions" then return else if the button_pressed is "Spam Anyone" then display dialog "What will the message say?" default answer "Congrats! You just won a new IPhone! Enter the following code to collect your prize! 1jfjq19r929488dj" buttons {"Cancel", "Next"} default button 2 copy the result as list to {text_returned2, button_pressed2} set x to button_pressed2 if x is "" then display dialog "Sorry, but message content is required to continue. The app will now restart." buttons {"Ok"} default button 1 return end if set recipientName to "Victim" set theSubject to "." set theContent to x display dialog "How many messages will be sent?" default answer "10" buttons {"Cancel", "Next"} default button 2 copy the result as list to {text_returned_NU, button_pressed3} set y to button_pressed3 if y > 5 then display dialog "Sorry, but for testing purposes only, this option has been restricted to a maximum message load if 5. This restriction will be removed in the future." & return & return & "The application will now quit. Sorry, but this application cannot restart itself. I will try to fix this in the future." buttons {"Quit"} default button 1 return else if y < 1 then display dialog "Sorry, but " & y & " is not a valid message load. You must send a message load of atleast 1." & return & "The application will now quit. Sorry, but this application cannot restart itself. I will try to fix this in the future." buttons {"Quit"} default button 1 with icon 2 return end if display dialog "Review the spam information." & return & theContent & return & return & "This will be done " & y & " times." buttons {"This isnt right.", "This looks good. Lets start it."} copy the result as list to {text_returned3} if the text_returned3 is "This isnt right." then else if the text_returned3 is "This looks good. Lets start it." then display dialog "Ok. If your messaging serverice doesn't deliver the messages, its probably because the Phone Number Generator isn't exactly top of the line. Just hit OK to continue, or hit CANCEL to stop actions." repeat y times tell application "Mail" set recipientAddress to "719" & (random number from 0 to 9) & (random number from 0 to 9) & (random number from 0 to 9) & (random number from 0 to 9) & (random number from 0 to 9) & (random number from 0 to 9) & (random number from 0 to 9) & "@txt.att.net" as rich text ##Create the message set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true} ##Set a recipient tell theMessage make new to recipient with properties {name:recipientName, address:recipientAddress} ##Send the Message send end tell end tell end repeat end if else if the button_pressed is "I have a specific number." then display dialog "What is the phone number you want to spam?" default answer "Ex; 1234567890" buttons {"Cancel", "Next"} default button 2 copy the result as list to {text_returned1, button_pressed1} display dialog "The phone number recieving the message is " & button_pressed1 & "@txt.att.net" set recipientAddress to the button_pressed1 & "@txt.att.net" display dialog "What will the message say?" default answer "Congrats! You just won a new IPhone! Enter the following code to collect your prize! 1jfjq19r929488dj" buttons {"Cancel", "Next"} default button 2 copy the result as list to {text_returned2, button_pressed2} set x to button_pressed2 if x is "" then display dialog "Sorry, but message content is required to continue. The app will now restart." buttons {"Ok"} default button 1 return end if set recipientName to "Victim" set theSubject to "." set theContent to x display dialog "How many messages will be sent?" default answer "10" buttons {"Cancel", "Next"} default button 2 copy the result as list to {text_returned_NU, button_pressed3} set y to button_pressed3 if y > 3 then display dialog "Sorry, but for testing purposes only, this option has been restricted to a maximum message load if 3. This restriction will be removed in the future." & return & return & "The application will now quit. Sorry, but this application cannot restart itself. I will try to fix this in the future." buttons {"Quit"} default button 1 return else if y < 1 then display dialog "Sorry, but " & y & " is not a valid message load. You must send a message load of atleast 1." buttons {"Quit"} default button 1 with icon 2 return end if display dialog "Review the spam information." & recipientAddress & return & theContent & return & "This will be sent " & y & " times." buttons {"This isnt right.", "This looks good. Lets start it."} copy the result as list to {text_returned3} if the text_returned3 is "This isnt right." then else if the text_returned3 is "This looks good. Lets start it." then display dialog "Ok. If your messaging serverice doesn't deliver the messages, its probably because the Phone Number Generator isn't exactly top of the line. Just hit OK to continue, or hit CANCEL to stop actions." repeat y times tell application "Mail" ##Create the message set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true} ##Set a recipient tell theMessage make new to recipient with properties {name:recipientName, address:recipientAddress} ##Send the Message send end tell end tell end repeat end if end if end end Alright, so I created a large amount of code in AppleScript and its very messy. If I could get someone to help me out by neatening it up, that would be absolutely amazing. Good luck! I've been told its a biiiiiiiiit long. Also, i'd like it to do EXACTLY THE SAME THING. I like it working like this. Quote Link to comment Share on other sites More sharing options...
mo-scellaneous Posted October 4, 2016 Share Posted October 4, 2016 Try breaking it up into sub routines http://www.macosxautomation.com/applescript/sbrt/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.