i am trying to make a script that recognizes all unparsed stream files from folder and runs an external tool in windows system to parse them. so far i am able to call that tool for all unparsed files. but after that we need to clcik "analyse" button in that tool. and after it analyse whole file for about 1 minute we need to click on "save " button i want to automate this .. means make a script that does click buttons on an external software automatically..
is this possible?
4 1884 KevinADC 4,059
Recognized Expert Specialist
The Expect module is probably what you want. If you are on Windows it only works when run in cygwin environment. I never use Expect so can't offer help with its actual usage.
If you are on Windows , you can make use of Win32::GuiTest to automate GUI related tasks (eg. clicking buttons).
Thanks all,
Well the problem is sorted out. i just omiited the gui version of running tool. it had a command line version too. i used that and it works and does well.
but it dint recognize some streams. i think probably some mistake in my if code -
-
my $dir="F:";
-
-
my ($stream_name,$stream_loc,$htmlstream,$stream,$txtstream,$docstream);
-
my $count_present=0;
-
my $count_absent=0;
-
my $count_total=0;
-
-
find(\&edits,$dir);
-
-
sub edits
-
{
-
#Finds files with following extensions
-
if(/\w+\...(dts|ts|trp|mpg)/i) <=it doesnt recognize some streams with same extension....................
-
{
-
$count_total++; #count the number of files found
-
$stream_name=$_; #name of stream
-
$stream_loc=$File::Find::name; #path of stream
-
-
my($stream_name, $stream_loc) = fileparse($stream_loc);
-
-
$stream_name=~ s/\..*//; #stripping off the stream extension
-
$htmlstream=$stream_loc.$stream_name.".html"; $txtstream=$stream_loc.$stream_name.".txt";
-
$docstream=$stream_loc.$stream_name.".doc";
-
if((-e $htmlstream)||(-e $txtstream)|| (-e $docstream))
-
{
-
$count_present++; #streams are present
-
}
-
else
-
{
-
$stream=$File::Find::name;
-
$count_absent++; #streams are absent
-
push(@unparsed_files,$stream);
-
}
-
}
-
}
-
-
-
The two extra dots(periods) that u put after '\.' will try match any two characters after dot and before the required extensions.
To check for those extensions, the following pattern should suffice: -
if(/\.(dts|ts|trp|mpg)$/i)
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Tom |
last post by:
Hi,
I have a problem because I don't know how to start my script
automatically after a special event happens.
In detail: I store data from a PLC. Every 30 seconds the data is stored
in a new file. After the file is stored I would like to start my script
that analyzes the data right away. Any help how to do this is deeply
appreciated.
|
by: Peter |
last post by:
Hi,
I need some advice. I've a program running on a local machine which
automatically pushes images from a camera to our webserver
(linux/mysql) through FTP. I want to store those images in the
database so I think I need some perlscript running as a deamon that
looks for new incoming images. I tried to find a script which does the
job but with no success. I've DBI::mysql installed. Does anybody have
some experience on this matter or is...
|
by: reneeccwest |
last post by:
Different user input boxes are automatically populated based on a
value of the dropdown box.
Can anyone help me on that?
|
by: angel duran |
last post by:
Hi... i'm trying to accomplish this and i will be using some pictures
so you can easily follow me along.
I have this form <link>http://img30.exs.cx/my.php?loc=img30&image=4214.jpg</link>
and in the products subform column where it says "productID" it's a
list box <link>http://img30.exs.cx/img30/4361/4215.jpg</link>and
the user can browse through the products and after he selects one, the
supplier column, the code column,
and the...
|
by: G. van den Broek |
last post by:
Does anyone know how to hide a c# application from the process list (Win 2k,
XP etc.)?
Or if this is 'impossible', how can I let my application automatically
restart when it gets killed?
| |
by: aparnasinha26 |
last post by:
Hi All,
I have to develop an application .The application has to update
database.It does not have any user interface.It needs to run on Windows
XP/2000 automatically at a particular time say 4 p.m. daily.
I have to develop the application in VB.net
My first question is which Visual Basic.Net Project type do I use-
Windows Service Or Class Library?
Second Question is What are the necessary initial steps I have to take
during development?...
|
by: breakaway |
last post by:
Hi everyone, I have a question regarding executing a few classes I have written on one server from another server. here is the configuration, the server I have which is accessible fromt he internet is a Linux box, running PHP 5. I have a Windows 2000 server on our corporate LAN, running Apache and PHP 5 also, I have a third server on my LAN running SQL Server. I have a huge database with all sorts of data I would like to be able to connect to...
|
by: =?Utf-8?B?TWlrZQ==?= |
last post by:
Hi. How can I schedule an ASPX page to execute every hour? I know this
request is odd & there are plenty of better ways to accomplish running an
automated task every hour. That being said, is it possible to do this?
Basically I have an ASPX page that, when opened, POSTS new customer records
from our system to a partner company's system. This task must run once an
hour and currently a user is manually running the application.
Is it...
|
by: scolivas |
last post by:
I make and run macros all the time - now I need to schedule some reports to refresh from my machine round the clock. Problem is in order for the macros that do all my refreshing won't run unless I do one of 2 things - either reduce my security settings to low or actually click the button "enable macros".
If i re-set the security settings - I cannot get to the macro's to edit them if need be (they automatically close the application) Is...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |