Re: Document flow

2006-02-28 Thread Johan Lindstrom

At 19:31 2006-02-28, Alejandro Santillan Iturres wrote:

Anyone know about a perl module for document flow management?


Not sure what you mean by _document_ flow, but perhaps this?
http://search.cpan.org/~cwinters/Workflow-0.17/


/J

 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in goto behavior

2005-07-13 Thread Johan Lindstrom

At 15:55 2005-07-13, John Deighan wrote:
but that's another matter. (We initially used a goto FINISH, but I hated 
that, too. You can use a break if you're in a loop.) We use a method 
that I really don't have time to describe now, but doesn't use a goto. I 
hate goto's, but for the example above, it's efficient and much clearer 
than e.g. setting up a hash of op names and code to handle each op.


I think you just demonstrated why the dispatch table really is the way to 
go :)


For instance, did you remember to wrap the goto in an eval to catch missing 
labels?


It's not that goto is inherently bad, but it has a so very, very, very 
specific niche in modern languages with other program flow constructs. The 
only useful example I can think of is in C where you can use it to simplify 
resource allocation/deallocation. But in Perl... no.


Unless, of course, you're talking about goto LINE:
http://search.cpan.org/~abergman/Acme-Goto-Line-0.01/Line.pm

;)


/J

 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Importing Identifiers from Main::

2005-06-30 Thread Johan Lindstrom

At 07:34 2005-06-30, L. Neil Johnson wrote:

As mentioned previously, I got tired of editing the absolute indices (e.g.,
$trade[$i]-[6]) every time the order or meaning of an element of the 
anonymous

arrays changed; so in main I defined typeglobs:


This is what I meant when I said a hash is a good solution to this problem. 
You're not really interested in the order, you want to access each element 
by a convenient name.


It sounds like a bit of data to keep in memory, so going from an array to a 
hash may not be feasible because of that, but if it is it would look like 
this instead:


$trade[$i]-{time_elapsed}

If your available memory can take this hit, I'd consider that approach a 
lot more maintainable. If not, go with either exported constants or simply 
$UPPER_CASE_VARIABLES as named indices into the array.


And to me it looks like the solution would be more clear with each record 
being an object, but if you're not familiar with OO, don't start 
introducing it in this program. Try it out with something small and new.


http://www.manning.com/books/conway is excellent.


/J

 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Importing Identifiers from Main::

2005-06-29 Thread Johan Lindstrom

At 08:57 2005-06-29, L. Neil Johnson wrote:

Problem Statement:  The main program creates an array of pointers to


(Besides the point: there are no pointers in Perl. There are references 
though.)




anonymous arrays, each of which has about 10 elements.  Since I am in the
development phase, I keep changing the order and identity of the elements.


So maybe if the order isn't important you could use a hash instead and use 
meaningful names (strings) as keys?




 Because there are many lines of code that reference those elements, I
abandoned numeric offsets (indices) and went to variable offsets (actually
I use typeglob refs to constants to catch instances where I might
accidentally try to change one).  I also coded a module with subroutines


This also sounds more like a hash.



Question: What's the best way to handle this situation?


If you're familiar with OO, that sounds like the way to go. You have data. 
You have subs that act on this data. That's a class right there.




Can I export those
offsets from main:: and use them in the module? Or is there some pragma
that can be used to generate compile-time constants with global visibility?
 Any suggestion would be appreciated.


Create a new module for the constants.

perldoc Exporter or
http://search.cpan.org/~nwclark/perl-5.8.7/lib/Exporter.pm
http://search.cpan.org/~nwclark/perl-5.8.7/lib/Exporter.pm#How_to_Export
http://search.cpan.org/~nwclark/perl-5.8.7/lib/Exporter.pm#How_to_Import


/J

 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::GUI

2005-04-19 Thread Johan Lindstrom
At 23:35 2005-04-18, Peter Eisengrein wrote:
 $W-{dialogui} = 1;

 Is this correct?

Actually it is $W-{-dialogui} = 1;
Ehrm... Sorry about that :)
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WIN32::GUI

2005-04-18 Thread Johan Lindstrom
At 09:49 2005-04-17, Octavian Rasnita wrote:
Does anyone know what Windows graphics library is used by Win32::GUI?
The native Windows libraries.

I have seen that all the programs which are using the standard Win32
graphics library are very accessible for the blind (for screen readers), but
the programs which are created using Win32::GUI in perl are not.
In what way are they not accessible?

I have tested a few sample programs made with Win32::GUI and they were not
accessible using the keyboard (I could not move the focus from a control to
the next control by pressing tab), but is there a posibility that those
samples were not made very well, and I might create accessible programs
using Win32::GUI also?
Try setting
$win-{dialogui} = 1;
to enable that.
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: TVGuide

2005-03-28 Thread Johan Lindstrom
At 16:24 2005-03-28, Jerry Kassebaum wrote:
use LWP;
$browser=LWP::UserAgent-new;
$url=http://tvguide.com/;;
$response=$browser-post($url, ['name'='email', 'id'='email', 
'value'='[EMAIL PROTECTED]',]);
print$response;
What you get back is a HTTP::Response object. Reading the docs for that 
class (perldoc HTTP::Response) says the HTML you want to scrape is in 
$response-content.

Read lwpcook (perldoc lwpcook) to understand the issues at hand, then 
install WWW::Mechanize and read the docs for that module. It's even more 
adapted to being a web browser than LWP::UserAgent and will make your life 
a lot easier.

This is a good (but old) introduction to Mechanize:
http://www.perladvent.org/2002/16th/
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RFC: Module: Win32::Word::Document::Writer

2005-03-28 Thread Johan Lindstrom
Hi all!
I have written a module for creating MS Word documents using the Win32::OLE 
module. It's a wrapper for getting things done a little more easily than 
using the DOM directly, and it has quite a few workarounds to bugs and 
problems with Word.

Anyway, what I'm most interested in now is name suggestions. My currently 
best idea is:

Win32::Word::Document::Writer
It's a bit long, but there are reasons for all the parts:
Win32 - because it's windows specific (but happens to be an implementation 
detail, so I wouldn't mind losing it).

Document::Writer - Writer because it follows the tradition of RTF::Writer 
and a lot of other modules. And I'd like to not hog the entire 
Word::Document namespace.

Word::Document - Document, because there may be other Word::* modules 
like... I don't know... Word::Dotfile or something.

Any ideas on this?
FYI:
There is also another module, Win32::Word::Document::Converter::FromHTML, 
which converts a HTML document to a Word document, and 
Win32::Word::Document::Converter::FromWeb which uses FromHTML to convert 
many web pages to a single Word document.

FYI:
This is the SYNOPSIS section. But looking at the interface, I'm inclined to 
simplify and unify it a little.

use Win32::Word::Document::Writer;
my $oWriter = Win32::Word::Document::Writer-new();
#Adding text and paragraphs with different styles
$oWriter-WriteParagraph(Example document, 1); #Heading 1
$oWriter-WriteParagraph(Usage, 2);#Heading 2
$oWriter-WriteParagraph(Write sentences to the document using a); #Normal
$oWriter-WriteParagraph(heading level, or Normal
if none is specified. );#newline: new paragraph
$oWriter-Write(Add some more text the current paragraph);
$oWriter-NewParagraphStyle(Envelope Return);  #The style must exist
$oWriter-Write(Return to sender. );
$oWriter-SetStyle(Envelope Address);  #Change the current style
$oWriter-Write(Nope, we changed the style of the entire paragraph);
$oWriter-Write(to a footer style);
#Setting character styles
$oWriter-WriteParagraph(Some more normal text. );
$oWriter-SetStyle(Hyperlink); #A charachter style
$oWriter-Write(http://www.DarSerMan.com/Perl/;);
$oWriter-ClearCharacterFormatting();#Clear character style
$oWriter-Write(  -- my );
#Bold/Italics
$oWriter-ToggleBold(); #Toggle bold
$oWriter-Write(Perl );
$oWriter-SetItalic(1); #Turn on Italic
$oWriter-Write(stuff.);
$oWriter-ToggleItalic();   #Toggle Italic
$oWriter-SetBold(0);   #Turn off bold
#Bullet point lists
$oWriter-ListBegin();
$oWriter-ListItem();
$oWriter-Write(The first bullet item);
$oWriter-ListItem();
$oWriter-Write(The second bullet item);
$oWriter-ListBegin();   #Nested bullet point list
$oWriter-ListItem();
$oWriter-Write(The first inner bullet item);
$oWriter-ListItem();
$oWriter-Write(The second inner bullet item);
$oWriter-ListEnd();
$oWriter-ListEnd();
#Do this at regular intervals (say, every couple of 10K of text you add)
$oWriter-Checkpoint();
#Tables
$oWriter-WriteParagraph(Table example, 1);
$oWriter-NewParagraphLevel(0);
$oWriter-TableBegin();
$oWriter-TableRowBegin();
$oWriter-TableColumnBegin();
$oWriter-SetBold(1);
$oWriter-Write(HTML table);
$oWriter-TableColumnBegin();
$oWriter-Write(Win32::Word::Document::Writer);
$oWriter-TableRowBegin();
$oWriter-TableColumnBegin();
$oWriter-SetBold(0);
$oWriter-Write(table);
$oWriter-TableColumnBegin();
$oWriter-Write(TableBegin());
$oWriter-TableRowBegin();
$oWriter-TableColumnBegin();
$oWriter-Write(tr);
$oWriter-TableColumnBegin();
$oWriter-Write(TableRowBegin());
$oWriter-TableEnd();
#Save the document
$oWriter-SaveAs(01example.doc);
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Module: Win32::Word::Document::Writer

2005-03-28 Thread Johan Lindstrom
At 04:00 2005-03-29, Sisyphus wrote:
I think (like you) that 'Win32::Word::Document::Writer contains too many
instances of '::' - but I'm not too sure what to do about it. Do you need to
include 'Word' ? I'm not all that familiar with this area of MS Windows, but
I thought that 'Document' implies 'Word Document' - in which case you could
call it simply 'Win32::Document::Writer'. If you think it's necessary to
Oh, Word is most certainly not implied by Document, that's a pretty generic 
word. I would say that the Document part could be implied by Word though:

  Win32::Word::Writer
  Win32::Word::Converter::FromHTML
  Win32::Word::Converter::FromWeb
That's shorter and it would still leave
  Win32::Word::Document
for someone else to do something useful with.
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: copying structures

2005-03-17 Thread Johan Lindstrom
At 15:22 2005-03-17, [EMAIL PROTECTED] wrote:
Is there a module that 'really' copies the values instead of the
references or do I have to do that on my own?
Roll your own? This is Perl, remember? It's already done :)
perldoc Storable
use Storable qw(dclone);
# Deep (recursive) cloning
$cloneref = dclone($ref);
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Scriptomatic 2 (Win32::OLE)

2005-01-20 Thread Johan Lindstrom
At 15:59 2005-01-20, Chris wrote:
For those who haven't seen this yet, it was in today's edition of
Microsoft's TechNet newsletter. I didn't find it all that useful, but maybe
someone on this list will.
I just tried it, and the .hta file worked once this was installed:
http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAAdisplaylang=en
(no restart necessary after install (me thinks))
After toying with it for a couple of minutes, the review is that it's 
potentially very useful for exploring what kinds of things Windows 
presents, and the syntax for doing things. Since it also supports many 
languages, I can also imagine it's pretty useful when converting VBScript 
examples to Perl.

 So for this problem space: 4 camels out of 5.
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: GUI

2005-01-20 Thread Johan Lindstrom
At 20:13 2005-01-20, Adam R. Frielink wrote:
He might be looking for something like 'The GUI Loft'.  Possibly
SpecPerl or guido as well.  I think Guido and the Loft are found at
SourceForge.
The GUI Loft is at:
http://www.bahnhof.se/~johanl/perl/Loft/
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32-API GetAsyncKeyState

2004-12-03 Thread Johan Lindstrom
At 04:09 2004-12-03, [EMAIL PROTECTED] wrote:
how do i use GetAsyncKeyState in perl?
Something like this?
my $rsGetAsyncKeyState = new Win32::API(user32, GetAsyncKeyState, N, 
I);
my $ret = $rsGetAsyncKeyState-Call($keyCode);

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getasynckeystate.asp
You probably want to examine the return code with bitwise operators, or 
shift the bits in some direction.

/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Fwd: mkdir questions on unix platform

2004-11-15 Thread Johan Lindstrom
At 16:15 2004-11-15, Ella Cai wrote:
Let me make question clear, in fact my question is how can i create 
directories recursively.
mkpath
http://search.cpan.org/~nwclark/perl-5.8.5/lib/File/Path.pm
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: GUI front End

2004-10-18 Thread Johan Lindstrom
At 12:55 2004-10-18, Leroy G. Blimegger Jr. wrote:
This is what I was hoping for. Can you point me to a good resource for 
Win32::GUI and/or Tk?
Win32::GUI
http://www.bahnhof.se/~johanl/perl/Loft/
Look at the Win32::GUI starter kit section
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: scanf equivalent?

2004-09-07 Thread Johan Lindstrom
At 21:47 2004-09-07, David D Miller wrote:
My problem is to read a hex value from a file and process it in binary.
For instance, I read a file containing data of the form 0x0b4f.  Then I
need to mask/shift etc that data before displaying it.
You probably want hex().
perl -e print hex('0x0b4f')
perl -e printf('%x', hex('0x0b4f'))
perldoc -f hex
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: TCP Connection Passing
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: assembly codes inside perl?

2004-06-23 Thread Johan Lindstrom
At 15:25 2004-06-23, Jaime Teng wrote:
Has anyone done some Assembly Language Programming
inserted into Perl scripts?
If so, can you show a sample?
I am in need of speeding up a very recursive function;
in perl, it took almost an hour; in C++, it took a few
seconds. I wanted more speed.
You want Inline::C or Inline::CPP then. There may be some for your 
assembler also. Look here:
http://search.cpan.org/search?query=inline
http://search.cpan.org/~ingy/Inline-0.44/Inline.pod

C and C++
http://search.cpan.org/~ingy/Inline-0.44/C/C.pod
http://search.cpan.org/~neilw/Inline-CPP-0.25/lib/Inline/CPP.pod
Very cool stuff!
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: Auto-Increment and DBD Agnosticism
http://www.perlmonks.org/index.pl?node_id=368814
dmoz: /Computers/Software/Operating_Systems/Linux/ 40
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl GUI ??

2004-02-12 Thread Johan Lindstrom
At 19:02 2004-02-12, [EMAIL PROTECTED] wrote:
There is one additional question for a windoze environment. Which of these 
GUI's can be compiled into exe's? Does the ActiveState tool kit and 
Perl2exe work equally well for Win32::GUI, tk, and wxPerl?
I've used Win32::GUI with both PerlApp and PAR. I don't see any fundamental 
difference that would make other modules not work.


Stuff that I develop for myself is one thing, but if I'm going GUI 
development that is more likely to be for an end user or someone who 
doesn't have a matching set of perl modules, and an executable is the 
least painful way to distribute the app.
Certainly. A nice installer makes the experience even more Windows-like (in 
a good, familiar way):
http://www.jrsoftware.org/isinfo.php

/J

 --  --- -- --  --  -- -  - -
Johan Lindström   Sourcerer @ Boss Casinos   [EMAIL PROTECTED]
Latest bookmark: Eriks webblogg
http://erik.tjernlund.net/webblogg/
dmoz (1 of 6): /Adult/World/Svenska/Bilder/ 874
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Copying directories.

2004-01-13 Thread Johan Lindstrom
At 11:08 2004-01-13, Beckett Richard-qswi266 wrote:
I thought this woule be a lot easier than it seems...

All I want to do is to copy a directory, and everything it contains
(whatever this may be) to a new directory.
-snip-
What's the nice and easy way to do this?
The CPAN way of course ;)
http://search.cpan.org/~mzsanford/File-NCopy-0.34/
/J

 --  --- -- --  --  -- -  - -
