473,797 Members | 3,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

automatically running third-party tool for all files in folder

22 New Member
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?
Aug 10 '09 #1
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.
Aug 10 '09 #2
nithinpes
410 Recognized Expert Contributor
If you are on Windows , you can make use of Win32::GuiTest to automate GUI related tasks (eg. clicking buttons).
Aug 11 '09 #3
kanishka1213
22 New Member
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. my $dir="F:";
  3.  
  4. my ($stream_name,$stream_loc,$htmlstream,$stream,$txtstream,$docstream);
  5. my $count_present=0;
  6. my $count_absent=0;
  7. my $count_total=0;
  8.  
  9. find(\&edits,$dir);
  10.  
  11. sub edits
  12. {
  13.     #Finds files with following extensions
  14.     if(/\w+\...(dts|ts|trp|mpg)/i)    <=it doesnt recognize some streams with same extension....................
  15.     {
  16. $count_total++;                 #count the number of files found
  17. $stream_name=$_;             #name of stream
  18. $stream_loc=$File::Find::name;  #path of stream
  19.  
  20. my($stream_name, $stream_loc) = fileparse($stream_loc);
  21.  
  22. $stream_name=~ s/\..*//; #stripping off the stream extension
  23.     $htmlstream=$stream_loc.$stream_name.".html";                          $txtstream=$stream_loc.$stream_name.".txt";
  24.         $docstream=$stream_loc.$stream_name.".doc";
  25.         if((-e $htmlstream)||(-e $txtstream)|| (-e $docstream))
  26.         {
  27.         $count_present++;         #streams are present
  28.         }
  29.         else
  30.         {
  31.         $stream=$File::Find::name;
  32.         $count_absent++;          #streams are absent
  33.         push(@unparsed_files,$stream);    
  34.         }
  35.     }
  36. }
  37.  
  38.  
  39.  
Aug 11 '09 #4
nithinpes
410 Recognized Expert Contributor
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:
Expand|Select|Wrap|Line Numbers
  1. if(/\.(dts|ts|trp|mpg)$/i)
  2.  
Aug 13 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1913
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.
0
1916
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...
2
3075
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?
1
1857
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...
4
9836
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?
1
326
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?...
4
1492
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...
2
3936
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...
3
2083
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...
0
9685
marktang
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...
0
9537
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,...
0
10469
Oralloy
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...
0
10023
tracyyun
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...
0
9066
agi2029
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...
1
7560
isladogs
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...
1
4135
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
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.