Thursday, October 14, 2010

Win32 MsgBox

use Win32;
$\ = "\n";
MsgBox("Test", "This is a test", 48);
# display a message box with an exclamation mark and an 'Ok' button
 sub MsgBox {
    my ($caption, $message, $icon_buttons) = @_;
    my @return = qw/- Ok Cancel Abort Retry Ignore Yes No/;
    my $result = Win32::MsgBox($message, $icon_buttons, $caption);
    return $return[$result];
}
# Win32::CopyFile(FROM, TO, OVERWRITE)
print Win32::CopyFile("C:\\test.txt", "C:\\test1.txt", true);
print Win32::DomainName();
print Win32::FsType();
#print Win32::GetFullPathName();
print Win32::GetNextAvailDrive();

No comments:

Post a Comment

 

©2010 Software Testing powered by Free Blogger Templates | Author : Anand Satish