Johan Lindström   Sourcerer @ Boss Casinos   [EMAIL PROTECTED]
Latest bookmark: The New Yorker Fact
http://www.newyorker.com/fact/content/?040112fa_fact
dmoz (1 of 24): /Arts/Literature/Authors/K/ 326
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Delphi problem (It _is_ related).

2004-01-13 Thread Johan Lindstrom
At 13:47 2004-01-13, Beckett Richard-qswi266 wrote:
I've just been handed a GUI based program that's been written in Delphi 7
(whatever that is).
I think that Delphi is a GUI builder that's based on Pascal. Does anyone
know if there's a Perl vesrion, or can I convert what's already been done
into perl somehow?
If you are Windows-only anyway, go with Win32::GUI (depending on how 
complex the GUI is. If it's _very_ complex, I could be temted to go with 
wxWindows instead).

Win32::GUI PPMs and controls
http://perso.club-internet.fr/rocherl/Win32GUI.html
GUI Designer
http://www.darserman.com/Perl/Loft/

Or is it time to learn Pascal?
Probably, yes, if the application is well written and non-trivial. I think 
you could be much worse off than Delphi.

/J

 --  --- -- --  --  -- -  - -
Johan Lindström   Sourcerer @ Boss Casinos   [EMAIL PROTECTED]
Latest bookmark: The New Yorker Fact
http://www.newyorker.com/fact/content/?040112fa_fact
dmoz (1 of 24): /Arts/Literature/Authors/K/ 326
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


BitBlt (was: Help Mee...)

2004-01-13 Thread Johan Lindstrom
At 19:45 2004-01-13, Asim Siddiqui wrote:
BitBlt(Picture1.hdc,Picture1.current_X,Picture1.current_Y,Picture1.Width,Picture1.Height,Picture2.hdc,Picture2.current_X,Picture2.current_Y,HC002)
Do you use Win32::API to call this routine? What does Perl code that 
defines this routine look like?


Now I've made it completely rewritten in PERL but only aq black box 
appears on the Window who's hdc I've given to the function.Is there any 
exception that PICTURE editing will work under PERL.However, I've used the 
API of the following sections:
The source device context (Picture2.hdc), where does it come from? Is it a 
Win32::GUI::DC, or another window's dc, or how do you create it? Please 
show us code.

/J

 --  --- -- --  --  -- -  - -
Johan Lindström   Sourcerer @ Boss Casinos   [EMAIL PROTECTED]
Latest bookmark: The New Yorker Fact
http://www.newyorker.com/fact/content/?040112fa_fact
dmoz (1 of 24): /Arts/Literature/Authors/K/ 326
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: compiled perl scripts?

