summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_dcopstart.js
blob: abba0e9f2dd089e3e2fe70357bd372d12f0e6e7f (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

var d = new DCOPClient();

if ( d.attach())
{
	println("Attached...");
	if( d.isAttached() )
	{
		var app = d.dcopStart("kwrite");
		if( app != ""  )
		{
			println( "Got ref");
			var worked = d.send(app, "EditInterface#1","setText(TQString)", "This is a test");
			println("Returned a : " + worked);
		}
		else
			println( "Error: no appname returned." );

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

println( "Done" );