Page 1 of 1

PHP, XP & Clipboard

Posted: Fri Dec 12, 2003 1:54 am
by Toune
Hi,

In windows XP environnement.

I want to read the text clipboard,
modify it with my php program
and write the result in the windows clipboard.

But I can't found a library or a function to access clipboard...

Somebody can help me ?

Thank's

Toune

Posted: Fri Dec 12, 2003 2:32 am
by William
i dont think PHP can do that, Might want to try Java Script or wait for somone that might know.

Posted: Fri Dec 12, 2003 9:15 am
by Weirdan
Heh, PHP can. You can use [php_man]W32api[/php_man].

Posted: Mon Dec 15, 2003 2:48 am
by Toune
Hi,

Thank's for your response. I don't know this possibility.

It's good for my problem but I can't use MessageBox... My program bug... Or It's me ??? :oops:

<?php
error_reporting(E_ALL);
define("MB_OK", 0);

$api = new win32();

$a=$api->registerfunction("int MessageBoxA (int hWnd,
string &title,
string &lpCaption,
int uType )
From user32.dll");
print ("Answer: $a\n");
$titre="My Title";
$msg="My Message";
$hnd=0;
$a=$api->MessageBoxA($hnd, $titre, $msg, MB_OK);
print ("Answer: $a\n");
$a=$api->unregisterFunction("MessageBoxA");
print ("Answer: $a\n");

?>

Answer: 1
Answer: 0 ans no windows on the display !
Answer: 1

Can you help me ?

Thank's

Toune