AutoRemote - Multiple parameters?

411 views
Skip to first unread message

Kyle Wollaston

unread,
May 6, 2014, 10:04:36 PM5/6/14
to joao...@googlegroups.com
Hi guys, I am currently writing a script in EventGhost to send my phone a command with two parameters. 
I want to know how to have multiple parameters that each contain more than one word. For example, I want the message '"param one' 'param two'=:=command" to yield two params instead of four. Is this possible? I don't want to have to do reconstruction on the device end (Variable Split/Section, etc.)

Also another question for joaomgcd, I am trying to use your EG plugin actions in a script but I want to know how to send to a(ll) device(s) instead of hardcoding the key(s). 

Kyle Wollaston

unread,
May 6, 2014, 10:05:48 PM5/6/14
to joao...@googlegroups.com
Currently I am using:

eg.plugins.AutoRemote.SendMessage('MyName', '', 'MyKey', '"param one" "param two"=:=command', '', '', '', '', '')


João Dias

unread,
May 7, 2014, 5:58:42 AM5/7/14
to joao...@googlegroups.com
Yes, send "command=:=param 1=:=param 2" :)
"param 1" will be available in %arcomm1 and "param 2" in %arcomm2



On Wed, May 7, 2014 at 3:05 AM, Kyle Wollaston <tecato...@gmail.com> wrote:
Currently I am using:

eg.plugins.AutoRemote.SendMessage('MyName', '', 'MyKey', '"param one" "param two"=:=command', '', '', '', '', '')


--
You received this message because you are subscribed to the Google Groups "joaomgcd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joaomgcd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kyle Wollaston

unread,
May 7, 2014, 7:34:46 PM5/7/14
to joao...@googlegroups.com
Thank you, I appreciate it. What about my second question?

Kyle Wollaston

unread,
May 7, 2014, 9:24:53 PM5/7/14
to joao...@googlegroups.com
Hi, I have 3 parameters that I am sending from AutoRemote. artist, song, and album.
I was confused when trying to display them on my phone as the first parameter is in par1 while the second and third parameters are in comm1 and comm2..and the actual command name is in comm3.
Shouldn't the 3 parameters be in par1-3 and th command be in comm1?

On Wednesday, May 7, 2014 2:58:42 AM UTC-7, joaomgcd wrote:

Kyle Wollaston

unread,
May 7, 2014, 10:03:35 PM5/7/14
to joao...@googlegroups.com
Okay, sorry for posting about but if the first parameter contains spaces they get split up and this brings me back to my original question. The message "param one=:=param two=:=param three=:=command" should result in:
arpar1: param one
arpar2: param two
arpar3: param three
arcomm: command

Kyle Wollaston

unread,
May 7, 2014, 10:08:33 PM5/7/14
to joao...@googlegroups.com
I have temporarily gotten around it for now by doing a variable set par par(1:) and search , replace " "..but I would like to be able to have it as described above.

João Dias

unread,
May 8, 2014, 5:04:18 AM5/8/14
to joao...@googlegroups.com
Did you check the link I posted above it describes the command system in detail. Please check the examples there and you'll see how it works particularly this part:

You can even have multiple multi-word phrases

If you, for instance. use the command “a b c=:=hi there=:=how are you doing=:=hope everything’s alright”, you’ll have these variables available:

  •  %arpar1 would be “a” (because it’s the first word at the left of =:=)
  •  %arpar2 would be “b” (because it’s the second word at the left of =:=)
  •  %arpar3 would be “c” (because it’s the third word at the left of =:=)
  • %arcomm1 would be “hi there” (because it’s all the words at the right of the first =:=)
  • %arcomm2 would be “how are you doing” (because it’s all the words at the right of the second =:=)
  • %arcomm3 would be “hope everything’s alright” (because it’s all the words at the right of the thrid =:=)
About the script, you can do this:

 for device in eg.plugins.AutoRemote.plugin.devices:
         eg.plugins.AutoRemote.SendMessage(device .name,device.urldevice.key, MESSAGE, u'', u'', u'', '', u'')


On Thu, May 8, 2014 at 3:08 AM, Kyle Wollaston <tecato...@gmail.com> wrote:
I have temporarily gotten around it for now by doing a variable set par par(1:) and search , replace " "..but I would like to be able to have it as described above.

--

Kyle Wollaston

unread,
May 8, 2014, 1:39:31 PM5/8/14
to joao...@googlegroups.com
Yes, I have read that but still don't quite fully understand. How would I send a message with the command "nowplaying" with the parameters artist, album, and song (all more than one word)? The words to the left of the first separator are treated as single word parameters so I don't want to use those. Would :"=:=param one=:=param two=:=param three=:=nowplaying" be the correct solution?

João Dias

unread,
May 8, 2014, 1:44:26 PM5/8/14
to joao...@googlegroups.com
nowplaying=:=The Artist=:=The Album=:= The Song

:)

Kyle Wollaston

unread,
May 8, 2014, 8:55:05 PM5/8/14
to joao...@googlegroups.com
Sweet, that makes much more sense to me. I appreciate the help! One more question, why do I have to do Autoremote wifi enable and Auto remote device send info every so often? I thought you only had to do it once at boot? Do I have to do it everytime wifi connects to my network?

Kyle Wollaston

unread,
May 8, 2014, 9:10:45 PM5/8/14
to joao...@googlegroups.com
Also, fyi: I'm using the AutoRemote Beta and I can't clear the Tasker variables like the prefix etc I change it to '' and it says variable names must be only lowercase letters.

João Dias

unread,
May 9, 2014, 5:02:29 AM5/9/14
to joao...@googlegroups.com
Thanks for the report :) Will fix.

About the wifi service, you need to do it every time you connect to a wifi network so you can be sure the other device has the most up to date local IP.

Thanks!


On Fri, May 9, 2014 at 2:10 AM, Kyle Wollaston <tecato...@gmail.com> wrote:
Also, fyi: I'm using the AutoRemote Beta and I can't clear the Tasker variables like the prefix etc I change it to '' and it says variable names must be only lowercase letters.

Kyle Wollaston

unread,
May 9, 2014, 7:03:43 AM5/9/14
to joao...@googlegroups.com
If my local IP is static do I still need to do so? Or can I omit the send device info?

João Dias

unread,
May 9, 2014, 7:07:21 AM5/9/14
to joao...@googlegroups.com
If it's always the same IP you don't need to send the info, no :)


On Fri, May 9, 2014 at 12:03 PM, Kyle Wollaston <tecato...@gmail.com> wrote:
If my local IP is static do I still need to do so? Or can I omit the send device info?

Kyle Wollaston

unread,
May 9, 2014, 7:42:38 AM5/9/14
to joao...@googlegroups.com
If I don't do that, EG can't send a msg through Wifi to my phone yet my phone can send to EG via Wifi. Also AR crashed twice for no apparent reason, just sent a report.
Reply all
Reply to author
Forward
0 new messages