2003-11-03 Thread Johan Lindstrom
At 17:40 2003-11-03, Mikzu kinos wrote:
I want to compile perl scripts on win32 into executables. How do I do it? 
Is there a binary to  use?
PerlApp is good.

I think perl2exe is good.

PAR is good and free.
http://search.cpan.org/~autrijus/PAR-0.76/
/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]
Latest bookmark: Oracle Migration Workbench
http://otn.oracle.com/tech/migration/workbench/index.html
dmoz (1 of 3): /Computers/Programming/Languages/PL-SQL/ 106
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Bitmap on a Button, Bitmap not displaying

2003-04-04 Thread Johan Lindstrom
At 06:31 2003-04-04 -0500, Stuart Arnold wrote:
It prints out that the $img and $bname are all ok,eg they exist and that 
$img has a value.
I'm using ActiveState PERL 560.
The window displays and shows a blank button. The bitmap is 20x20 and I've 
put the width/height to be 100,100 to see if thats the problem.
This is a trycky one that bit me too at first.

The variable that holds the bitmap must not go out of scope during the 
lifetime of the button (which probably is the lifetme of the program). This 
should ideally be handled automatically by Win32::GUI, but isn't.

One simple way of doing that is to:

-
my @bitmap;
sub winCreate {
#...
$img = new Win32::GUI::Bitmap( $bname )
push(@bitmap, $img);
#...
}
-
For each bitmap you use.

/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]
Latest bookmark: Open Source in Government
http://use.perl.org/comments.pl?sid=12076cid=18699
dmoz (1 of 5): /Business/Industries/Publishing/Publishers/ 14
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Net::SCP as Net::SSH::Perl

2003-03-27 Thread Johan Lindstrom
Ricky wrote:
Hi!  Is there an equivalent of Net::SCP written entirely in Perl (as 
Net::SSH::Perl)?  I need to do some scp'ing from a machine which doesn't 
have scp available...
The far, far, faaar easiest way you can do that is to either use pscp on 
Windows (which enables you to pass in a password from the command line), or 
use scp + Expect on Unix.

The reason is the huge number of required modules to implement the 
encryption, and the incomplete Windows support in some of the modules.

Installing ssh is a walk in the park in comparison. It is the right choise 
until you experience that you really need Net::SCP for some reason. 
Encapsulate it properly and it's not a maintenance problem.

IMHO.

/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]
Latest bookmark: Squawks of the Parrot
http://www.sidhe.org/~dan/blog/
dmoz: /Computers/Programming/Languages/Ruby/ 65
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32-GUI - Manage Window Objects...?

2003-01-28 Thread Johan Lindstrom
At 08:40 2003-01-28 -0700, Mark Sutfin wrote:

I'm just working thru the *guitutx* tutorials that come with the Win32::GUI
distribution (0.0.502 on W2K with 5.6.1 633)


That's a way old release of Win32::GUI. The 0.0.558, or 0.0.665 release are 
better.
http://dada.perl.it/#gui

I think it contains a PPM as well, otherwise it's at
http://sourceforge.net/projects/perl-win32-gui

But you need the sample programs and stuff, so download the entire distro 
anyway.


1. Are the *top* and *left* options used to determine the location of an
object (label, button, listbox..) in a Window?


Yep.



2. Is there an ?object? manager (something like TK's geometry mgr), or is
everyone else just able to do the pixel math in their head(s)?


That's not how layout is done using Win32::GUI.

The easiest way to avoid pixel math is The GUI Loft...
http://www.bahnhof.se/~johanl/perl/Loft/



I find myself adjusting top/left alot to get objects aligned... (buttons and
labels for example)


...wich has alignment commands in the context menu :)


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Teach Yourself Programming in Ten Years
http://www.norvig.com/21-days.html
dmoz (1 of 16): /Computers/Programming/Languages/Delphi/ 43


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Win32-GUI - Manage Window Objects...?

2003-01-28 Thread Johan Lindstrom
At 14:22 2003-01-28 -0700, Mark Sutfin wrote:

The easiest way to avoid pixel math is The GUI Loft...
http://www.bahnhof.se/~johanl/perl/Loft/

Downloaded this as well... No properties showing as per docs (running
tgl.exe 11/2002). FAQ indicates that my screen resolution must be low...? So


It's too low.

Actually, it's not, I just accidently kept the too-far-to-the-right 
position in the released config file. This should fix that until I get it 
right in the next release:
http://www.bahnhof.se/~johanl/perl/Loft/faq.html#the%20properties%20window%20is%20missing!


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Teach Yourself Programming in Ten Years
http://www.norvig.com/21-days.html
dmoz (1 of 16): /Computers/Programming/Languages/Delphi/ 43


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: storing an executable in a script

2002-11-15 Thread Johan Lindstrom
At 19:15 2002-11-14 -0500, Mike Brentlinger wrote:

ive played with Convert::UU to uuencode a binary file as some strings that 
could be stored as just a variable in the script and i have examples that 
uu encodes and uu decodes a exe just fine... the problem is that the 
encoded strings have things like ' and  and what not... ie

There are lots of ways to quote string literals in Perl.

my $var = q{slfk''f f 'fs''s d
4325J¤K#¤lkjlkJ
};

Type perldoc perlop in a command window for more info (that's the same as 
looking up the corresponding web page in c:\perlp\html where the docs live)


Another way is:

my $var2 = EOT;
slkdf
sdf
3432''dsfdf''sdf'sdfsdf
EOT


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Perfect Productivity - Tony Bowden Understandin...
http://www.tmtm.com/insanity/2002/11/12.html
dmoz (1 of 22): /Society/Activism/Media/Radio/ 63


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Implementing a queue, memory

2002-10-31 Thread Johan Lindstrom
At 14:39 2002-10-31 +0100, Thomas Drugeon wrote:

Will Perl reallocate former used memory (relased from the shift) to next
elements (from the push)?


IIRC perl is optimized for that scenario (I can't remember where I read it 
though). It shouldn't be a problem.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Morbus Iff/Kevin Hemenway [October 31, 2002]
http://www.oreillynet.com/pub/au/779
dmoz (1 of 4): ...y/Ethnicity/Indigenous_People/Native_Americans/ 26


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Gui rip off.

