I wrote the following script....fairly simple. I went ahead and created an exe using PAR with the following command:
pp --icon "path/to/pic.ico" --gui -o file.exe file.pl
The program works great on my home computer. I transfered it to my computer at work this morning and exe program isn't doing anything. I was wondering if it might be somehting with PAR command? This is my first file trying to change the icon, but I don't think that is it. When I double-click on the icon the hourglass will run for about 5 seconds then nothing.....what am I doing wrong. Both my computers at home and at work have the latest perl.....so it should be working!
#!/usr/bin/perl
use Encode::Unicode;
use Tk;
$mw = new MainWindow(-title=>"Keyword Tidy");
$mw->withdraw();
$frame1 = $mw->Frame()->pack(-side=>top);
$text = $frame1->Scrolled("Text", -scrollbars=>'e', -width=>45, height
+=>20, -font=>"Arial 10 normal")->pack(-side=>top, -padx=>7, -pady=>7)
+;
$frame2 = $mw->Frame()->pack(-side=>top);
$label = $frame2->Label(-text=>"Remove:", -font=>"Arial 10 bold")->pac
+k(-side=>left, -padx=>7, -pady=>7);
$entry = $frame2->Entry(-width=>20)->pack(-side=>left, -padx=>2, -pady
+=>7);
$button = $frame2->Button(-text=>"Tidy Up", -command=>\&doit)->pack(-s
+ide=>right, -padx=>10, -pady=>7, -ipadx=>10, -ipady=>7);
$mw->deiconify();
MainLoop();
sub doit {
$words = $text->get("1.0", "end");
$text->delete("1.0", "end");
$toremove = $entry->get();
@w = split(/\n/, $words);
foreach $i (@w) {
$i =~ s/\s+$//;
$i =~ s/^\s+//;
$i =~ s/$toremove//g;
}
$done = join("\n", @w);
$text->insert("end", $done);
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.