Jump to content

Search the Community: Showing results for tags 'applescript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • InsanelyMac Lounge
    • Front Page News and Rumors
    • Reader News and Reviews
    • Forum Information and Feedback
  • OSx86 Project
    • New Releases and Updates
    • New Users Lounge
    • Developers Corner
    • Tutorials (The Genius Bar)
    • Technical FAQ
    • Installation
    • Post-Installation
    • DSDT and SSDT
    • Hardware Components and Drivers
    • Desktops
    • Notebooks
    • Netbooks
    • Tablets
    • MacMod of the Month
    • Multi-booting and Virtualisation
  • International
    • Your Language
    • Deutsch
    • Español
    • Français
    • Italiano
    • Português
    • Русский
  • Apple World
    • Mac OS X
    • Apple Computers and Hardware
    • iOS Devices
    • Mac Applications
    • Mac Programming and Development
    • iOS Programming and Development
    • Mac Gaming
    • Mac Accessories
  • Discuss and Learn
    • Windows Discussion
    • *nix
    • Apple Opinions and Discussion
    • The Great Debates
    • Internet(s), Servers, and Networks
    • Buying Thoughts, Reviews, and Recommendations
    • Mods and Overclocking
    • The Big Issues [Real Life]
  • Everything Else
    • Creativity
    • Thunderdome (Random Stuff)
    • Laughs
    • The Marketplace

Categories

  • Kexts
    • Graphics Cards
    • Audio
    • LAN and Wireless
    • Other
  • Kernels
  • Bootloaders
  • DSDTs
    • Patches
  • Pandora
  • Apps
  • Miscellaneous
  • Customization

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 13 results

  1. midi-sama

    [Tool] [AppleScript] UPDD Tool

    Hi, I'm back again with another tool. As you may have seen in my thread, there is a Automator + AppleScript (thanks to @thanh) to make the reinstall/fix for UPDD, so I decided to make one application for everything with no hassle, however, since I'm not a programer, I'm just using AppleScript (for its fairly easy use and scripting). I want you to help me out to fix (also optimize and clean) this script to make it better. Here is the script: -- Start with a welcome screen + password set pwd to text returned of (display dialog ¬ "Hello there This is an AppleScript utility that will help you fix UPDD. First I need your password to continue working of this:" with title ¬ "UPDD Fix Script" with icon note ¬ default answer ¬ "" buttons {"Nope", "Continue ..."} ¬ default button 2 cancel button 1 ¬ with hidden answer) -- Now show dialog for choice set choice to (display dialog ¬ "Hello there, what do you wanna do?" buttons {"Reinstall UPDD", "Start UPDD with time fix", "Exit"} ¬ with title "What do you want to do?" cancel button 3) -- Choice selection if choice = {button returned:"Reinstall UPDD"} then -- Reinscall UPDD case display dialog ¬ "Are you sure you want to reinstall UPDD?" buttons {"No", "Sure"} ¬ default button 2 cancel button 1 set sure_inst to button returned of result -- Starting the install -- TODO: If Nope is selected, loop back to the dialog of choices if sure_inst = "Sure" then -- Install UPDD -- TODO: Add a "Working..." window WHILE it's installing set install_result to do shell script "installer -pkg /Library/UPDD_*.pkg -target /" password pwd with administrator privileges -- Show Install results + updd fix prompt display dialog install_result with title "Install Results" buttons {"OK, now UPDD fix", "OK, I'm done here"} cancel button 2 default button 1 -- UPDD Fix -- TODO: Same as the previous one tell application "UPDD Gestures" to quit saving no do shell script "/usr/sbin/systemsetup -setusingnetworktime off " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setdate '04:05:15'" password pwd with administrator privileges delay 2 tell application "UPDD Gestures" activate end tell delay 2 -- ERROR: for some reason, it may give an error. do shell script "/usr/sbin/systemsetup -setdate '10:12:16' " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setusingnetworktime on " password pwd with administrator privileges display notification "We're done." with title "We're all set." end if -- Done with UPPD Reinstall -- TODO: loop back to the choice menu else if choice = {button returned:"Start UPDD with time fix"} then -- UPDD Fix display dialog ¬ "This will bring back your maching clock back in 2015 then back to the actual internet time, this will momentally break some apps/connections (like synergy and maybe even some websites), make sure there are no active time-sensitive apps running if this can damage it or ruin your work" buttons {"Nope, stop", "OK, continue..."} default button 2 cancel button 1 with title "UPDD Rewind" set reupdd to button returned of result if reupdd = "OK, continue..." then -- TODO: Show a "Working..." window tell application "UPDD Gestures" to quit saving no do shell script "/usr/sbin/systemsetup -setusingnetworktime off " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setdate '04:05:15'" password pwd with administrator privileges delay 2 tell application "UPDD Gestures" activate end tell delay 2 do shell script "/usr/sbin/systemsetup -setdate '10:12:16' " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setusingnetworktime on " password pwd with administrator privileges display notification "We're done." with title "We're all set." -- TODO: loop back to the choice menu end if end if display dialog "Thank you for using this utility, please check insanleymac.com for more goodies!" buttons {"Thanks", "Get me to InsanelyMac"} with title "Thank you. We're done here." default button 1 cancel button 1 set done to button returned of result if done = "Get me to InsanelyMac" then open location "http://www.insanelymac.com/forum/" delay 1 end if Thanks for any help and feedback
  2. OK, so long story short, I'm trying to create a stress script for some work that script will play up to 12 quicktime videos at any one point. It can organise them all via tiles based on the # of windows and thats all fine. But I also want them to use quicktime x's presentation feature to set them all to full screen. I have a ghetto script that fullscreens them all very poorly, but I'd really prefer something more efficient, as well as getting them to close. currently the script that I've been trying to use looks like this Ok..well posting code doesn't seem to work..lame so here: http://pastebin.com/Nz3mwDLx This doesn't open every single window after window 6-9 depending I know that using document ID's like this must be inefficient, and creating variables in this obtuse way must not be very clean. using quicktime x and 10.8 (but this should work in 10.7 for sure. thanks for the help.
  3. Note: This thread could belong under the Applescript section, but it's more of a stand alone app than a script for anything. This is beta software. I am not responsible for any issues you make encounter! Hey guys, About two days ago, an idea popped into my head: files are just groups of 1's and 0's put together, and I can read them as raw data and output them as text with XXD. Then I remembered that Google Docs files within Google Drive don't count against your storage... And then I remembered there was a command-line interface for Google Drive. With the news of OneDrive changing their storage limits, it reminded me of how much stuff I actually store in the cloud, and how impractical it would be to keep paying for more and more space. Sure, there are some gimmicky tricks using shared folders and multiple accounts, but that's just too complicated. I suppose you could argue that this project is a bit gimmicky as well, but I digress... So a few days and a few all nighters later, I present to you FullSpeed for drive: https://www.dropbox.com/s/ymc218mx8opmdcc/FullSpeed.tar?dl=0 I'm still updating it very frequently, which is why I linked to it rather than uploading them with this post. Normal files can coexist peacefully with FullSpeed files, as long as there aren't any instances of the phrase "█FullSpeed" in any of the file names except ones uploaded by FullSpeed. Anyway, I'd love your feedback! I'm still working on updates for it, so check back regularly for new versions!
  4. Before I even start, I know there is already an app called Spotify Notifications on Github that adds push notifications to Spotify. But, I found even the latest version to be very buggy. So I created Spotification to solve the problem! The app is pretty self explanitory, but there a few extra things I added. 1. If a track is starred, a star will appear next to the track's name in the notification 2. Spotification checks for updates automatically 3. If an ad is playing, no push notification will be shown (This is already a feature of Spotify Notifications) 4. Spotification runs silently in the background (No windows or settings to configure) So yeah. Pretty basic. Things I hope to address in the future: 1. If a song (meaning the exact same song, not just a song with the same name) plays twice in a row, no notification will be shown 2. Unlike in Spotify Notifications, no album artwork is shown in the notification I suggest setting this app to open when you start your computer. And again, I know I just made an app that does the same thing as another app, but my version is faster and less buggy. If you decide to try this out, please feel free to leave feed back! Download link (the file is too big to upload here) : https://dl.dropboxusercontent.com/u/58253891/Spotification%20updates/spotification-1.8.zip Enjoy!
  5. cloneryan02

    Messy Code

    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.
  6. So i've been trying to refine my code, and I wanted to do this, set recipientName to "Me" set recipientAddress to "cloneryan61002@gmail.com" set theSubject to "Type your subject here!" set theContent to "Type your message content here!" (*This will send the message.*) set codeSet2 to (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) I just typed up this code, but I can't the chunk of code into a variable (codeSet1) I want it in a variable so it's easier to manipulate, so if I change one thing, it basically changes it once, instead of the twenty times it takes to retype everything. Does anyone know how to turn this code into a variable?
  7. Hi all, I was originally trying this with Automator, but if someone can guide me to accomplishing this easier with Applescript then feel free, though i haven't worked with it before. I am trying to get specific actions within a workflow looped. I just need the workflow to process a single image file continuously so the selected edits repeat within the 1 file until i stop the loop. Here are some basic actions i'm trying to get started with: 1 - get specified finder items 2 - copy finder items 3 - scale images 4 - crop images 5 - loop The problem is that i want to loop only actions 3 & 4, but the loop starts over at 1 and creates a new file each time it loops. Can i create 2 workflows where the 2nd one (containing actions 3/4/5) starts when the first (containing 1/2) ends so only the 2nd workflow is looped? I'm not sure how to tell the 2nd one to start when the first ends though. Do i just set the input of the 2nd to use the 1st workflow file? or if it's possible to run this as a service from within Preview that's fine too. Originally i had this setup as WMD (watch me do) actions but Automator won't record the selection tool. if i can get the selection tool recorded then i can keep it as a WMD based workflow. Acorn (for crop/scale i believe) & Extra Suites (Applescript app for recording the mouse click & draw) were apps i saw mentioned on other posts that came up on google searches which might be able to help accomplish this workflow or script. Any help would be greatly appreciated. thanks
  8. Hi all I've been trying to solve a problem. I'm trying to write an Applescript that does the following, I have spent numerous hours trying to get it work but still not going anywhere near. The algorithm is actually simple, as below: if (window whose title contains text "[my google email address]") does not exist then create a new Chrome window with address "https://mail.google.com/mail/u/0" put the window in presentation mode else if (window whose title contains text "[my google email address]") exists but does not have focus, or hidden then bring focus to the window else hide the window end if end if Could any one help to suggest what code would work? Thanks heaps MacBook Air, OS X Mavericks (10.9.1)
  9. Hello everybody! I'm excited to say I've started writing a personal assistant for the Mac. It's called Samantha, and it's very similar to Siri on iOS. For this to work best you should have OS X 10.7 or later with Speech to Text enabled. If you want it to sound like Siri, select Samantha as the Text to Speech voice. Some commands (as of beta versions) -Play Alone Together --Launch Mail --What time is it? --Google Voodoo Donuts --Toggle music (plays or pauses the music coming through iTunes) --What model mac am I using? And much, much more. I've also added the ability to write extensions for it, so you can add anything else I haven't. Just say "Example extension" and you'll get more information. If you like this or have some suggestions, please let me know. Samantha-Prerelease-1.zip
  10. Hello everybody, I am trying to write an AppleScript which will start the Skype and call who are online and add incoming calls automatically after the conference is started. I am stuck at the last part (starred in the code below). The one in the repeat loop. Can you please help me implement a way to add the incoming calls to the existing conference call without putting the call on hold? Thanks in advance! PS. I have got a lot of help from other people's works so far. That's how I could do this much. tell application "System Events" set powerCheck to ((application processes whose (name is equal to "Skype")) count) if powerCheck = 0 then my launch_skype() else if powerCheck = 1 then return end if end tell ## FUNCTIONS ## on dismiss_skype_api_security() tell application "System Events" to tell process "Skype" set window_name to "Skype API Security" set ok_text to "OK" set radio_text to "Allow this application to use Skype" tell application "System Events" to tell process "Skype" if window window_name exists then click radio button radio_text of radio group 1 of window window_name delay 2 click button ok_text of window window_name end if end tell delay 1 end tell end dismiss_skype_api_security on launch_skype() tell application "Skype" set statusList to {"RINGING", "ROUTING", "UNPLACED"} delay 2 try set status to "COMMAND_PENDING" repeat until status is not equal to "COMMAND_PENDING" set status to send command "GET USERSTATUS" script name "auto call" if status is equal to "COMMAND_PENDING" then my dismiss_skype_api_security() end if end repeat #### CALL ONLINE CONTACTS + AUTO ACCEPT #### activate delay 1 set OnlineContacts to my get_online_contacts() delay 1 send command "CALL " & OnlineContacts script name "auto call" delay 2 -- Set first call ID as master set firstCall to send command "SEARCH ACTIVECALLS" script name "auto call" set firstCallID to last word of firstCall -- What if the last guy leaves the call ?!?!? set firstStatus to send command "GET CALL " & firstCallID & " STATUS" script name "auto call" if statusList contains the last word of firstStatus then -- First Call set MasterCallID to firstCallID end if ******** set callID to "" repeat until callID is "CALLS" delay 3 set status to send command "GET CALL " & firstCallID & " STATUS" script name "auto call" if the last word of status is "RINGING" then --Someone is calling to join the call set calls to send command "SEARCH ACTIVECALLS" script name "auto call" set callID to last word of calls send command "ALTER CALL " & callID & " JOIN_CONFERENCE " & mainCallID script name "auto call" end if end repeat ********** on error number -2753 quit end try end tell end launch_skype ### GET ONLINE CONTACTS ### on get_online_contacts() global OnlineFriends set OnlineFriends to {} tell application "Skype" set SkypeStatus to send command "GET CONNSTATUS" script name "auto call" if SkypeStatus is "CONNSTATUS ONLINE" then set AppleScript's text item delimiters to " " set Friends to send command "SEARCH FRIENDS" script name "auto call" set Friends to my ReplaceString(Friends, " ", ",") set Friends to my ReplaceString(Friends, ",,", ",") set FriendsList to my SplitList(Friends, ",") set NumFriends to number of items in FriendsList repeat with i in FriendsList if (i begins with "DISABLEDxmpp:") or (i begins with "USERS") or (i begins with "ugur") or (i is "echo123") or (i begins with "esr") or (i begins with "ayt") or (i begins with "Zaf") then else set FriendStatus to send command "GET USER " & i & " ONLINESTATUS" script name "auto call" if text item 4 of FriendStatus is "ONLINE" then set aUser to i set aUser to my JoinList(aUser, " ") set end of OnlineFriends to aUser end if end if end repeat if (count OnlineFriends) > 0 then set OnlineFriends to my JoinList(OnlineFriends, ", ") else set beginning of OnlineFriends to "No Skype Friends online at this time." end if else set beginning of OnlineFriends to "Skype is offline." end if end tell return OnlineFriends end get_online_contacts on JoinList(l, del) set RetVal to "" set OldDel to AppleScript's text item delimiters set AppleScript's text item delimiters to del set RetVal to l as string set AppleScript's text item delimiters to OldDel return RetVal end JoinList on SplitList(t, del) set RetVal to {} set OldDel to AppleScript's text item delimiters set AppleScript's text item delimiters to del set RetVal to every text item of t set AppleScript's text item delimiters to OldDel return RetVal end SplitList on ReplaceString(theText, oldString, newString) set OldDel to AppleScript's text item delimiters set AppleScript's text item delimiters to oldString set tempList to every text item of theText set AppleScript's text item delimiters to newString set theText to the tempList as string set AppleScript's text item delimiters to OldDel return theText end ReplaceString
  11. hello! im new to applescript, but this is my script that i wrote to send emails automatically. tell application "Mail" set the NewMessage to make new outgoing message with properties {subject:"subject.", content:"content", visible:true} tell the NewMessage set the recepientAddress to "recipient address" end tell end tell the spacing is all correct, and the script does run, but for some reason the recepient textbox is empty. can anyone please help? i will add on the cntent myself, but the recepient address is empty
  12. Hi everyone, I get an email every 4 hours about certain data and I would like to save this email as text to a specified folder as soon as it arrives. The messages always comes from 1 sender (saydata.reporter@gmail.com). Is there a way to automatically save this message as text with some unique name (the name doesn't really matter) as soon as it is recieved? I tried creating a rule in mac mail application but it doesnt have an option to save to text. Also, i would like the date and time it was recieved to also be a part of the text file if possible. Can this be done using an applescipt because i see an option to run applescript in the Rules tab in mail? Thank you in advance
  13. I'm a newbie when it comes to Applescript and was wondering if someone could help with a basic request. I need to write a small script to do the following: 1. Launch terminal 2. Run the 'Sudo -s' command 3. Enter the administrator password (in plain text) and then 4. run some sudo commands like "sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add administrator" I actually WANT the administrator password to be in the script in plain text even though I understand the security risks (I will literally be the only person to ever see the script). I've trawled forums all over but can't seem to find what I am looking for and cannot get it working by patching together the various commands I have found. Thanks in advance for any help you can give! Sean
×