Compile Errors in Applescript for iRed2

Posted on
Tue Oct 09, 2012 10:18 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Compile Errors in Applescript for iRed2

I have a number of iRed2 actions which had worked flawlessly for some time and now have stopped working for some strange reason. Here is an example of a simple script and the errors I am getting. THis script used to compile just fine. Now it doesn't:

tell application "iRed2" to perform action Code "Volume Up" of Device "Onkyo/TX-NR3008" using module "IRTrans LAN 43988 - MBR" using led "all"

The compile error I get highlights the words "perform action" and the message is "A identifier can't go after this identifier".

I get this error on all the scripts; they previously compiled just fine.

Any ideas?

Posted on
Wed Oct 10, 2012 2:38 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Compile Errors in Applescript for iRed2

I have no experience with the iRed2 application, but do have some with AppleScript.

Are you sure the iRed2 application can still be opened on your hard drive? It sounds like AppleScript isn't able to read the dictionary for iRed2 which defines those verbs. Perhaps the application name changed or you have more than one copy of the app on your system. If you have more than one copy of the application on your system, the OS can become confused and you'll need to specify the full UNIX path to the specific application you're referring to in the "tell application" portion (e.g. tell application "/Applications/Utilities/iRed2.app").

Regards,
Nathan

Posted on
Wed Oct 10, 2012 8:17 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Compile Errors in Applescript for iRed2

post your code

Posted on
Sat Oct 13, 2012 8:29 am
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Compile Errors in Applescript for iRed2

Yes. iRed runs fine by itself, and the commands I'm trying to run--and had no problem executing previously--work just fine when I am calling them from iRed directly.

As to the code, it is posted in the first post:

tell application "iRed2" to perform action Code "Volume Up" of Device "Onkyo/TX-NR3008" using module "IRTrans LAN 43988 - MBR" using led "all"

The compile error I get highlights the words "perform action" and the message is "A identifier can't go after this identifier".

Posted on
Sat Oct 13, 2012 12:40 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Compile Errors in Applescript for iRed2

Have you tried rebooting the Mac? The AppleScript interpreter can sometimes get into a bad state. Also try bracketing it with:

Code: Select all
using terms from "iRed2"

end using terms

to see if that helps.

Image

Posted on
Sun Oct 21, 2012 4:48 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Compile Errors in Applescript for iRed2

Mystery solved. Because I was having other problems with iRed I reinstalled it a couple of times. The operating system named it "iRed2 4". When I renamed it back to iRed2 everything compiled perfectly.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 11 guests