ired syntax help, escaping chars

Posted on
Fri Mar 20, 2015 4:15 pm
dtich offline
Posts: 798
Joined: Sep 24, 2005

ired syntax help, escaping chars

question on scripting guys.

finally upgrading ired to ired2.. the object classes have changed in ired2 so script has to be tweaked, but i'm having an issue with syntax. i have a situation where i need to submit to ired the same variable twice, separated by a slash. how do i write this??? never got the hang of escaping. ;)



Code: Select all
i have slashes in my device names, how do i write that so it parses correctly with the same variable? i.e..:


   tell application "iRed2" to perform action (Code irCode of Device myRemote / myRemote)
           
the part in question is the "myRemote / myRemote" part. i need the slash to be quoted as a string in between the two vars, so the resulting string is as in:

   --perform action (Code "MUTE/Z1" of Device "Anthem/D2v/Anthem/D2v”)


(  for reference: myRemote = “Anthem/D2v” ; irCode = “MUTE/Z1”  )



any help appreciated, thanks!!

Posted on
Sat Mar 21, 2015 2:41 pm
dtich offline
Posts: 798
Joined: Sep 24, 2005

Re: ired syntax help, escaping chars

this is possible right? or am i going to need to find a work around? like renaming all 100 or so ired commands.... ulp.

Posted on
Sat Mar 21, 2015 6:36 pm
dtich offline
Posts: 798
Joined: Sep 24, 2005

Re: ired syntax help, escaping chars

jeepers. solved, and stupidly easy, just didn't try it...

thanks for looking!


[embarrassingly:

Code: Select all
set RemoteDev to {myRemote, "/", myRemote}

works just fine. d'oh. :D]

Posted on
Sun Mar 22, 2015 10:08 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: ired syntax help, escaping chars

I'm glad you got it up and working again. :-)

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 32 guests