User Profile

Collapse

Profile Sidebar

Collapse
pramodkh
pramodkh
Last Activity: Jun 17 '08, 05:29 AM
Joined: Nov 23 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Here is the answer :

    Code:
    use Win32::Console::ANSI;
    use Term::ANSIScreen qw/:color /;
    
    print colored ("This text is bold green.\n", 'bold green');
    print "This text is normal.\n";
    print colored ['bold red'], "This text is bold red.\n";
    print "This text is normal.\n";
    Thanks to meloyelo :-)
    See more | Go to post

    Leave a comment:


  • Changing text color of windows command propmpt through PERL

    Dear All,

    I am writting a PERL script in windows to test some test cases. The test result is captured both in command prompt and in the log file. But when the result is displayed on a windows command prompt, its very difficult to read the output text. Instead I was thinking of changing the text color of the command prompt. I mean if the test case passes...then the result will be displayed in Green color and in case of any errors/failures,...
    See more | Go to post

  • pramodkh
    replied to Problem in Sending sms to mobile
    in Perl
    you can find the mail ids of the mobile networks here
    http://www.funsms.net/freesms2india.h tm
    See more | Go to post

    Leave a comment:


  • Thanks Jeff. I have sent a mail to Roth Cons. Lets see if i get any reply, i will post the answer in this forum.

    But in general, its so easy to get user group info through GUI. I mean there must be some module in PERL which will talk to Windows API to get user info.
    which module of CPAN do you suggest to get user group info? I couldn't get any. I tried all this:
    http://www.netadmintoo ls.com/art33.html
    http://www.roth.net/perl/perms/...
    See more | Go to post

    Leave a comment:


  • I am still waiting for suggestions/alternatives.
    See more | Go to post

    Leave a comment:


  • Hi
    Here is the script using which I am able to get some user information.

    Code:
    use Win32::Perms;
    
    # Create a new Security Descriptor and auto import permissions
    $filedir = 'C:\temp';
    if( -e $filedir ) {
    	print "\n $filedir Exists...";
    }
    else {
    	print "\n $filedir Doesn't exists...";
    }
    $Dir = new Win32::Perms( $filedir ) || die "Unable to
    ...
    See more | Go to post

    Leave a comment:


  • This is what i started with...As i m still exploring the possibilities, i wanted some information on this before i actually start working on this script. That is why i posted it in a hurry. otherwise i usually try out something first and then post(as Jeffin said).

    Code:
    use strict;
    
    my @dirList;
    
    system("cmd /C \"dir  /B /S  D:\\MyDir\\ \" > dirList.out");
    open(FH,"<
    ...
    See more | Go to post
    Last edited by eWish; Jun 3 '08, 01:18 PM. Reason: Replace quote tags with the proper code tags

    Leave a comment:


  • pramodkh
    started a topic Checking Directory permissions for a user group
    in Perl

    Checking Directory permissions for a user group

    Hi All

    I have the following directory structure.
    A -
    a1
    a2
    a3
    B -
    b1
    b2
    b3 -
    bb1.c
    bb2.h
    bb3.xml
    C -

    I have to check the Read/Write permissions for a particular user group for the directories and files shown in the above directory structure.
    I am still exploring the different possibilities. so havent...
    See more | Go to post

  • pramodkh
    replied to Parsing word Doc using PERL in Windows
    in Perl
    Yes I did go through the Documentation. But looks like that is outdated. I use Office2003.
    After some googling i came to know that all the methods are same as that of VB. So I created a macro in MSWord and Recorded some actions like adding Headings, Text, bullets etc.I checked the source code of the Macro(which is in VB) and found out the following information:
    Code:
    Sub BulletMacro()
    '
    ' BulletMacro Macro
    '
    ...
    See more | Go to post

    Leave a comment:


  • pramodkh
    replied to Pop up Message in PERL
    in Perl
    Hey Thanks Savan. This is more useful. With TK it was opening some unwanted window in the background. This is what I wanted.
    Thanks.
    Pramod...
    See more | Go to post

    Leave a comment:


  • pramodkh
    started a topic Parsing word Doc using PERL in Windows
    in Perl

    Parsing word Doc using PERL in Windows

    Hi All

    I am parsing a word doc using perl. I am using Win32::OLE module for this.

    I am able to get the Paragraphs/styles/Text from the word doc. But facing some problem when I am trying to get a Text with Bullets/numbering. It Only displays the text, but i want to get the bullet number also from the text line.

    I am not getting the different methods available in Paragraphs(like Range, Style....etc). How...
    See more | Go to post
    Last edited by pramodkh; Mar 12 '08, 07:40 AM. Reason: typo error in Title

  • pramodkh
    replied to Pop up Message in PERL
    in Perl
    I am able to achieve this using Perl TK.
    here is the code:

    Code:
    use Tk;
    use strict;
    
    # Main Window
    my $mw = new MainWindow;
    $mw -> messageBox(-message=>"Successfully Copied the File");
    Thanks for everyone.
    Regards
    Pramod
    See more | Go to post

    Leave a comment:


  • pramodkh
    started a topic Pop up Message in PERL
    in Perl

    Pop up Message in PERL

    Hi All,

    I have a query

    Is it possible in PERL to popup a message?
    I have a requirement like this:
    Copy a file from a location and once the copy is complete pop up a message to the user that Successfully copied the file...(as the copying file script is scheduled in the scheduler...use r dont want to refer to the log files). I can think of sending mails...but i feel sending mails is not feasible for such a...
    See more | Go to post

  • Thanks Jeffin and Kevin.
    I am working on this...
    Facing some problems in accessing remote server, from where i have to read the files. i will look into this and get back to you.

    You both always provide optimum solutions within short time:-)

    Thanks again.

    Pramod
    See more | Go to post

    Leave a comment:


  • pramodkh
    started a topic Sorting files based on the last modified time
    in Perl

    Sorting files based on the last modified time

    Hi All,

    I have a remote directory wherein some files will be generated. I am writting a PERL script in windows to get the latest file created in that directory.How do i achieve this?

    This is what i have tried so far...
    Code:
    use FindBin;
    use strict;
    
    my $ScriptPath = $FindBin::Bin;  
    print "\n Script Path =  $ScriptPath ";
    my @files = "";
    ### remote
    ...
    See more | Go to post

  • Thanks a lot Nithin. and thanks Npidaparthy for optimized code.
    I am able to achieve to some extent of what was required.
    But the complexity is incresing now. I will get back in case i need any further help on this.
    Kevin, please send me more information on PERL inplace editor for Windows platform. i have seen that some of the statements work only in Unix( for ex: perl -p -i.bak -e.....). Thanks in advance.

    Thanks...
    See more | Go to post

    Leave a comment:


  • pramodkh
    started a topic Pattern matching and inserting a line in a file
    in Perl

    Pattern matching and inserting a line in a file

    Hi All

    I am trying to match a pattern in a file and insert a line. If the pattern matches then insert a line before the matching pattern line.

    for example,
    I have the following content in a file:

    //This is my source file
    //this is where i want to insert a line
    Code:
    class Class1
    {
        data members
        member functions
    }
    
    //this is where i want to
    ...
    See more | Go to post
    Last edited by eWish; Feb 19 '08, 03:14 PM. Reason: Please use [CODE][/CODE] tags

  • pramodkh
    replied to Hii I am newbie to perl
    in Perl
    I think you can go for using XML::Simple module.
    here is the link:
    http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm

    go through the page, you will get an option to format the passed XML file.
    read the XML file using XMLin()
    and generae new xml file using XMLout()

    hope this will help!
    See more | Go to post

    Leave a comment:


  • Hi All,

    Any updates on this post? let me know if you need any further details.
    I am still waiting for replies.

    Regards
    Pramod
    See more | Go to post

    Leave a comment:


  • Yes...deffinate ly Kevin's reply should solve your problem. But i suggest you to use Config::IniFile s module to work with config files. You can get more details about this module in CPAN.

    Regards
    Pramod...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...