2002-10-23 Thread Johan Lindstrom
At 09:32 2002-10-23 +0100, Beckett Richard-qswi266 wrote:

Does anyone have, or can point me to a script that has a GUI front end that
I can pull apart and play with?


If you want to use Win32::GUI as the GUI toolkit, this is a useful repost 
from the win32-gui-users list:

-

In the source distriution (at SourceForge) there are a few indispensible 
sample scripts.

Other programs you can study:

http://www.perlmonks.org/index.pl?node_id=18472
A PerlMonks chat client

http://www.disobey.com/amphetadesk/
http://sourceforge.net/projects/amphetadesk/
A news aggregator

ftp://ftp.wh.whoi.edu/pub/gb109.zip
A GUI designer

http://www.bahnhof.se/~johanl/perl/Oasis/
A POD/code browser

http://www.bahnhof.se/~johanl/perl/Loft/
A GUI designer

-

The last program, The GUI Loft, also contains *gasp* demo scripts :)


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Why Functional Programming Matters
http://www.md.chalmers.se/~rjmh/Papers/whyfp.html
dmoz (1 of 3): .../Computers/Programming/Languages/Multiparadigm/ 18


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Help about module Win32::Gui

2002-10-16 Thread Johan Lindstrom

At 11:27 2002-10-16 +0200, Bruno FABLET wrote:
is there a good help about this module (Win32::GUI)

Nope.

But there are incomplete docs, sample files to look at, and a pretty 
responsive mailing list.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: SourceForge.net Project Info - Perl Direct Conn...
http://sourceforge.net/projects/pdcc/
dmoz (1 of 30): /Arts/Music/Styles/Rock/ 44


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Memory consumption

2002-10-16 Thread Johan Lindstrom

At 17:39 2002-10-15 -0700, Mike Gossland wrote:
I used Win32::SystemInfo to show free memory available. I was surprised to 
see how much memory was consumed on each pass. By cutting out sections of 
code, I was able to see exactly what was consuming the memory. I found 
that LWP ate up a bunch, and substitutions ate up more.

Sounds weird. perl -v says what?

Could you post a minimal piece of code to see if we can duplicate this?

I run spiders to fetch a LOT of urls from dmoz.org, and I don't have a 
general problem with this. Perhaps it's only noticed when there are huge 
files being fetched?

(
I do restart the program after n thousand urls though, because the memory 
of a large scalar can't be returned to the system, only reused by perl.

One problem I had was with HTML::Parse, where I had to break circular 
references myself in order to release the memory of a parsed document.
)


During my tests on Windows, I found that up to 1 MB was being consumed 
each time through the loop! I found that my output results file was close 
to 1MB at this time. I was updating the results file by slurping the whole 
thing into memory, doing a substitution and
writing it back out again. By changing it to read one line at a time, 
while writing to a different filehandle, the consumption dropped to almost 
zero. Okay, maybe my first method was wasteful, but I didn't expect the 
memory to be used just once!

What does the s/// look like?


I was very surprised to see that when I finished with the memory (by it 
going out of scope, or being undefined, or set to ), it wasn't being 
returned for re-use, but that's the way it worked.

One thing I noticed with Windows perl is that it seems like memory is 
effectively released when minimizing the console window. At least that's 
what it looks like in the Task Manager. Don't know the relation to the 
internals of perl's garbage collection etc, or if it's just something 
reported by the Task manager. It happens with other programs as well it seems.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: SourceForge.net Project Info - Perl Direct Conn...
http://sourceforge.net/projects/pdcc/
dmoz (1 of 30): /Arts/Music/Styles/Rock/ 44


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Win32 show nothing

2002-10-10 Thread Johan Lindstrom

At 09:02 2002-10-10 +0200, Aben wrote:
whats wrong?

Note sure, but try to specify -top and -left coordinates as well.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Laziness - brian_d_foy's Journal
http://use.perl.org/~brian_d_foy/journal/8285
dmoz (1 of 4): /Computers/Programming/Languages/Perl/ 25


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Adding a Timer in Win32::GUI

2002-10-08 Thread Johan Lindstrom

At 14:53 2002-10-08 -0400, Hawley, Eric wrote:
Okay I have been attempting to add a timer to a message box and have been
unsuccessful in being able to do so.  I want to have it so that after the
message box displays the user has 10 seconds to either click YES or NO with
default as YES.  If after 10 seconds the user has failed to make a selection
YES will be automatically choosen. can someone help me out with this. Down
below is some code that I have from the script.

I would be surprised it that compiled and ran. This does.


#!/usr/bin/perl -w
use strict;
use Win32::GUI;


my $winDummy = Win32::GUI::Window-new(-name = winApp);  #Create, but 
never Show() it
my $timTimeout = $winDummy-AddTimer( timTimeout, 1 );#10 sec

my $choise = Win32::GUI::MessageBox($winDummy, q {Windows could not finish 
a system task and needs to restart.

NOTE: You MUST reboot Windows so that this task may finish.
Reboot Windows now?},
 Error, MB_YESNO | MB_ICONINFORMATION | MB_DEFBUTTON1);

print choice: ($choise)\n;
shutdownWindows() if($choise == 6); #6 seems to be YES



sub timTimeout_Timer {
 print Timeout...\n;

 #Disable the timer, otherwise it will trigger this event
 #handler again
 $timTimeout-Kill();

 #Never to return
 shutdownWindows();
}

sub shutdownWindows {
 print do your Windows reboot stuff here, then exit the app\n;

 #This is the downside. You have to exit the Perl script
 #for the dialog box to disappear (I think, please prove me
 #wrong someone!).
 exit(0);
}


__END__

Interesting note: We never call Win32::GUI::Dialog(), and the timer still 
works.

An alternative would be to create the dialog box yourself. That way it's 
like any Win32::GUI::Window, and you can close it the normal way. That's 
what I'd do, but if this brute force solution works for you...


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: SQLite An Embeddable SQL Database Engine
http://www.hwaci.com/sw/sqlite/
dmoz (1 of 6): ...puters/Software/Configuration_Management/Tools/ 26


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Connecting/Parsing Files On A Unix Machine - NEWBIE

2002-10-07 Thread Johan Lindstrom

At 12:34 2002-10-07 +0100, Barlow, Neil wrote:
I have a script which will be launched from a Win32 Machine - the problem is
that I have to connect to a Unix box which contains a directory of different
files which I have to process.

I am unable to work out how to connect to the Unix box and parse the
directory - can anyone advise on the way to go???

Either you a) run something on the Unix box, or you b) fetch the files and 
process them on the Windows box. I'd try to get it to work using a) if 
possible, but b) is good too if the file transfer isn't a problem wrt size 
and speed.

So, how to fetch the files? FTP is one option (existing protocols are good, 
don't invent your own). (If you need a secure connection take a look at SCP).

In Perl that means Net::FTP which is included in the libnet module. This is 
how to use it:
http://search.cpan.org/author/GBARR/libnet-1.12/Net/FTP.pm

This is how to install it:
C:\ ppm install libnet
should work if it's not already included in the ActiveState distribution.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Ramdisk - CENATEK
http://www.cenatek.com/product_ramdisk.cfm
dmoz (1 of 3): /Computers/Hardware/Storage/Hard_Drives/ 56


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: New to Win32::GUI

2002-10-04 Thread Johan Lindstrom

At 11:30 2002-10-04 -0400, Conrad, Bill (ThomasTech) wrote:
 For years I have been developing PERL Tk scripts which I have been
using on both UNIX and PC applications. My users want me to make these
scripts more PC friendly

Good call! Tk is nice and all, but it's not very pretty. And pretty counts 
for non-geeks, so in order to make Perl look good you need to make the GUI 
look good. That means Win32::GUI or wxPerl.


so I have decided to byte the bullet and learn Win32:GUI.

Good read:
http://www.jeb.ca/faq/Win32-GUI-FAQ.html

Subscribe to the Win32::GUI::Users mailing list:
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users


 Are all of the modules associated with Win32:GUI loadable with PPM
as a single package or do they all have to be loaded separately?

Not _all_. Installing Win32::GUI will set you up with the basics. There are 
a number of other Win32::GUI modules. Check the archives:


 And when they are loaded is all of the HTML documentation loaded
also or do I have to get that from some other place?

PPMs are nice, but you need sample scripts, docs and stuff also, so 
download the source from SourceForge:
http://sourceforge.net/projects/perl-win32-gui

The documentation is also available (with a little nicer ToC IMHO) if you 
download The GUI Loft, a Win32::GUI window designer:
http://www.bahnhof.se/~johanl/perl/Loft/


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Conference Presentation Judo
http://perl.plover.com/yak/judo/presentation/
dmoz (1 of 10): ...cial_Intelligence/Natural_Language/Conferences/ 6


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: screen saver -- how to trip, trigger or kill

2002-08-26 Thread Johan Lindstrom

At 15:22 2002-08-26 -0400, Gan Uesli Starling wrote:
REASON: Have a MySQL DB  a Perl script which querries
it ever 2 minutes for new entry. When it sees a new
entry, Perl calls up MSIE on Win95 to display said
new entry. But alas, all is wasted if the screen saver
is hiding it.

Outside of the box we find ScreenSaver Blocker:
http://sac-ftp.externet.hu/utiltask6.html

While that may actually solve your problem, this may be interesting:

Usenet post asking the same thing
http://groups.google.com/groups?hl=enlr=ie=UTF-8threadm=Pine.SUN.3.96-heb-2.07.981222121814.8925A-10%40actcom.co.ilrnum=1prev=/groups%3Fq%3Dfake%2Bprevent%2Bscreen%2Bsaver%2Bwin32%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3DPine.SUN.3.96-heb-2.07.981222121814.8925A-10%2540actcom.co.il%26rnum%3D1


MS KB-article mentioned in the post
HOWTO: How to Disable the Screen Saver Programmatically
http://support.microsoft.com/support/kb/articles/Q126/6/27.asp


This is how I found it:
http://groups.google.com/groups?q=fake+prevent+screensaver+win32sa=Ntab=wg


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Salon.com Technology  I come to bury IAmCarbona...
http://www.salon.com/tech/feature/2002/08/03/deleteddomains/index.html
dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl 5.6.1 Win32::GUI TheGUILoft

2002-08-14 Thread Johan Lindstrom

At 12:57 2002-08-14 -0600, Syl wrote:
Perl 5.6.1 build 633, Win32::GUI and TheGUILoft generate Prototype Mismatch
errors. For example

Prototype mismatch: sub main::MB_ICONHAND vs () at C:/Perl/lib/Exporter.pm
line 57.

This was discussed on the TGL support mailing list:
http://groups.yahoo.com/group/theguiloft/message/294


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Software Bugs - Software Glitches
http://wwwzenger.informatik.tu-muenchen.de/persons/huckle/bugse.html
dmoz (1 of 3): ...n_and_Development/Authoring/Webmaster_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: compiling perl scripts into EXE and then using the exe through apache

2002-06-06 Thread Johan Lindstrom

At 16:47 2002-06-06 -0400, Carl Jolley wrote:
  It won't make things much faster. It will make for some bloated .exe
  files. Learning to use mod_perl might get your the performance you
  desire. Have you read this article:
 
   http://www.perl.com/pub/a/2001/06/27/ctoperl.html
 

I beg to differ. Depending on the code in the program, the compiled
version might run much faster.

Not that speed was mentioned in the original post, but...

Why would a compiled Perl script run faster? Considering we're talking 
about .exe files here, I assume Windows. In that case you have two options: 
PerlApp and Perl2exe. Both package the Perl source and possible the perl 
interpreter into an .exe file. The script is not compiled into native 
machine code, it's the same Perl source being run as always.

If anything, there would be an extra (but probably minor) performance hit 
at script startup where the source is extracted before execution. Compare 
this with mod_perl where there is no performance hit at all at runtime 
since compilation of Perl source into opcodes (excluding eval STRING) is 
taken care of at the first invocation, possibly at server startup.


However I do agree that the size of
the code will be much larger. However, the issue may not performance
but rather a (probably mistakenly) perceived fear that using perl
source would possibly reveal the source code to the end-user.

This is a more valid point. Not that it's secure in any meaningful way, 
but it's slightly more tamper proof, and more safe from accidental change 
than text files with Perl source.

IMHO, the most compelling argument for PerlApp and Perl2exe is deployment. 
In simple cases it will transform the installation from a (to end-users) 
long and awkward process to a simple file copy. Add e.g. InnoSetup[1], and 
you have a professional looking[2] piece of software (admittedly, this 
matters mostly on the desktop).


/J

[1] http://www.jrsoftware.org/isinfo.php

[2] Yes, to end-users, this matters too.

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Ovid's Journal: Bob and the dog
http://use.perl.org/~Ovid/journal/2204
dmoz (1 of 8): /Computers/Programming/Languages/Perl


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: test if file more than 5 seconds old?

2002-05-30 Thread Johan Lindstrom

At 08:50 2002-05-30 -0400, Trevor Joerges wrote:
You could do the math on the decimal time returned by the -M file test.
This should be portable too.

I remember having trouble with really small times, like 5 secs ( 5 * (1 / 
(24 * 60 * 60)) ) using file tests on w2k. Try the stat() function and time().

perldoc -f stat
perldoc -f time


Hope that helps,

/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: WebFX - Cool DHTML stuff
http://webfx.eae.net/
dmoz (1 of 5): ...lities/L/Lakewood/Business_and_Economy/Internet


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Using qw(....) on data from database.

2002-05-16 Thread Johan Lindstrom

At 12:14 2002-05-16 -0400, [EMAIL PROTECTED] wrote:
This will give me 01 02 03 04

I want to push this into an array.

push @nums, $nums;

If you only want numbers:
push(@nums, split(/\D+/, $nums);
i.e. split on one or more chars that are not numbers (\d is any number, 
\D is the opposite).

or, if you want anything separated by whitespace:
push(@nums, split(/\s+/, $nums);


Here is TFM with more info:
C:\ perldoc -f split
C:\ perldoc perlre


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Using qw(....) on data from database.

2002-05-16 Thread Johan Lindstrom

At 18:28 2002-05-16 +0200, Johan Lindstrom wrote:
If you only want numbers:
push(@nums, split(/\D+/, $nums);

Add a ) for syntactic completeness :)


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: GUI and Documentation Q's

2002-05-16 Thread Johan Lindstrom

At 16:22 2002-05-16 -0400, George Gallen wrote:
q1. How do you do GUI, if the perlcode runs in a Dos Window?
q2. Recommend some sites on implements GUI with Win32 modules and
  documentation on it's functions?

A deja vurl for you:

(GUI) Windows Programming FAQ
http://www.perlmonks.org/index.pl?node_id=108708


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Any ideas how to timeup perlscript ?

2002-05-14 Thread Johan Lindstrom

At 09:05 2002-05-14 +0200, Trash-killer wrote:
As we all know that Alarm() does not work in Win32 I am wondering how to 
round this proplem,
Is there any other way to do a timed interrupt ?

PerlMonks to the rescue:
http://www.perlmonks.org/index.pl?node_id=162674

Haven't used Win32::Event myself though, but please post some code if you 
get it to work.

And, IPC::run which was announced on this list earlier sounds like a 
possible solution.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: UNIX ODBC
http://www.perlmonks.org/index.pl?node_id=100867
dmoz (1 of 6): /Computers/Programming/Languages/Perl


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Reverse Engineering

2002-05-13 Thread Johan Lindstrom

At 12:06 2002-05-13 +0100, Batchelor, Gareth wrote:
I recently used PerlApp to create a Win32 executable from a perl script that
I wrote. Unfortunately I have just lost the source code, and I would like to
find out if there is any way for me to obtain the code from the executable.
Does anyone know if this can be done?

This was discussed at PerlMonks:
http://www.perlmonks.org/index.pl?node_id=96925
http://www.perlmonks.org/index.pl?node_id=97005

Note that this relates to PDK 3, and if you use the latest version of 
PerlApp it may not apply.

I don't think the source is extracted to disk, only the DLLs (they are also 
left behind in a temp directory after the program is done which is kind of 
sloppy (this goes for PDK 3)).


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Downright useful downloads
http://www.answersthatwork.com/downright.htm
dmoz (1 of 10): /Arts/Music/Reviews/Independent_or_Alternative


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Stress Test Theory?

2002-05-02 Thread Johan Lindstrom

At 17:21 2002-05-02 +0200, Lee Goddard wrote:
My scenario is an Apache on Windows (not a good idea, but not my app),
a C I script calling a Java middleware app.

Interesting note with regards to load: Apache 1.3 on Windows processes 
requests in a serial manner. Apache 2.0 does not if IIRC, so it should be a 
much better fit.

BTW, does anyone have any practical experience of using Apache 2.0 + 
mod_perl under Windows? Not that Windows is my preferred server platform 
(insert joke here), but it would be nice to be able to move Apache up to 
the top of the list when Windows is a requirement.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: The GNOME Usability Project
http://developer.gnome.org/projects/gup/ut1_report/ui_principles.html
dmoz (1 of 6): ...s/Graphic_Subsystems/Desktop_Environments/GNOME


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Sending text to other windows with Win32::GUI

2002-01-24 Thread Johan Lindstrom

Scott Campbell wrote (on the Perl-Win32 list):
Now this is running as a process.  Does anyone know of a way for me to 
send text to this window, from another perl process?

Heh! I tried this out and it actually works! :)  Cool!

Consider these files:

#!/usr/local/bin/perl -w
#File: test14.pl
use strict;
use Win32::GUI;

my $winMain = new Win32::GUI::Window(
 -left   = 13,
 -top= 32,
 -width  = 439,
 -height = 260,
 -name   = winMain,
 -text   = Autoscroller,
 );

$winMain-AddLabel(
 -text= lblTest,
 -name= lblTest,
 -left= 0,
 -top = 0,
 -width   = 400,
 -height  = 250,
 );

$winMain-lblTest()-Text(The hwind is:  . $winMain-lblTest()-{-handle});
$winMain-Show();
Win32::GUI::Dialog();
#EOF


And in another file:

#!/usr/local/bin/perl -w
#File: test14a.pl
use strict;
use Win32::GUI;

print Enter the hwind for the label: ;
my $hwind = STDIN;

print \nEnter text: ;
my $text = STDIN;

Win32::GUI::Text($hwind, $text);
Win32::GUI::InvalidateRect($hwind, 1);
#EOF


Run them in two console windows. Look at the hwind in the Window, enter it 
into the second program. The text will update the Label in the Window.

(Of course, the window script will have to create a myprogram.hwind file 
with the correct window handler instead of having the user type it.)


This was actually a very cool way of talking to a Win32::GUI program. I can 
imagine a messaging system using this to communicate between a GUI frontend 
and one or many background processes to do the actual work. If you want to 
avoid sockets for some reason :)


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: SuSE Email Server - FAQs
http://www.suse.de/en/products/suse_business/email_server/faqs.html


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Win32::ActAcc - where from to download

