OS X Technologies :: Scripting From A USB Volume?
Jun 16, 2012
I have created a simple apple script (my vary first one) in which I wanted the script, when run, to open a random image from a folder that had images within it. I did it using this code: tell application "Finder" (* get a random image file from a desktop folder *) set randomImage to some file of folder "Pictures" open randomImage end tellÂ
That worked well and good when the folder containing the images was on the desktop. However, the folder I really want to use is on a USB stick. How can I tell the script that the folder I want it to run with is on the USB Stick? I know I could easily copy the folder from the stick to the desktop, but I'd rather keep the folder on the stick.Â
Info:
Mac OS X (10.7.4), 8GB RAM
View 2 Replies
ADVERTISEMENT
Jun 12, 2012
I have been "experimenting" with GUI Scripting and have now got stuck trying to select Mail Merge in a Pages document. I have managed to select the menu item that calls the merge menu but cannot figure out how to now select "Merge".
The following code is as far as I have reached.
tell application "Pages" to activate
tell application "System Events"
tell application process "Pages"
tell menu 1 of menu bar item "Edit" of menu bar 1 click menu item 20
end tell end tell end tell
Info:
iMac, Mac OS X (10.7.1)
View 6 Replies
View Related
May 6, 2012
I am exploring the possibility of scripting the creation of smart playlists in iTunes. As I understand it this can only be achieved with GUI scripting. I have come across a couple of threads which suggest this can be achieved:Â
[URL]
however both generate an error for me. The problem appears to be around the line "tell scroll area 1 of group 1 of window 1". I get the error: System Events got an error: Can't get group 1 of window 1 of process "iTunes". Invalid index.Â
Info:
Macbook Pro, Mac OS X (10.7), 2.66 GHz Intel Core i7 8GB RAM
View 14 Replies
View Related
Apr 5, 2012
It will look also in other volumes I have. What is the right way to search only the current volume? I came up with this:find /Volumes/Lion/ -name foo which will return a result like /Volumes/Lion//foo.Is this the right way to do this with the result containing double slashes?
View 3 Replies
View Related
Mar 22, 2012
Is there any way to get a list of all inode numbers on a volume? I have a "find -x /Volumes/thedisk/* -exec stat {} ;" going but requires lots of CPU time. Seems like I should be able to look directly at the file allocation table...oh wait, that is DOS. This is on an HFS disk: /dev/disk0s2 on / (hfs, local, journaled)Â
Info:
MacBook Pro, Mac OS X (10.6.8)
View 4 Replies
View Related
May 7, 2012
I can change the volume level from the command line using this command, For example: osascript -e 'set Volume 3'. Is there a way to detect the current volume level using a similar command and a way to assign it to a variable? And just for good measure, are there similar commands for detecting and setting the current balance?
Info:
iMac, Mac OS X (10.6.7), MySQL 5.1, Perl 5.10, Apache 2.2
View 4 Replies
View Related
May 17, 2012
My volume randomly stopped working.
Info:
iMac (27-inch Late 2009), Mac OS X (10.7.4)
View 2 Replies
View Related
Apr 14, 2012
I want to make a script that adjusts the output volume of my mac based on the volume that the mic hears. I am not very good with applescript, but I do know how to control the volume. I was wondering if there was a command that retrieved the input level from the mic as it is show in the sound preferences in the system preferences window.
Info:
MacBook Pro, Mac OS X (10.6.8)
View 3 Replies
View Related
Mar 21, 2010
I am new to GeekTool and am trying to get a handle on what the components of the scripts mean.
Does anyone know of a scripting diagram that shows what the different parts of the scripts do?
View 2 Replies
View Related
May 17, 2010
I just got a new macbook pro 13" for my birthday and I was wondering how would I achieve something like this: This is something I just quickly edited in photoshop to show what I would like. I know that I have to use geektool. But I am completely lost. If there any good tutorials you can send me a link to or even if you could teach that would be awesome. To be clear I would like to learn how to add weather icon, weather info, date, time and a cool transparent bar. I would also like to know how to change the font.
View 3 Replies
View Related
Feb 18, 2010
We are looking for a script for iTunes on windows XP.
Something that will allow us to rename the media files on disk from the info in iTunes. And if possible the Artist and Album names aswell.
Since we choose for .wav files we don't have an option for metadata included in the file. Now, we were wondering if we would use the Broadcast Wave format that includes metadata in the file. My guess is that iTunes doesn't support BWF?
On the mac side i suppose there is something like this from [URL]
View 2 Replies
View Related
Feb 14, 2012
I have been unable to find any references on how to best automate certain "tasks" in Lion so that I can do the following:Â
create predefined DNS names based upon the clients domain name
create predefnined web address based upon the just created DNSÂ
For example.... We have the customer "Sammy's Flower Garden" and his domain is "sammysflowergarden.com". At the command line, I would type:
$ clientsetup sammysflowergarden.com This would then create a base folder structure (this part has already been written)ClientDomains    -    S         -    sammysflowergarden.com              -    production              -    staging              -    archive              -    design                   -    template    Â
[code]....
From what I have read, alot of modifications outside of the Lion serveradmin tooling can result in some rather unusual if not nasty behaviour. If this is true, then I would assume that I could not just write out to a file in /var/named/ and have it automaticly picked up by the server? The same for the apache instance? I still want to be able to use the GUI interface when needed. Â
View 2 Replies
View Related
Dec 15, 2009
I'm making the transition over to Apple.. I'm considering either the new 21.5" iMac or a refurbished 24". I'll be using this for photography and will need to use the built-in screen until I allocate funds for a better monitor like the NEC LCD2690WUXI2. I recently found this article http://www.fireandknowledge.org/arch...en-glare-free/ Can someone (who has tested this) confirm if this same technique will work on the new 21.5" iMac?
View 6 Replies
View Related
Oct 20, 2009
I have a Mac Pro and not too long ago I swapped from a fat, heavy and filthy white Apple Keyboard to a new skinny silver one. I like it, and also love that the F7-9 Skip Back-Pause/Play-Skip Forward keys work for iTunes, even when another app is active (what's the word I'm looking for - in focus or whatever). But I use Optical output, so the volume keys (F10-12) don't do anything. I know that, when iTunes is the active app, I can command-+/- to change the volume, but I'd love to be able to map the F10-12 keys to do that - without having to have iTunes active (playing, but not the active window).
View 1 Replies
View Related
Mar 9, 2010
Recently, my newer (last year) iMac probably running 10.5 started speaking and wont shut up... there is no obvious way to turn it off. I usually figure problems out myself but there are no system preferences that effect it. I even changed the voice in preferences as a test and it is still the same guy reading everything clicked in all applications except when I am in system preferences so far. Usually when I run into a dead end like this there is some mystery key command that works... anyone know?I also noticed that some of the top line (f) keys are not doing what they are supposed to any longer as well... volume up opens the window for expose & spaces it looks like and does not control the volume monitor brightness controls are not working either... I went to the key and mouse preferences and set the key strokes to default and still the same.
View 6 Replies
View Related
Aug 10, 2009
I have my imac apart right now and replaced the internal HD as it was not working. I assume the problem is the new one is not formatted with OSX, so from the INSTALL CD I opened the disk utility and see only one drive called "MEDIA".? Or is that just part of the install dvd that looks like a HD? In the system it shows as not formatted, 0 bytes. When selected in Partition it says :
"This voume is the startup volume and cannot be erased. Size 7.1 GB The disk is not writable and cannot be partitioned"
So i guess thats not my new HD I am seeing? Other than that there is only the two OSX install CD icons.
View 2 Replies
View Related
Dec 14, 2008
I was wondering if anyone knows how to do this- it is a pita to adjust separate volume controls on everything. If I adjust the volume on the keyboard, the volume slider in itunes doe snot move. If I set the volume on itunes with a mouse, then come home and use the volume controls on my keyboard, I have to also manually adjust the slider in itunes. Anyway to link the two?
View 3 Replies
View Related
Aug 23, 2014
I recently decided to increase the volume of my bootcamp disk, which I had done in the past using a method which ultimately made the disk unrecognizable. This time around I used Winclone to create an image of my bootcamp disk. I was not sure exactly how Winclone worked and to be safe I decided to keep the Bootcamp disk I had, and I created a third partition of a larger volume to which I restored the bootcamp image. Everything worked fine obviously, and the image was restored correctly to the new larger volume. The dilemma is I had two bootcamp disks, so I erased the smaller volume because I no longer needed it. Currently I am trying to restore this empty space within the main disk to the Macintosh HD. Disk util looks like:
I know I can just create a backup of the macintosh HD, another image of the bootcamp disk, and format the disk and start over, but I am hoping there is an easier way to go about this; considering there has been a method engineered such that I can just drag that corner of the mac HD and voila I have instantly more storage after applying, it seems viable that there is something that can be done rather than formatting my disk, unless the necessity for that of course was overlooked. Â
Info:
MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9.4)
View 4 Replies
View Related
Jun 29, 2009
Before I get flamed and etc... I have google and done some research about this issue but cannot find much about it.
I am not sure if this is a very common issue or topic but how do you adjust or modify your apple keyboard so that you can adjust screen brightness or volume? I am currently running Windows XP SP3, on a 2.4Ghz Unibody Macbook.
View 3 Replies
View Related
Aug 31, 2014
When I use the F11, 12 buttons, the pages go away or the dashboard comes up. I've tried to change the settings but that didn't work either
Info:
MacBook Pro with Retina display
View 1 Replies
View Related
Mar 26, 2012
PHP version 5.3.3 seems installed. But when I attempt to open php pages the browser opens them as text. It seems that I must edit the httpd.conf file to actually enable php. I changed the permissions on the file with sudo chmod ug+rw for httpd.conf. TextEdit still doesn't allow me to change it. It's saying that I don't have permission to write to that folder. I changed the permission the /etc/apache2 and that didn't help. What must I do to be able to modify httpd.conf and enable php support? Is there a different way to enable PHP? I am aware that MAMP is an option. But I should not have to use that option if php is available in apache.
Info:
Mac OS X (10.6.6)
View 1 Replies
View Related
Apr 21, 2012
architecture of MAC Operation System?I am make a work on mac and i need help, i am not to find nothing...Â
Info:
Mac OS X (10.7.3)
View 3 Replies
View Related
May 2, 2012
I'm a new Mac user. How can I get rid of a virus?
View 1 Replies
View Related
Feb 23, 2012
I was using XCode 4.2.something at work and had AU Lab. I upgraded to 4.3 and now AU Lab is gone. Where is it?
Info:
XCode, Mac OS X (10.7.3)
View 1 Replies
View Related
Feb 27, 2012
What i am trying to do is create a program that lets the user have a small conversation with the computer but i don't want to use "else" and list the possible inputs seperatley and have to write the same thing over and over again. does anyone know of a way i can list possible inputs together and have them lead to the same result?
View 6 Replies
View Related
Feb 28, 2012
I'm told that to keep my mobile.me I must upgrade from 10.6.8 to 10.7.3Â If I do that will I lose my iwork 8?
View 1 Replies
View Related
Feb 28, 2012
How do I know when my Mac has a virus?
Info:
iMac, Mac OS X (10.4.11)
View 2 Replies
View Related
Mar 4, 2012
I probably already have the answer to this question myself but I wanted to make sure, and also have a follow-up query based on the responses.The system board was replaced last year after a nasty scrap between a cup of black coffee and my MBP (you will have immediately deduced who won).Today I noticed that many of the plist and plist.lockfile files within my Library/Preferences/ByHost folder have duplicates, albeit with different UUIDs in the filename. The dates pretty much tie up with when the system board was replaced so my assumption is that the UUID changed with the new hardware.
Q1) Would someone be so kind as to verify my assumption, or make a loud raspberry if my assumption is erroneous?
On the basis that the response from our wonderful community is: "Your assumption is correct Livebox, you have not gone mad, and you may rest-assured that the world is at peace (for now)", my additional question(s) are:
Q2a) Is it safe to delete ALL plist and plist.lockfile files that sport the old UUID?
Q2b) Is it safe to delete ONLY those plist and plist.lockfile files that sport the old UUID AND have a new version that sports the new UUID?
Info:
MacBook Pro (17-inch Early 2008), Mac OS X (10.7.3), 4GB RAM - GeForce 8600M (512MB) GT
View 4 Replies
View Related
Mar 8, 2012
Is there such thing as an 'and if' statement? What I'm trying to do is the following: set var1 to 1st text item of theMessage as text set var2 to 3rd text item of theMessage as text If var1 is "help" and if var2 is "" (blank)then do something end if.
View 3 Replies
View Related
Mar 13, 2012
I'm using MAC OS X LION and I cannot access the iSync.
Info:
iSync
View 1 Replies
View Related