Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Ad hoc Perl Regexp Replacements

Expand Messages
  • Sheri
    ... I don t have tk_ex.pl. But using that method with the sample programs from the slide show tutorial flashes a Dos box before showing the widget. And it
    Message 1 of 25 , Jan 19, 2003
      At 03:33 PM 1/19/03 -0800, Alan wrote:
      >Ya, may not able eliminate the background dos window as in how widget demo operates also.
      >^!Set %cmnd%=perl d:\files\tk_ex.pl
      >^!Shell ^%cmnd%
      >launched that teeny demo with demo above a minimized dos window--same fashion as how widget demo acts.

      I don't have tk_ex.pl. But using that method with the sample programs from the slide show tutorial flashes a Dos box before showing the widget. And it won't work if you have any spaces in the path name.

      I'm having luck with ^$GetOutput$ again.

      ^!Set %Out%=^$GetOutput("^$GetPerlExe$" "^$GetScriptPath$sampletk2.pl")$

      launches the widgets with DOS window minimized.

      ^!Set %Out%=^$GetDOSOutput("^$GetPerlExe$" "^$GetScriptPath$sampletk2.pl")$

      launches with no DOS window at all. But I think there would be an error message if there were no output.

      >If wanna use Perl/TK I'd suggest have its pop up menu characterized with a bright yellowish orange background with bright neon green stripes that flash rapidly on and off--who could miss that? it is/be the prompt for user input.

      Sounds beautiful <g>

      >interesting recent thread in comp.lang.perl.tk of an experience with Perl/TK on a Linux X Window system/'puter.

      well, I wasn't planning any large scale projects with it. <g>

      I see that Steve Lidie posts to that group.

      >I estimate myself currently at BI (beginner to intermediate) not quite intermediate but more advanced than beginner as far as Perl skills. But I'm leaving that road/trail sign/marker already whilst in my travels of attempting elevation gain. (someone reported seeing me leaving town afoot wearing an old fashioned miner's helmet with one of them battery powered lanterns strapped on the front of it and that, strangely, I was gazing somewhat upward instead of looking straight ahead while I walked. hehe hehe :-)

      Hehe. It is nice to have a fellow traveler. I'm sorry to hear you are moving this to the back burner :(

      >I just uploaded to ntb-clips file area an zipped up Perl file, nmbrgame.zip, a number guessing game that I wrote in Perl. It can commandline example of way(s) to be interactive ie prompt a user for input.
      >nmbrgame.zip be my creative response to lesson number three. My game received high rating from the instructor.

      Nice, but where is the TK update <G>

      >Due to time constraints, I'll need put the Perl/TK on slow cook or back burner for a while. But I'll certainly follow/track current newsgroup, etc.
      >Any prompting for user info that you need for your Ad hoc Perl Regex clip should able be accomplish via either Ntab wizard and/or via Perl commandline. Then perhaps step up to the Perl/TK GUI after a while? <-just a thought there-

      I have actually seen the SearchDialog now. But the only way I can display it seems to be via another object. Expand at Yahoo to avoid broken lines.


      #! C:/Program Files/Perl\bin\perl.exe -w
      use Tk;
      use TK::SearchDialog;
      my ($textentry, $buttonText); # define vars
      my $mw = new MainWindow( -title=>'Sheri\'s Folly');
      my $label = $mw->Label( -text=>'Click in Box to see Search Dialog');
      my $entry = $mw->Entry( -textvariable=>\$textentry);
      my $button = $mw->Button( -textvariable=>\$buttonText, -command => sub { print "Entry text is $textentry\n"; } );
      $buttonText = 'Click Me';
      $entry->bind('<Button-1>', \&ChangeBg);
      $button->configure(-activebackground=>'red'); $button->bind('<Button-1>', sub { $button->flash } );
      sub ChangeBg { my $dialog = $mw -> SearchDialog;my @searchoptions = $dialog -> Show; }
    Your message has been successfully submitted and would be delivered to recipients shortly.