Variable substitution
In Exec(), Make(var,...), Load(), Include() commands is it possible to use internal "variables". Several of them are predefined.
$(Home)
User home directory ($HOME) will be substituted instead of $(Home):
2=ExecAndSet(list,replace,Files in home,ls $(Home))
$(Mode)
Current mode will be substituted instead of $(Mode):
3=Make(mode,xmms);Exec(kdialog --msgbox "New mode is $(Mode)")
$(CfgDir)
Directory with configuration files substituted instead of $(CfgDir).
In most cases it is /usr/share/anyremote/cfg-data. Actually it depends on --prefix value which was used at build time.
It is posible to override this by setting AR_CFGDIR environment value.
3=ExecAndSet(list,replace,Cfg Files,ls -1 $(CfgDir))
$(CallId)
[AT-mode only] Caller ID will be substituted (if determined) instead of $(CallId):
(InCall)=Exec(kdialog --msgbox $(CallId))
$(BtAddr)
[Server-mode only] $(BtAddr) variable will be substituted with bluetooth address of the phone after successful connection by java client.
If connection absent (or established not in Server mode through bluetooth) this variable will have empty value.
(Connect)=Exec(kdialog --msgbox "Connected by $(BtAddr)")
$(Bluez)
$(Bluez) variable will have value yes if anyRemote is compiled with Bluez support, or will have value no if anyRemote is compiled without Bluez support.
(Init)=Exec(kdialog --msgbox "anyRemote compiled with Bluez - $(Bluez)")
$(Xtest)
$(Xtest) variable will have value yes if anyRemote is compiled with XTest support, or will have value no if anyRemote is compiled without XTest support.
(Init)=Exec(kdialog --msgbox "anyRemote compiled with XTest - $(Xtest)")
$(MixerCard)
This variable is used in configuration files which are uses amixer utility to control sound volume.
$(MixerCard) variable will have default value 0. You can reset this variable to appropriate value if Your system have different sound card configuration.
(Init)=Make(var,MixerCard,by_value,1)
The most simple way to do this is to use hook_* files. So, just add command
Make(var,MixerCard,by_value,1)
to $HOME/.anyRemote/hook_init file.
$(MixerChannel)
This variable is used in configuration files which are uses amixer utility to control sound volume.
$(MixerChannel) variable will have default value Master. You can reset this variable to appropriate value if Your system have different sound card configuration.
(Init)=Make(var,MixerChannel,by_value,PCM)
The most simple way to do this is to use hook_* files. So, just add command
Make(var,MixerChannel,by_value,PCM)
to $HOME/.anyRemote/hook_init file.
Parametrized replies
[Server-mode only] There are $(Param) and $(Index) variables defined in handling command issued from java client menus. Use $$ inside braces to specify parametrized commands.
Choose($$)=Exec(xmmsctrl track $(Index));\ Exec(kdialog --msgbox "Selected track is $(Param)")
User-defined variables
In addition to the predefined internal variables it is possible to define custom internal variables with Make(var,....) command.
5=Make(var,my_variable,by_value,3.141526); 5=Make(var,now_is,echo "Now is "`date`);