%
% anyremote configuration file for  kdialog --msgbox management.
%

% STATUS stable
% XTEST no
% SOUND no
% ENV no

GuiAppName=Kdialog test
GuiAppType=Example
GuiAppBinary=true
GuiAppProtocols=AT
GuiAppDesc=Simple example of configuration file.

[Protocol]=AT

% aliased keys
Answer=SendCKPD(E);Make(disconnect);
Cancel=Exit;SendCKPD(E)

(Init)=\
	Include($(CfgDir)/Utils/aliases-at.cfg);\
	Make(var,TwoWayComm,by_value,true);\
	Macro(CHECK_RFCOMM_DEVICE);\
	Make(var,ToMainMenu,by_value,:R);\
	Exec(kdialog --msgbox "Initialized");\
	Make(alarm,/tmp/alarm1,ALARM1);\
	Make(alarm,/tmp/alarm2,ALARM2);

(InCall)=Exec(kdialog --msgbox "A call from $(CallId)");Make(remote,off);
(EndCall)=Make(remote,on);Exec(kdialog --msgbox CALL_END)

(Connect)=Exec(kdialog --msgbox Connected)
(Disconnect)=Exec(kdialog --msgbox Disconnected)


1=Exec(kdialog --msgbox 1)
2=Exec(kdialog --msgbox 2)
3=Exec(kdialog --msgbox 3)
4=Exec(kdialog --msgbox 4)
5=Exec(kdialog --msgbox 5)
6=Exec(kdialog --msgbox 6)
7=Exec(kdialog --msgbox 7)
8=Exec(kdialog --msgbox 8)
9=Exec(kdialog --msgbox 9)
0=Exec(kdialog --msgbox 0)

% Multikey commands
* * =Exec(F="$HOME/.anyRemote/anyrem.hlp";echo "Just press buttons and inspect results" > $F);\
	Macro(SHOW_HELP);
	
# 1=Exec(kdialog --msgbox Hash_1)
# 2=Exec(kdialog --msgbox Hash_2)

EMPTY=Exec(kdialog --msgbox EMPTY)
ALARM1=SendCKPD(* 1 *);Exec(kdialog --msgbox "Alarm 1")
ALARM2=SendCKPD(* 2 *);Exec(kdialog --msgbox "Alarm 2")

[End]
