Popup dialog for PHP on Windows?

This is a discussion on Popup dialog for PHP on Windows? within the PHP Language forums, part of the PHP Programming Forums category; Rik Wasmus wrote: > On Fri, 06 Jun 2008 23:53:23 +0200, Jerry Stuckle > <jstucklex@attglobal.net&...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 06-07-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Popup dialog for PHP on Windows?

Rik Wasmus wrote:
> On Fri, 06 Jun 2008 23:53:23 +0200, Jerry Stuckle
> <jstucklex@attglobal.net> wrote:
>
>> Rik Wasmus wrote:
>>> On Fri, 06 Jun 2008 23:31:04 +0200, Jerry Stuckle
>>> <jstucklex@attglobal.net> wrote:
>>>
>>>> Rik Wasmus wrote:
>>>>> On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c>
>>>>> wrote:
>>>>>
>>>>>> Sam H wrote:
>>>>>>> I'm writing scripts on Windows that are in PHP. Basically people
>>>>>>> will
>>>>>>> be double clicking the .php file which will run the CLI app. Is
>>>>>>> there
>>>>>>> some way in PHP to pop up a Windows messagebox?
>>>>>>> Thanks
>>>>>>> -S
>>>>>> Not directly. You need the javascript 'alert' function probably.
>>>>> How much trouble could it be integrating javascript in t CLI app....
>>>>> Not impossible, just way overkill :P
>>>>
>>>> And you'd have to have a browser to execute the javascript...
>>> Nope. Does make it easier of course. Without it, probably the most
>>> easy route is to use Java & use rhino to make use of ecmascript.
>>> However, without the context of a browser, of course there is no
>>> window.alert method :). And when one is deploying Java in a CLI PHP
>>> app, one might doubt the sanity of using PHP, possibly switching over
>>> to Java all together (not a fan of Java though), or other languages
>>> with a more mature & easy way to create GUI's.

>>
>> But Rik, you know Java <> Javascript! :-)

>
> Yes, but Rhino IN Java runs javascript (ecmascript).
> http://developer.mozilla.org/en/docs..._documentation
>


Hmmm, interesting. I wasn't familiar with Rhino - but then if I'm doing
Java CLI stuff, I'm typically using the Java GUI, also.

>> I do agree with you that mixing Java and PHP is an unnecessarily
>> complication. Much better to do it in just Java.
>>
>> Unlike you, I like Java. Sure, it's slower than many other languages,
>> but it has its place. And when working on a large system with pieces
>> (i.e. databases and other resources) scattered over multiple systems,
>> Java can have its advantages.

>
> Hmm, there might be some cases it is easier / more maintainable to use
> Java. However, for most uses, being hungry for resources (memory
> footprint being the major one of them most of the time), and indeed the
> fact that it's indeed slow leads me to other choices almost always.
>


True, but the biggest advantage of Java is to offload some of the
processing onto other servers. For instance, sometimes it's just not
possible to do everything you want in just SQL - you need to do more,
such as processing data after you've fetched the rows (other than just
formatting for the display). This is pretty easy to offload onto
another server in Java with RMI. Not so easy with PHP. It's also often
easier to split pieces of a large project up and hand them to different
programmers in Java.

But as I said - I've found it more useful for large scale projects with
multiple servers - projects where you might have 10-100 programmers
working on it. Not the stuff most of us do here.

>> And no, Paul, this time I didn't mix "it's" and "its" :-)

>
> Ha, luckily, not being a native speaker, I seem to have been spared most
> grammatical punishments :P


No, it's not because you're not a native speaker, Rik. It's because
your English is better than that of most Americans :-).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #12 (permalink)  
Old 06-07-2008
AnrDaemon
 
Posts: n/a
Default Re: Popup dialog for PHP on Windows?

Greetings, Sam H.
In reply to Your message dated Friday, June 6, 2008, 21:10:50,

> I'm writing scripts on Windows that are in PHP. Basically people will
> be double clicking the .php file which will run the CLI app. Is there
> some way in PHP to pop up a Windows messagebox?


If under "windows messagebox" you mean opensavedialogue, look at the
php_win32std PHP module (it can be in PECL package, check it yourself)

I've used that once for a tool that must pick a filename from user. It was
fast and dirty.

<?php

dl('php_win32std');
$res = win_browse_file(true, null, null, null, array('Text files (*.txt)' => '*.txt'));

print_r($res);

?>


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

Reply With Quote
  #13 (permalink)  
Old 06-07-2008
The Natural Philosopher
 
Posts: n/a
Default Re: Popup dialog for PHP on Windows?

Rik Wasmus wrote:
> On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c> wrote:
>
>> Sam H wrote:
>>> I'm writing scripts on Windows that are in PHP. Basically people will
>>> be double clicking the .php file which will run the CLI app. Is there
>>> some way in PHP to pop up a Windows messagebox?
>>> Thanks
>>> -S

>> Not directly. You need the javascript 'alert' function probably.

>
> How much trouble could it be integrating javascript in t CLI app....
> Not impossible, just way overkill :P

Muy bad: I assumed he was using a broswer..
Reply With Quote
  #14 (permalink)  
Old 06-26-2008
Charles Calvert
 
Posts: n/a
Default Re: Popup dialog for PHP on Windows?

On Sat, 7 Jun 2008 07:38:41 +0400, AnrDaemon <anrdaemon@freemail.ru>
wrote in <1211414481.20080607073841@freemail.ru>:

>Greetings, Sam H.
>In reply to Your message dated Friday, June 6, 2008, 21:10:50,
>
>> I'm writing scripts on Windows that are in PHP. Basically people will
>> be double clicking the .php file which will run the CLI app. Is there
>> some way in PHP to pop up a Windows messagebox?

>
>If under "windows messagebox" you mean opensavedialogue, look at the
>php_win32std PHP module (it can be in PECL package, check it yourself)


"MessageBox" in windows refers to a particular type of dialog provided
by the OS. It's the sort that you see with a bit of text and then an
assortment of buttons (e.g. "OK" or "OK" and "Cancel"). It's not the
same thing that you were thinking, but I'd be surprised if it's not in
the same module.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research
Reply With Quote
  #15 (permalink)  
Old 06-30-2008
AnrDaemon
 
Posts: n/a
Default Re: Popup dialog for PHP on Windows?

Greetings, Charles Calvert.
In reply to Your message dated Friday, June 27, 2008, 00:20:44,

>>> I'm writing scripts on Windows that are in PHP. Basically people will
>>> be double clicking the .php file which will run the CLI app. Is there
>>> some way in PHP to pop up a Windows messagebox?

>>
>>If under "windows messagebox" you mean opensavedialogue, look at the
>>php_win32std PHP module (it can be in PECL package, check it yourself)


> "MessageBox" in windows refers to a particular type of dialog provided
> by the OS. It's the sort that you see with a bit of text and then an
> assortment of buttons (e.g. "OK" or "OK" and "Cancel"). It's not the
> same thing that you were thinking, but I'd be surprised if it's not in
> the same module.


I know what "messagebox" means in windows, for sure.
But people sometimes tends to name things as they want, not as they named by
developers.
(And about your second part - same here (c), but I can't find module
documentation right now, I have restricted access to internet ATM)


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0