Jump to content

The official custom AppleScript thread.

  • Please log in to reply
20 replies to this topic



    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 295 posts
  • Gender:Male
I am having trouble with an Applescript app Im making. I have it set up to run a script on launch to find the disk number, and pass that as a property. Here is the code:

[codebox]property diskNumber : {}
property listOfDisks : every word of (do shell script "diskutil list | grep EFI | grep -o -e disk[0-9]s[0-9]") as list

on launched theObject
if (number of items of listOfDisks) is greater than 1 then
display dialog "Multiple EFI partitions have been found.
Please choose a partition:" buttons listOfDisks
set the button_pressed to the button returned of the result
set diskNumber to the button_pressed
set diskNumber to item 1 of listOfDisks
end if
log diskNumber
end launched
The problem is that when I launch it, it just throws an applescript error: No result was returned from some part of this expression.(-2763)

No display dialog ever comes up or anything. Any ideas why this isn't working?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy