IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label variable. Show all posts
Showing posts with label variable. Show all posts

Friday, March 22, 2013

Re: How can I repeat an AppleScript function if a variable is changed?

In AppleScript, using the equal sign in a statement such as temptext = myText tests for equality - it does not assign a value.  The set command is used to assign a value to a variable.

 

Using a repeat statement to check for an album change is also not really the way to go, since it tends to max out your CPU usage - if you create a stay-open application, it will run in the background and the idle handler will be called periodically (the default is every 30 seconds):

 

property oldText : missing value

 

on idle -- check periodically

  checkAlbum()

  return 30 -- or however many seconds before the next time

end idle

on checkAlbum() -- check if the current album name has changed

  tell application "iTunes"

    if player state is not playing then return

    set albumName to (get album of current track)

  end tell

  set myText to text 1 thru 10 of albumName

  if myText is not oldText then

    set oldText to myText -- update

    open location "http://bandsite.com/shows/" & myText

  end if

end checkAlbum



View the original article here

Thursday, March 21, 2013

How can I repeat an AppleScript function if a variable is changed?

I am creating a script that will append the first 10 integers of an album name to a website URL for a band - part that I have working so far looks like this:

 

 

    tell application "iTunes"

        if player state is playing then

            set albumName to (get album of current track)

            set myText to text 1 thru 10 of albumName

        end if

    end tell

   

    temptext = myText

   

end if

open location "http://bandsite.com/shows/" & myText

 

So if an album is named "1999-01-04 - Great Hits" - this will return "1999-01-04" and append it to the bandsite.com/shows/ URL.

 

I need the above function to repeat itself whenever the album is changed in iTunes not the track. My work in progress code for that is:

 

Set temptext = myText

if temptext is not myText then

    tell application "iTunes"

        if player state is playing then

            set albumName to (get album of current track)

            set myText to text 1 thru 10 of albumName

        end if

    end tell

   

    temptext = myText

end if

open location "http://bandsite.com/shows/" & myText

repeat while temptext = text

end repeat

 

I keep getting snytax errors. Any help would be greatly appreciated. Thank you!


View the original article here

Thursday, January 17, 2013

Re: How do I set a variable to a spoken word from Speech Recognition?


i dont know but i am wondering answer


View the original article here

how to set the IKImageBrowserView with variable cell sizes?

I am developing a tool which will allows the user to import the video clips and make the movie from those video clips.

To represent the imported video clips i have created the IKImageBrowserView and add the frameimage of the videoclip as a Thumbnail image. up to here everything is working.

But now i wanted to display the thumbnail image size based on the video clip duration. i.e each and every thumbnail image have the different size based on the duration. (i wanted to show the thumbnail image width going to be changed based on the duration of the video clip.

If i use [imageBrowser setCellSize:];then it will affect all the thumbnail sizes. but i wanted to apply different size for each and every thumbnail.

Can anybody help me to solve this problem?

if IKImageBrowserView is not the best suitable for my problem then please suggest me the best control to solve my problem.

Thanks,

Muthulingam


View the original article here

How do I set a variable to a spoken word from Speech Recognition?

I've been wanting to make an Applescript for the speech program, that will play an itunes song. I've got my script made, but my only problem, is i need it to set my variable "song" to whatever i say.

 

The script name is "Play" so that I can say "Computer, play [song name]"

 

I have no idea what to do here to give user input by speech instead of typing, anybody who can help?


View the original article here

how to set the IKImageBrowserView with variable cell sizes?

I am developing a tool which will allows the user to import the video clips and make the movie from those video clips.

To represent the imported video clips i have created the IKImageBrowserView and add the frameimage of the videoclip as a Thumbnail image. up to here everything is working.

But now i wanted to display the thumbnail image size based on the video clip duration. i.e each and every thumbnail image have the different size based on the duration. (i wanted to show the thumbnail image width going to be changed based on the duration of the video clip.

If i use [imageBrowser setCellSize:];then it will affect all the thumbnail sizes. but i wanted to apply different size for each and every thumbnail.

Can anybody help me to solve this problem?

if IKImageBrowserView is not the best suitable for my problem then please suggest me the best control to solve my problem.

Thanks,

Muthulingam


View the original article here

Friday, January 11, 2013

how to invalidate DYLD_INSERT_LIBRARIES environment variable?

I find that in Mountain Lion, DYLD_INSERT_LIBRARIES environment variable is ignored for some applications, like Safari.app, Screen Sharing.app. And after some study, I also know it is probably because that the app is code signed with some special entitlements.

Now I am trying to make this environment variable also ignored for my app. I tried to sign my app with some entitlements but this environment variable is not ignored.  I have tried many entitlement keys listed in the apple doc and all failed.

I notice that Safari.app uses entitlement "com.apple.private.accounts.allacounts" and looks like it is apple perpriotary value and it is not listed in the app doc. I have ever tried to sign my app with this entitlement manually but the application cannot run (taskgated killed it).

 

so my questions is:

1. in order to invalidate DYLD_INSERT_LIBRARIES environment variable for my app, what entitlement key value should I use when signing my app?

2. what is the critetria that Mountain Lion uses to determine whether ignore this enviroment variable or not?

 

Thanks!


View the original article here

Re: how to invalidate DYLD_INSERT_LIBRARIES environment variable?

What are you trying to do? DYLD_INSERT_LIBRARIES has noting to do with entitlements.


View the original article here

Re: how to invalidate DYLD_INSERT_LIBRARIES environment variable?

What are you trying to do? DYLD_INSERT_LIBRARIES has noting to do with entitlements.


View the original article here

Re: how to invalidate DYLD_INSERT_LIBRARIES environment variable?

What are you trying to do? DYLD_INSERT_LIBRARIES has noting to do with entitlements.


View the original article here