applescript

AppleScript, Inside Web without URL

Hey Guys: Thanks a lot for your time on the weekend. I really appreciate it. There is a project due on Monday. I really need a little bit help. I tried to use Apple Script to trigger a small web page inside a web page (but that small web page does not include url, like rating or review embedded in the web). Do anyone know what co...

Why do AppleScript "tell" commands run a non-GUI instance of my GUI application in the background?

I'm writing a standard Cocoa application, and I've just started implementing AppleScript support for it. I've defined and implemented a property called testprop for my top-level application scripting class, and accessing it works just fine: if I launch an instance of my app and run the following AppleScript in Script Editor, I get the ou...

GUI wrapper for Perl command line app on OSX

I wrote a Perl application which I run on the terminal using command lines. I created aliases for the various command options in the shell to reduce the typing. Even so, having a GUI to to select the various commands and other arguments would make it easier to run the app. What's a good approach to developing the GUI wrapper on OSX?...

List values in AppleScript?

I have the following AppleScript so far: # List of possible options to control the development environment. set WhatDoUWantToDoList to {"1", "2", "3", "4"} set MySites to {"test1", "test2"} # task selected set selectedTask to {choose from list WhatDoUWantToDoList with prompt "Pick your task now!!!" without multiple selections allowed}...

Snow Leopard Services: targeting all files

Here's the available targets for Snow Leopard services in automator. I want my service to operate on all files. It would sort of work to choose "files or folders" and ignore the action if the input is a folder, but that means the service will appear when right clicking folders too, which isn't very elegant. ...

applescript title nowrap?

Is it possible to set a "nowrap" on a title of a display box? for example: set selectedSite to (choose from list MySites with prompt "Which site would you like to use:" with title AppTitle without multiple selections allowed) Since the sites listed in that box are rather small, the title of the box wraps, is there a way to prevent...

Compiling applescript from a text-only source file

Is there a way to compile apple script code on the command line from a text source file, like you know, the way it is done in every real programming language? I have an applescript .app file and it seems the only way to edit it is using the native script editor app. However not having a source text file results in all kinds of problems ...

Running script with admin permissions on OS X

Hi all, I've tried my best to find out a solution with the many script questions on Stack Overflow and the internet, but I can't seem to find the solution I need. What I want to do is create a more automated and less clicking solution to remove all the Mobile cached user accounts on a system. I've been logging in and manually going to ...

AppleScript Word Count Service

Hi folks, I am trying to create a service in OSX leopard that counts the number of words of selected text. I have automator set to run an applescript, with the following put in it: on run {input, parameters} count words of input display alert "Words: " & input return input end run When I compile the script, it...

Applescript - pygame, application bundle

I'm trying to learn pygame, And I found the best way to have the finished game (assuming python 2.6 and pygame installed) is to have an applescript that runs it, and saved as an app bundle (with python files etc. inside the bundle). Here is what I have: do shell script "cd " & the quoted form of the POSIX path of (path to me) & "Content...

Applescript to print Word documents

Is there a way to print all of the Microsoft Word documents (.doc) in a folder using AppleScript? ...

Intercept Copy and Paste with AppleScript

Is it possible to intercept global copy and paste in OS X with an AppleScript? Or would I have to have some intermediary step that would trigger the AppleScript to read the clipboard? ...

Implementing keyboard volume control buttons in Applescript - setting volume inside loop doesn't work

Background I have a MacAlly IceKey keyboard. This keyboard has volume buttons that require a driver to function. This driver has not been updated since 2006, and I suspect it as the source of a recent spat of recurring kernel panics I've been experiencing under Mac OS X 10.6.1. So, out it goes; but I want my volume keys back! Using the...

How do I fix my AppleScript to delete a selection of tracks in iTunes?

I've created the following AppleScript for deleting all the selected tracks: property okflag : false -- check if iTunes is running tell application "Finder" if (get name of every process) contains "iTunes" then set okflag to true end tell if okflag then tell application "iTunes" if selection is not {} then repeat wi...

Applescript access to last.fm app via application icon in menu bar

Hi, I want to create an Applescript to drive the last.fm player app. I'm trying to do this via last.fm application icon in the menu bar rather than using the main application menus, as this approach (I think) won't cause last.fm to switch to the foreground. The overall plan is to bind my script to a quicksilver trigger so I can stop|sta...

How do I debug AppleScript?

What tips and tricks do you have for debugging AppleScript? Is there a debugger? If not, what is the best way to insert "prints" to display the value of variables? Is there a way to "pretty print" more complicated data structures? ...

Calling Skype API via Applescript triggers up to 100 Security Authorization Requests

Dear All! I am working on an Applescript, which does nothing fancy but asking Skype how many contacts are online... However, when the script was executed several times, while Skype was not running, and finally is running, then Skype opens uncountable dialog windows with a Skype API Security Request, asking whether or not to allow the Ap...

Applescript makes Skype trigger uncountable Security Authentication Dialogs

Hey! I am working on an applescript, that is supposed to ask Skype over and over again, how many contacts are online etc... The problem I stumbled upon is the following: in case the script was triggered several times, while Skype was not running and later when Skype is executed, then Skype asks very often (up to 100 times) whether or on...

Resources To Learn AppleScript For Mac System 7.5.5

Hello, I'm back here is SO, i was a time out because i get sad with some persons that dislike me only because i was noob in C/C++ and now i'm very nice on it and my OS is started!. But the thing is that now i'm emulating Mac System 7.5.5 68k, just for fun and for development too(AppleScript), but i was searching in the internet about t...

How can I rasterize a PDF in Photoshop with specific pixel dimensions using Applescript?

So I am trying to batch convert a bunch of PDFs to JPEG files as part of a larger Applescript, and I'm finding that some of the parameters in "PDF Open Options" are ignored. Namely, the "height", "width" and "constrain proportions" parameters. This code is lifted directly from the Photoshop CS3 Scripting Guide (with filename changed, of...