2002-01-16 Thread Johan Lindstrom

At 18:41 2002-01-16 +0530, Abhra Debroy wrote:
Can anybody tell me where from I can down load 'Win32::ActAcc'. I tried it
from CPAN but failed.

http://search.cpan.org/search?dist=Win32-ActAcc
http://www.cpan.org/authors/id/P/PB/PBWOLF/Win32-ActAcc-1.0.zip


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: TG Development
http://touchgraph.sourceforge.net/


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Win32::GUI, msvcrt.dll Win98

2002-01-14 Thread Johan Lindstrom

Miguel wrote:
   Well I download via PPM Win32::GUI from activestates and started with 
 the hello world tutorial . when it came to run the script, I 
 immediately received...

PERL caused an invalid page fault in
module MSVCRT.DLL

Check if all of your windows and controls have a -name property. If not, 
add one. And if they do, please post the failing code here.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Arts  Letters Daily - ideas, criticism, deb...
http://www.aldaily.com/


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Choose a DIRECTORY through win32 GUI

2002-01-12 Thread Johan Lindstrom

At 19:04 2002-01-12 +0100, [EMAIL PROTECTED] wrote:
I would like to have a way to choose a directory (not a file, a
directory !) through a nice win32 gui. Until here, I've been proposed :

What you want is BrowseForFolder. Look it up in the help files or post 
again, possible to the Win32::GUI mailing list.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Graphviz
http://www.research.att.com/sw/tools/graphviz/


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Win32-GUI documentation

2002-01-12 Thread Johan Lindstrom

At 00:46 2002-01-13 +0100, Vilius Gaidelis wrote:
I can not find any documentation or tutorial about this
module. Somebody knows where can I find it?

Haha, didn't see that coming :)

http://www.jeb.ca/faq/Win32-GUI-FAQ.html

Also, make sure you download the source distribution as well, there are 
docs and sample programs included there.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Graphviz
http://www.research.att.com/sw/tools/graphviz/


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Identifying Solaris machines using a Win32 Perl script?

2002-01-10 Thread Johan Lindstrom

Alastair wrote:
Are your Solaris boxes running SNMP? If so you could try Net::SNMP?

Or maybe they run SSH? Check if you can connect to port 22.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Re Newby Query Comment
http://www.perlmonks.org/index.pl?node_id=71663lastnode_id=136782


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: How to omit lines from execution in a perl program

2001-11-12 Thread Johan Lindstrom

Nick wrote:
I can currently set a debug variable that prevents output, but
I would rather the debug statements were never executed for
optimum speed.

use constant DEBUG = 1;  #or 0
print Blah if(DEBUG);

The if-statement should be resolved at compile time, not run-time AFAIK.


/J

--  --- -- -- -- -  -   ---
Johan LindströmBoss Casinos
Sourcerer [EMAIL PROTECTED]
  http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Good IDE's, either freeware or commercial, for debugging?

2001-11-10 Thread Johan Lindstrom

At 15:53 2001-11-09 -0800, Peter Guzis wrote:
Well, you get what you pay for.  If you want free, by all means try notepad
or one of its freeware variants.  UltraEdit is only $30 and worth every
penny.

I'm blowing my own horn here, but if you like UltraEdit, try Perl Oasis:

It can be used standalone, but is aware of any file being edited in 
UltraEdit (so it's a Partially Integrated Dev Environment, a PIDE :)

What you can see in Perl Oasis is:
* POD - very useful to me since I document all my modules with POD
* Subroutines - If you don't use POD, you still get a list of subroutines.
* Used and inherited modules (e.g. so you can open them and see the POD)
* Bookmarks - special lines in your code, like debug print statements, 
todo comments etc

I use it always when coding Perl, and actually feel that something is 
lacking when I find it's not running :)

The big advantage is that you can get an overview of the code; the 
structure and order of the subs etc. And when you found the sub you were 
looking for, double click it and it's opened in UltraEdit.

Source and binary under the Perl Artistic License:
http://www.bahnhof.se/~johanl/perl/Oasis/


/J

--  --- -- -- -- -  -   ---
Johan LindströmBoss Casinos
Sourcerer [EMAIL PROTECTED]
  http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Embedding Perl

2001-10-12 Thread Johan Lindstrom

MATA Tech wrote:
About two years ago I had heard that there were methods for
embedding VB in Perl.  At that time, though, I was unable to find
any information on how to do it.  Since that time, I have a desire to
embed Perl in VB, using VB just for GUI creation.  Can it be done?

You can create ActiveX objects in Perl with the PDK from ActiveState (look 
for PerlCtrl):
http://www.activestate.com/Products/Productivity/Perl_Dev_Kit/index.html#features

Or maybe you can access the Windows Scripting Host somehow, then write your 
stuff using PerlScript. Please report back to the list if you succeed.


/J

--  --- -- -- -- -  -   ---
Johan LindströmBoss Casinos
Sourcerer [EMAIL PROTECTED]
  http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Win32::Gui

2001-09-29 Thread Johan Lindstrom

T.Phan wrote:
   I just installed the Win32::Gui package and I
   like to know where can I find the documentation?

Whoa! Blue text! Why, oh, why?

Nevermind...


The (very) FAQ regarding the Win32::GUI documentation:

Look in the source distribution at SourceForge (download and look at the 
sample scripts too!):
http://sourceforge.net/projects/perl-win32-gui

See also the FAQ:
http://www.jeb.ca/faq/Win32-GUI-FAQ.html

and a tutorial (partly broken, add a -name option where missing if it crashes):
http://www.jeb.ca/howto/The_Win32-GUI_HOWTO.html


/J

--  --- -- -- -- -  -   ---
Johan LindströmBoss Casinos
Sourcerer [EMAIL PROTECTED]
  http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users