AppleScriptObjC & Cocoa
AppleScriptObjC & Cocoa
- Subject: AppleScriptObjC & Cocoa
- From: Kellen Ruyle via AppleScript-Users <email@hidden>
- Date: Tue, 23 Jun 2020 10:45:40 -0500
I knew I could count on this amazing group. Everyone is super helpful on this
user list.
Hey Jean-Christophe!
Thank you for providing the resources to MacScripter and the book.
I love the documented ASOC script for creating XML files. I am going to really
dive into this so I can make sure to understand it.
I am saving all these sources for references.
Thanks again!
Hey Shane!
OK good to know. I was thinking I may have to go the Xcode route. I only use it
really to write in Swift and my knowledge in Objective-C is not very extensive.
But may be worth my time to learn the syntax.
I’m not sure how complex I was really wanting to get but maybe would be worth
it, and like you said, just make apps that have an initial interface.
Also thank you for providing the link to the video, that’s super helpful.
Yeah, noticed AppleScriptObjC Explored and it was older but has AppleScriptObjC
changed that drastically? Also, is there a benefit to AppleScriptObjC other
than making apps? As Jean-Christophe mentioned earlier it’s the book to get on
this subject so definitely interested.
Hey Jim!
Xojo may be a solution. And thanks for the links to the tutorials. This
actually may be the solution for my GUI AppleScript automation apps.
And I have programmed in OOP languages. But as a computer science major I am
just getting started LOL, so not by any means an expert, but I got to start
somewhere, I suppose.
And yes, very much interested Xojo; I will investigate and try it out. And
indeed that would be good to have another AppleScripter to work with!
Hey Bob!
Funny thing, I just purchased that! Because I am getting into app development.
I just thought to make more automation focused apps with a GUI it would be
helpful to know AppleScriptObjC.
I saw earlier an email thread asking about osascript and Swift, that’s
something I need to dive into more. So much to learn, I still have!
I’m curious, for I have not been through the eBook, yet? What your thoughts are
on it? I am pretty excited to go through it myself.
Hey Frank,
I did check it out and this is another great alternative, and like you said
sometimes dialogs are all you need, so this would come in handy for those types
of scripts. So, I will add this to my development tools. Thanks again!
Again, I want to thank everyone for their feedback and helpful advice. I feel
really feel supported by this community on my journey of being an
AppleScripter.
Sent from my iPad
> On Jun 22, 2020, at 2:00 PM, email@hidden wrote:
>
> Send AppleScript-Users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AppleScript-Users digest..."
>
>
> Today's Topics:
>
> 1. AppleScriptObjC & Cocoa (Kellen Ruyle)
> 2. Re: AppleScriptObjC & Cocoa (Jean-Christophe Helary)
> 3. Re: AppleScriptObjC & Cocoa (Shane Stanley)
> 4. Re: AppleScriptObjC & Cocoa (Jim Underwood)
> 5. Re: AppleScriptObjC & Cocoa (Bob Stern)
> 6. Re: AppleScriptObjC & Cocoa (email@hidden)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 21 Jun 2020 20:37:46 -0500
> From: Kellen Ruyle <email@hidden>
> To: Applescript-users list <email@hidden>
> Subject: AppleScriptObjC & Cocoa
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
> Hello!
>
> being fairly new to AppleScripting, some of the books I?ve been going through
> discuss AppleScript Studio and being able to create an AppleScript
> application in Xcode. Of course, AppleScript Studio is not a thing. But seems
> like pretty cool concept making your scripts with a user interface. Is there
> a way to do this currently? I found that it has largely been replaced by
> AppleScriptObjC and the Cocoa framework. So can you create AppleScript apps
> with GUI? And is it beneficial to learn the Cocoa framework, Objective-C, and
> thus AppleScriptObjC if I ever want to write more advanced scripts,
> especially with GUI?s? If so, are there any resources out there? Sorry for
> the lengthy email!
>
> Kind regards,
> Kell
>
> Sent from my iPhone
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 22 Jun 2020 10:49:30 +0900
> From: Jean-Christophe Helary
> <email@hidden>
> To: Kellen Ruyle <email@hidden>
> Cc: Applescript-users list <email@hidden>
> Subject: Re: AppleScriptObjC & Cocoa
> Message-ID:
> <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
>
>
>>>>>> On Jun 22, 2020, at 10:37, Kellen Ruyle via AppleScript-Users
>>>>>> <email@hidden> wrote:
>> Hello!
>> being fairly new to AppleScripting, some of the books I?ve been going
>> through discuss AppleScript Studio and being able to create an AppleScript
>> application in Xcode. Of course, AppleScript Studio is not a thing. But
>> seems like pretty cool concept making your scripts with a user interface. Is
>> there a way to do this currently? I found that it has largely been replaced
>> by AppleScriptObjC and the Cocoa framework. So can you create AppleScript
>> apps with GUI? And is it beneficial to learn the Cocoa framework,
>> Objective-C, and thus AppleScriptObjC if I ever want to write more advanced
>> scripts, especially with GUI?s? If so, are there any resources out there?
>> Sorry for the lengthy email!
>
> There are plenty of resources at MacScripter:
> https://macscripter.net/viewtopic.php?id=30274
>
> And the book you need to read is:
> http://www.macosxautomation.com/applescript/apps/
>
> I have a documented ASOC script for creating XML files that tries to point at
> the references in the doc to make sense of all that (because I'm really not a
> "native" programmer):
>
> https://mac4translators.blogspot.com/2018/02/this-article-is-attempt-at-putting.html
>
>
> --
> Jean-Christophe Helary @brandelune
> http://mac4translators.blogspot.com
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 22 Jun 2020 12:59:43 +1000
> From: Shane Stanley <email@hidden>
> To: AS users <email@hidden>
> Subject: Re: AppleScriptObjC & Cocoa
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
>>>>>> On 22 Jun 2020, at 11:37 am, Kellen Ruyle via AppleScript-Users
>>>>>> <email@hidden> wrote:
>> So can you create AppleScript apps with GUI?
>
> Yes. In Xcode you start a new project of type "AppleScript App", then use
> AppleScriptObjC to write the code.
>
>> And is it beneficial to learn the Cocoa framework, Objective-C, and thus
>> AppleScriptObjC if I ever want to write more advanced scripts, especially
>> with GUI?s?
>
> It depends a bit on how much effort you wish to expend, and your ultimate
> aim. Yes, you can write complex AppleScriptObjC-based apps. However, there
> are some potential shortcomings. In particular, AppleScriptObjC memory
> management is pretty awful. The upshot is that for apps where you want to
> show an initial interface and perhaps display progress, it works fine. But if
> you want a more fully fledged app that you keep running all the time, or one
> that is very complex, there's a reasonable chance you'll eventually run into
> memory problems. There are also other limitations that may or may not matter
> to you (providing proper undo support is problematic, for example).
>
>> If so, are there any resources out there?
>
> There's not much specific the using AppleScript in Xcode-based apps. You can
> probably find an old Apple example, plus it was covered in a WWDC video when
> it was introduced. There's also a movie around that covers making interface
> connections, linked to here:
> <http://www.macosxautomation.com/applescript/apps/>. But there's nothing
> recent.
>
> I wrote a book on it ('AppleScriptObjC Explored'), but I no longer sell it
> except by request, because it hasn't been updated for several versions of
> Xcode/macOS. Xcode changes regularly, and there simply wan't the demand to
> justify further updates.
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 22 Jun 2020 09:58:33 +0000
> From: Jim Underwood <email@hidden>
> To: "ASUL (AppleScript)" <email@hidden>
> Subject: Re: AppleScriptObjC & Cocoa
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Kell,
>
> So can you create AppleScript apps with GUI?
>
> I had the same question, and the same quest, several years ago.
> Short Answer: There is no good way to create AppleScript GUI Apps
>
> I came to that conclusion after a lot of inquiries and testing. I gave using
> Xcode a shot, but it is just too hard to learn for the benefit.
>
> However, recently I discovered (re-discovered actually) what may be a good
> alternative: Xojo<https://www.xojo.com/>
>
> Xojo does NOT use AppleScript as its native language, but it can run
> AppleScripts<https://docs.xojo.com/UserGuide:AppleScripts> and get the
> results.
>
> Xojo has an excellent GUI IDE for quickly creating a very nice, Cocoa-based,
> GUI App. It is basically a GUI designer using drag/drop from a wide
> selection of controls onto a window. Of course you can subclass and create
> your own classes and controls. Here's a quick video to introduce you to
> Xojo: Xojo Desktop Tutorial - Make a Task Manager App
> <https://www.youtube.com/watch?v=nhX4omEzcik&feature=youtu.be>
>
>
> I have embarked on a journey to learn Xojo, and use it for my more
> GUI-demanding AppleScript automations.
>
> The Xojo development app is free to download and fully use. You would only
> need to pay a modest license fee<https://www.xojo.com/store/> if you decide
> you want to create distributable apps.
>
> I have not yet purchased a license. I am waiting until I have developed a
> complex app using AppleScript that serves as my proof-of-concept. Having
> said that, I really like everything I have seen so far. If you have ever
> programed in a real OOP (Object Oriented Programming) language, then you will
> like Xojo. It is the easiest to learn OOP language I have ever used.
>
> Xojo has an active and fairly friendly Forum/Community. There are many video
> tutorials and other training materials available.
>
> If you decide to investigate or try Xojo, I would love to have another
> AppleScripter to work with. Please let me know if you are interested in Xojo.
>
> Full Disclaimer:
> I realized after typing all this that it might sound like and ad for Xojo.
> Nothing could be further from the truth.
> I have no relationship with Xojo other than being a user, and potential
> customer.
>
>
>
>
> Best Regards,
>
>
>
> Jim Underwood
>
> aka JMichaelTX
>
>
> From: "ASUL (AppleScript)" <email@hidden>
> Reply-To: Kellen Ruyle <email@hidden>
> Date: Sunday, June 21, 2020 at 8:38 PM
> To: "ASUL (AppleScript)" <email@hidden>
> Subject: AppleScriptObjC & Cocoa
>
> Hello!
>
> being fairly new to AppleScripting, some of the books I?ve been going through
> discuss AppleScript Studio and being able to create an AppleScript
> application in Xcode. Of course, AppleScript Studio is not a thing. But seems
> like pretty cool concept making your scripts with a user interface. Is there
> a way to do this currently? I found that it has largely been replaced by
> AppleScriptObjC and the Cocoa framework. So can you create AppleScript apps
> with GUI? And is it beneficial to learn the Cocoa framework, Objective-C, and
> thus AppleScriptObjC if I ever want to write more advanced scripts,
> especially with GUI?s? If so, are there any resources out there? Sorry for
> the lengthy email!
>
> Kind regards,
> Kell
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20200622/59da9cf9/attachment.htm>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 22 Jun 2020 04:02:06 -0700
> From: Bob Stern <email@hidden>
> To: "email@hidden"
> <email@hidden>
> Subject: Re: AppleScriptObjC & Cocoa
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
>>>>>> On Jun 22, 2020, Jim Underwood wrote:
>> Xojo does NOT use AppleScript as its native language, but it can run
>> AppleScripts and get the results.
>> Xojo has an excellent GUI IDE for quickly creating a very nice, Cocoa-based,
>> GUI App. It is basically a GUI designer using drag/drop from a wide
>> selection of controls onto a window.
>
>
> Unless you have another reason to use Xojo, I?d recommend using Swift and
> Xcode to create a GUI app. Swift?s ?Process? class can run the osascript
> shell command to run a compiled or uncompiled AppleScript file (.scpt or
> .applescript), and Swift?s ?Pipe? class can easily read the result returned
> by the AppleScript.
>
> Paul Hudson?s ?Hacking with Mac? eBook is an easy way to learn to create
> simple GUI elements in Swift. It?s half price ($20) until June 3o:
>
> https://gumroad.com/l/hwmacos/wwdc20
>
> Paul has also has a free tutorial covering the Swift language itself, i.e.,
> the platform-independent features:
>
> https://www.hackingwithswift.com/sixty
>
> Bob
>
> ------------------------------
>
> Message: 6
> Date: Mon, 22 Jun 2020 07:14:26 -0700
> From: email@hidden
> To: "ASUL (AppleScript)" <email@hidden>
> Subject: Re: AppleScriptObjC & Cocoa
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=utf-8
>
>>>>>> On Jun 22, 2020, at 2:58 AM, Jim Underwood via AppleScript-Users
>>>>>> <email@hidden> wrote:
>> However, recently I discovered (re-discovered actually) what may be a good
>> alternative: Xojo
>
> In case anyone is looking for just native dialogs for their scripts, check
> out Pashua. From the web page:
>
> Pashua is a tool for creating native Aqua dialog windows from programming
> languages that have none or only limi?ted support for graphic user
> inter?faces on Mac OS X, such as Apple?Script, Bash scripts, JavaScript,
> Perl, PHP, Python, Ruby, Tcl and others...
>
> https://www.bluem.net/en/projects/pashua/
>
> Sometimes, it?s all you need. :)
>
> Frank
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/applescript-users
>
>
> ------------------------------
>
> End of AppleScript-Users Digest, Vol 17, Issue 83
> *************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden