Search Results

Search found 265 results on 11 pages for 'applescript'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Running a command line app with sudo and password automatically on OS X startup

    - by Designer023
    I need to run an app at startup/login on my mac. I want it to launch in the background and start doing it's work without interrupting me or me having to start it up because I invariably forget and then when I need it, it wasn't running! I have tried using AppleScript to tell Terminal to run it and type my password in, but it ends up opening multiple Terminal windows and not working. Ideally I need a script that I can just add to the user login items and it will run for me. The app has no way of taking a password argument either and it has a password as well as the sudo! I need a solution that can either be done as an applescript (which can be made into an executable) or i need a commandline script but I have no idea about them. This is the manual code I type $ sudo serverStatus password:123456 password:serverpass My AppleScript: tell application Terminal activate do shell script "sudo serverStatus" delay 5 do shell script "123456" delay 2 do shell script "serverpass" end tell

    Read the article

  • Open Terminal Here, as Root (OS X)

    - by cwd
    There is a pretty awesome applescript called "Open Terminal Here" ( http://www.entropy.ch/software/applescript/ ) which you can add to your finder's toolbar and click when you want to launch a terminal console which is set to that directory. Sometimes I need to be root, and so I end up starting terminal, doing something like sudo -i and then I have to change back to the previous directory because the sudo command is landing me in /var/root. I'm using sudo -i because I like it to load things like aliases / the bash profile. The script is applescript, and here's the important part of how it works: ... set cmd to "cd " & quoted form of the_path & " && echo $'\\ec'" ... tell application "Terminal" activate do script with command cmd How do I get this to load as root?

    Read the article

  • Script Editor in Snow Leopard painfully slow after adding apps to Library

    - by Kio Dane
    I have four different Macs that I use from time to time, and on each of them I notice a constant: adding more items to AppleScript Editor's Library window slows performance of mundane operations (opening a dictionary, switching between Library window and editor window, scrolling in the Library window, etc). In Leopard, I noticed little to no latency in opening a dictionary in Script Editor, but Snow Leopard's AppleScript Editor kills my productivity by making me wait on it with most UI interactions with the Library window.

    Read the article

  • How do you duplicate current open Finder view in new tab (Mavericks)?

    - by magoo
    In a thread on this forum there is an interesting solution on how to open a duplicate of an already open Finder window with the help of an AppleScript: How do you duplicate current open Finder view? With the new tabbed Finder in OS X 10.9 Mavericks, I am wondering if there is a way to implement an AppleScript that opens the duplicate in a new Finder tab instead of a new Finder window? Did anybody succeed in finding a solution?

    Read the article

  • running a command line app with sudo and password automatically on start up OS X (Lion)

    - by Designer023
    I need to run an app at startup/login on my mac. I want it to launch in the background and start doing it's work without interrupting me or me having to start it up because I invariably forget and then when I need it, it wasn't running! I have tried using applescript to tell terminal to run it and type my password in, but it ends up opening multiple Terminal windows and not working. Ideally I need a script that I can just add to the user login items and it will run for me. The app has no way of taking a password argument either and it has a password as well as the sudo! I need a solution that can either be done as an applescript (which can be made into an executable) or i need a commandline script but I have no idea about them. This is the manual code I type >sudo serverStatus >password:123456 >password:serverpass Not sure if this is the right stack to ask, but I have no idea now and it's above my head! Thanks :D My applescript: tell application Terminal activate do shell script "sudo serverStatus" delay 5 do shell script "123456" delay 2 do shell script "serverpass" end tell

    Read the article

  • How to pass AppleScripts display dialog to Growl or growlnotify?

    - by pattulus
    I have this simple AppleScript which takes the text in the clipboard and outputs the amount of words and characters used. What I'm trying to do is passing "display dialog" to Growl or growlnotify. I know how to use growlnotify in the shell - it's great and highly customizable (stick note, assign app icon or an image, etc) - but the point is: I don't know how to do it in AppleScript. I google a bit but now time has passed and I decided to post my question here. So, here's the script: set myCount to count (the clipboard) set myWords to count words of (the clipboard) set myParas to count paragraphs of (the clipboard) display dialog "Characters: " & myCount & " Words: " & myWords & " Paragraphs: " & myParas Thanks.

    Read the article

  • applescript for sqlite

    - by user1212108
    I have a Windows app called via Shell from MS Word that reads and writes to Sqlite. I'm porting it to Mac. On windows I have a batch file: SQLite3.exe pathtodb\databasename <sqlitecommands.txt This batch calls the Sqlite command line program, attachs the database, and reads the command from sqlitecommands.txt. The sqlitecommands is dynamically modified(by Word VBA) to read (Select) Write (Update) to/from the database. What is the format of an applescript to do the same thing in Mac OSX?

    Read the article

  • How-to build a droplet application in Xcode4?

    - by Josh
    In Xcode3 there used to be a template to build "Droplet" Applications (head/nibless apps that would throw whatever dropped at them at an "on open" Applescript method). In Xcode4 this template is unfortunately gone. What are the required steps to setup an xcode4 droplet project? modify the info.plist i guess to make the app handle drops get rid of the nib (also involves changes in main.m and both AppDelegate.h and AppDelegate.m i guess) Maybe somebody even still has Xcode3 installed and could create an empty applescript droplet app and upload it somewhere? that would be very interesting. thanks! (or is there maybe even a way to export an app bundle created with the AppleScript Editor to Xcode?)

    Read the article

  • How to detect which Space the user is on in Mac OS X Leopard?

    - by georgebrock
    Mac OS X Leopard has a virtual desktop implementation called Spaces. I want to programatically detect which space the user is currently on. Cocoa is preferable but AppleScript is acceptable if there's no other way. I've seen a couple of AppleScript implementations, but the techniques they used seemed a bit too hacky to use in production code (one relied on causing and error and then parsing the error message to get the current space, the other interrogated the Spaces menu GUI)

    Read the article

  • What programming language is the most English-like?

    - by asmeurer
    I'm mainly a Python programmer, and it is often described as being "executable pseudo-code". I have used a little bit of AppleScript, which seems to be the most English-like programming language I have ever seen, because almost operators can be words, and it lets you use "the" anywhere (for example, this stupid example I just came up with: firstnumber = 1 secondnumber = 2 if the firstnumber is equal to the secondnumber then set the sum to 5 end if is a valid AppleScript program. Are there any programming languages that are even more English-like than these?

    Read the article

  • How to activate Mac OS X application with a given process ID?

    - by Olivier
    I know the process id of an application in Mac OS X. How can I switch to it (using applescript, or python, or whatever)? By "switch", I mean, put in focus. The usual solution is to use the applescript code tell application "Foo" activate, but here the name is not useful because I have many instances of the same application running. I am however able to get the process id of the application. How can I switch to this application programmatically?

    Read the article

  • Disabling VLC's crash message

    - by geotheory
    I have a Mac Mini running videos on loop to display publicly, which occasionally crashes I think generally when other OSX functions kicking in. I have a script to detect when VLC is not running and reboot it, but there is often a system message on top "VLC crashed previously". Is there a way to disable this (I can find no option in VLC's advanced options), or perhaps to feed a 'Continue' response to it via Applescript?

    Read the article

  • Getting Safari document title/location with Scripting Bridge does not work in full-screen mode

    - by Mark
    I'm trying to get the URL and document title from the topmost Safari document/tab. I have an AppleScript and an objective-c version using Apple's Scripting Bridge framework. Both versions work fine for most web pages, however when I open a Youtube video in full-screen mode, the Scripting Bridge based version fails. The Apple Script works fine for "normal" and full-screen Safari windows. Can anyone see what is wrong with the Scripting Bridge code below to cause it to fail for full-screen Safari windows? Here the code (I omitted error checking for brevity): AppleScript: tell application "Safari" # Give us some time to open video in full-screen mode delay 10 do JavaScript "document.title" in document 0 end tell Scripting Bridge: SafariApplication* safari = [SBApplication applicationWithBundleIdentifier:@"com.apple.Safari"]; SBElementArray* windows = [safari windows]; SafariTab* currentTab = [[windows objectAtIndex: 0] currentTab]; // This fails when in full-screen mode: id result = [safari doJavaScript: @"document.title" in: currentTab]; NSLog(@"title: %@", result); Scripting Bridge error (with added line breaks): Apple event returned an error. Event = 'sfri'\'dojs'{ '----':'utxt'("document.title"), 'dcnm':'obj '{ 'want':'prop', 'from':'obj '{ 'want':'cwin', 'from':'null'(), 'form':'indx', 'seld':1 }, 'form':'prop', 'seld':'cTab' } } Error info = { ErrorNumber = -1728; ErrorOffendingObject = <SBObject @0x175c2de0: currentTab of SafariWindow 0 of application "Safari" (238)>; } I could not find details about the given error code. It complains about 'currentTab' which shows that the JavaScript event at least made it all the way to Safari. I assume that the current tab receives the event, but refuses to run the JS code, because it is in full-screen mode. However, why does this work for an AppleScript? Don't they use the same code path eventually? Any suggestions are greatly appreciated. Thanks!

    Read the article

  • How to update Preview.app from the command line without losing focus on Mac OS X?

    - by snies
    I want to update Preview.app in the background from the command line without losing focus of my current window. I know that I can use the following to open/update the view of a file, but then I lose focus to the Preview.app. open -a Preview foo.pdf I guess there might be some clever AppleScript commands to do so but so far I didn't find the right one. Alternatively I would be interested into transfering the focus back to my current application directly after the update. I need this in order to update Preview.app's view of a PDF file through a vi autocmd after I update the PDF file according to changes in a TeX file I am editing. Here is an example of what I want to achieve but using Ubuntu and evince.

    Read the article

  • Excel; exporting/importing different columns to different csv files

    - by Sisyphus
    Is there a way to batch export different columns to different csv files in excel on an OSX, I'm thinking something along the lines of possibly automator, applescript or bash. I've had a look play around with automator and so far no look. The best I have accomplished export the whole sheet, then use sed to strip out what I don't need, however this is terribly inefficient. Also, is there a method, to batch import multiple csv files into columns. Thanks in advance && sorry I didn't tag excel correctly it wouldn't allow me to create the excel:mac tag

    Read the article

  • Inserting Keynote slides into a Pages document

    - by Ian Turner
    I have a number of training documents which are formed from a word processor file and a slideshow. I'd like to be able to keep them together ideally by inserting the slides from Keynote into Pages. Is there any way of doing this quickly. So far I have tried Applescript with little success, I can drag and drop the slides one at a time but it is a bit slow and I've tried turning the slideshow into and dragging it into Pages but this only pulls in the first slide. Does anyone have any better ideas?

    Read the article

  • Are Snow Leopard text substitutions scriptable?

    - by yonatron
    I prefer using typographical quotation marks when possible, so I love the Smart Quotes part of Snow Leopard’s text replacement feature. But there are a few cases in which I need to toggle it, and it’s a pain to do so from the contextual menu when I’m typing. Is there any way (preferably via AppleScript, but I can deal with other suggestions) to toggle specific types of text replacement for the frontmost text-input control? And if so, what’s a good way to assign it to a globally-accessible keyboard shortcut (via 3rd-party app if necessary)?

    Read the article

  • Inserting Keynote slides into a Pages document

    - by Ian Turner
    I have a number of training documents which are formed from a word processor file and a slideshow. I'd like to be able to keep them together, ideally by inserting the slides from Keynote into Pages. Is there any way of doing this quickly? So far I have tried Applescript with little success. I can drag and drop the slides one at a time but it is a bit slow, and I've tried turning the slideshow into and dragging it into Pages but this only pulls in the first slide. Does anyone have any better ideas?

    Read the article

  • Toggle "ask for password after screensaver/sleep" or the delay in 10.7 using terminal

    - by desbo
    There's an option in the preference panel to change the time the mac is able to be in sleep/screensaver before requiring a password to be unlocked again. I'm using OS X Lion 10.7. Is there any way to change this setting using the terminal or an applescript? I tried to change the plist file using: defaults write com.apple.screensaver askForPasswordDelay -int 60 also tried defaults write com.apple.screensaver askForPasswordDelay -float 60 also completely disabling the password didnt work either defaults write com.apple.screensaver askForPassword -int 0 The plist file was changed, but it had no effects at all. It's the same plist file that gets changed when manually switching the setting in the preferences. Would be awesome if anyone got an idea how to fix my problem. EDIT: also tried to: 1) add -currentHost flag 2) drop the -int / -float

    Read the article

  • How to bring application to front every 15 minutes on Mac OS X Lion?

    - by johnnyb10
    I have a free or cheap little app called Desktop Task Timer LE that I've been using to track my time as I work on various projects. I'd like to have it pop up as the foreground app every 15 minutes to prevent me from forgetting to stop/change the timer after I've moved on to a different task. I know I can have the app launch using a script in Automator or AppleScript, but I don't know how to have that script fire off every 15 minutes. I've read about using Launchd and iCal, but I'm still not sure how to do it. (Actually, iCal is probably simple, but I'd like to avoid using it for this.) Any ideas? Also, a further feature would be to have it pop up after 5 (or x) minutes of inactivity on the computer. Not sure if this would work for my needs, but I'd like to test it if possible.

    Read the article

  • How to switch a Sound Ouput Device before the Mac goes to sleep?

    - by Konzepz
    I've connected my MacBook to a set of external speakers with a USB. Now, every time the computer goes to Sleep Mode, there's an awful static sound coming from the speakers. I guess this is some bad wiring; but that's what I've got. However, I can use an idea for a script (AppleScript, bash, whatever) that will switch off the USB output sound in (System Preferences) before the computer goes to sleep, and will switch it back on (if exists) on Wake. Any ideas? Thanks!

    Read the article

  • What is the best way to make Calculate SHA1 as a context menu option in Mac OS X?

    - by Andrei
    In order to calculate the SHA1 checksum of a downloaded file, I could type /usr/bin/openssl sha1 in Terminal and then drag there the file which I want check. To make it simpler, one could enable a Context Menu item for this action. What is the best way to create such item in Mac OS X 10.6? A detailed answer is appreciated, because I don't have good experience with AppleScript, etc. Step by step Open Automator Create new service Choose to receive selected Files and Folders in Finder Add action Run Shell Script where your bash command is /usr/bin/openssl sha1 "$@" and you pass input as arguments How can I get the output? Preferably in a Growl pop-up or a message window/dialog.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >