PHP, XP & Clipboard

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Toune
Forum Newbie
Posts: 5
Joined: Fri Dec 12, 2003 1:54 am

PHP, XP & Clipboard

Post 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
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

i dont think PHP can do that, Might want to try Java Script or wait for somone that might know.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Heh, PHP can. You can use [php_man]W32api[/php_man].
Toune
Forum Newbie
Posts: 5
Joined: Fri Dec 12, 2003 1:54 am

Post 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
Post Reply