summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_dcopref.js
blob: 3576a4aaf36ee2289dab18b9938215f9239b70bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env kjscmd

println( "Hello World" );

var d = new DCOPClient();

if ( d.attach())
{
	println("Attached...");
	if( d.isAttached() )
	{
		var ref = d.call("kdesktop", "KDesktopIface", "background()");
		if( ref )
		{
			println( "Got ref");
			var data = ref.call("isCommon()");
			println("Returned a : " + data);
		}

	}
	else
		println( "Error!" )
}
else
	println("Failed...");

println( "Done" );