Все вопросы: [applescript]

120 вопросов

похожие теги: applescript-objcapplescript-studio
4
голосов
2ответов
1493 просмотров

How to tell if a menu item is 'checked'?

I'm building an Applescript that will scan my network every X minutes, checking for my house's Xbox360 or PS3 and enabling my Transmission BitTorrent client Speed-Limit Mode when either console is online. Currently I can only Pause all transfers or resume all transfers using applescript, as ther...

0
голосов
2ответов
3413 просмотров

Cocoa/Objective-c 'system();' acting weird

I'm trying to run an applescript inside my Cocoa app using the system(); function - the string I'm passing to the function works in terminal and the applescript itself is fine, I think it has something to do with NSString - can anyone help? //add to login items NSLog(@"add to log...

2
голосов
1ответов
1795 просмотров

How to get the contact online status of Skype friends via Applescript

is there a way to get the online status of each Skype contact via Applescript? So far I only managed to get the group of online users. However, I need also the corresponding online status. Thnaks for your help! Cheers Julian set groupType to send command "GET GROUP " & group & " TYPE...

5
голосов
2ответов
7740 просмотров

How to record an applescript in Snow Leopard?

I open ScriptEditor, click on Record, click on some icons in the doc, open System Preferences, then click stop in the ScriptEditor and nothing happens, meaning I get no script. Nothing was recorded. Has anyone being able to record any applescript using Script Editor under Snow Leopard? Am I doin...

1
голосов
2ответов
3716 просмотров

Add an item to the Finder/Save dialog sidebar

I'm working on a script where a user logs into a guest account on OS and is prompted for their network credentials in order to mount their network home folder (while they benefit from working on a local user folder). As the guest folder is deleted when users log out, I want to discourage them ...

1
голосов
1ответов
581 просмотров

How to drive Interface Builder with AppleScript?

I want to programmatically create NIB (or XIB) resource files - like resource import tool. Making XIB file manually is not impossible, it is XML-based file, but there are too many unspecified items. So, I'd like to use AppleScript to drive IB itself and create the resources with it, but I fail t...

5
голосов
2ответов
2643 просмотров

Get the current working directory of process with a pid programmatically on OS X

Is there a way to get the current working directory of a process using it's PID programmatically on OS X? Cocoa, Carbon, or AppleScript are all acceptable. It is not acceptable to send "pwd" to the current terminal window/tab (Do not want to affect the workspace). The linux command "pwdx" also...

11
голосов
4ответов
8207 просмотров

Build and Run an xcode project via AppleScript

I'm trying to build an xcode project and run it through the iPhone Simulator via applescript. I'm aware of xcodebuild but it doesn't let you run the app in the simulator. I've gotten pretty close with the script below... tell application "Xcode" set targetProject to project of active project d...

3
голосов
1ответов
6005 просмотров

How to execute a applescript from php

Anyone know how to tell php execute a applescript?

-3
голосов
1ответов
647 просмотров

VisualBasic (or Applescript) Excel Sheet sorting with names

I have a big problem in the moment. I have to sort out an Excel sheet with names in it. There is always a first name and a last name following each other in the same order. Each name fills a cell. These Cells are alligned in one row. Example Bill|Cospy|James|Bond|George|Clony|Michael|Jacksson ...

0
голосов
2ответов
2629 просмотров

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 ...

1
голосов
1ответов
171 просмотров

Resources To Learn AppleScript For Mac System 7.5.5

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...

1
голосов
1ответов
1737 просмотров

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

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...

49
голосов
4ответов
50164 просмотров

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?

4
голосов
1ответов
617 просмотров

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

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 ...

0
голосов
1ответов
2129 просмотров

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" ...

5
голосов
3ответов
2727 просмотров

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; ...

1
голосов
1ответов
1460 просмотров

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?

2
голосов
2ответов
1110 просмотров

Applescript to print Word documents

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

2
голосов
2ответов
2725 просмотров

How can I detect if the screen is locked or screensaver is active from the Terminal in OS X 10.6?

Due to the new limitations of Kerberos in OS X 10.6, I'm working on a script that offers similar functionality to what used to be available in 10.5. Essentially it parses the klist output to see if your ticket is expiring and displays how long until it expires. If we hit the 10 minute mark, it ...

0
голосов
1ответов
476 просмотров

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 for...

2
голосов
2ответов
1782 просмотров

AppleScript Word Count Service

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 ...

3
голосов
3ответов
16889 просмотров

Running script with admin permissions on OS X

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...

5
голосов
1ответов
956 просмотров

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 t...

0
голосов
1ответов
72 просмотров

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 o...

0
голосов
1ответов
146 просмотров

Snow Leopard Services: targeting all files

Here's the available targets for Snow Leopard services in automator. Available service targets http://s3.amazonaws.com/augustl-stuff/automator-available-service-targets-84.png I want my service to operate on all files. It would sort of work to choose "files or folders" and ignore the action if ...

0
голосов
3ответов
6556 просмотров

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 no...

0
голосов
1ответов
764 просмотров

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 ...

6
голосов
4ответов
9369 просмотров

What is applescript and what is it used for?

What is applescript and what is it used for?

4
голосов
9ответов
1919 просмотров

Learning AppleScript

What resources would you recommend to pick up AppleScript. I come with a traditional C/C++ with Objective-C background. I am also looking for tips on how to develop better and get faster documentation from the script editor. A sample tip would be 'lookup the sdef file of the app you want to sc...