|
|
@ -652,7 +652,7 @@ class Samples:
|
|
|
|
def getCode(self):
|
|
|
|
def getCode(self):
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'dcopclient = tdecore.KApplication.dcopClient()',
|
|
|
|
'dcopclient = tdecore.TDEApplication.dcopClient()',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("klipper") ]',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("klipper") ]',
|
|
|
|
'd = dcopext.DCOPApp(apps[0], dcopclient)',
|
|
|
|
'd = dcopext.DCOPApp(apps[0], dcopclient)',
|
|
|
|
'result,typename,data = d.appclient.call(apps[0],"klipper","getClipboardContents()","")',
|
|
|
|
'result,typename,data = d.appclient.call(apps[0],"klipper","getClipboardContents()","")',
|
|
|
@ -670,7 +670,7 @@ class Samples:
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'dcopclient = tdecore.KApplication.dcopClient()',
|
|
|
|
'dcopclient = tdecore.TDEApplication.dcopClient()',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("amarok") ]',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("amarok") ]',
|
|
|
|
'app = apps[0]',
|
|
|
|
'app = apps[0]',
|
|
|
|
'd = dcopext.DCOPApp(app, dcopclient)',
|
|
|
|
'd = dcopext.DCOPApp(app, dcopclient)',
|
|
|
@ -695,7 +695,7 @@ class Samples:
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'import qt, tdecore, dcop, dcopext',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'dcopclient = tdecore.KApplication.dcopClient()',
|
|
|
|
'dcopclient = tdecore.TDEApplication.dcopClient()',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kopete") ]',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kopete") ]',
|
|
|
|
'app = apps[0]',
|
|
|
|
'app = apps[0]',
|
|
|
|
'd = dcopext.DCOPApp(app, dcopclient)',
|
|
|
|
'd = dcopext.DCOPApp(app, dcopclient)',
|
|
|
@ -731,7 +731,7 @@ class Samples:
|
|
|
|
' return ba',
|
|
|
|
' return ba',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'# Get the KWord DCOP client.',
|
|
|
|
'# Get the KWord DCOP client.',
|
|
|
|
'dcopclient = tdecore.KApplication.dcopClient()',
|
|
|
|
'dcopclient = tdecore.TDEApplication.dcopClient()',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kword") ]',
|
|
|
|
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kword") ]',
|
|
|
|
'if len(apps) < 1: raise "No KWord instance is running. Please start KWord before!"',
|
|
|
|
'if len(apps) < 1: raise "No KWord instance is running. Please start KWord before!"',
|
|
|
|
'appname = apps[0]',
|
|
|
|
'appname = apps[0]',
|
|
|
|