Jeremy wrote:
I can't get my script to work with the gui windows, when the gui sub
routine gets called and the windows gets created, the program freezes and
script does not continue
After a quick look, this is the problem:
In the sub CreateProgressWin you create the window and then call
Win32::GUI::Dialog(); It kind of looks like it's a remnant from Perl
Builder :)
The call to Dialog() will make the script enter the main event loop.
Anything from there (like your FTP stuff) has to be triggered by an event
(e.g. a button click, a window being resized, or a timer) until the event
loop is terminated (by returning -1 in an event handler).
The thing is, you don't have to call Win32::GUI::Dialog() for the window to
function, you can do that manually by calling Win32::GUI::DoEvents() as
often as possible. And you already do that in the RecieveTransfer loop, so
if you just remove the call to Dialog() it will work fine.
The downside: the GUI response will be sluggish when you do it like this,
but the alternative is to do your application stuff in another process or
thread, and that is a lot more work. I'd love to see a stable framework for
doing that though.
I have not done win32::Gui programming before so your help is always
appreciated.
You use \ instead of \\ as directory separator in a few places. Most of the
time / works very well on the Windows platform.
And, you might want to change the password on whichever server that is ;)
Hope That Helps,
/J
--
Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua
[EMAIL PROTECTED]