473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

automatically running third-party tool for all files in folder

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 1870
KevinADC
4,059 Expert 2GB
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 Expert 256MB
If you are on Windows , you can make use of Win32::GuiTest to automate GUI related tasks (eg. clicking buttons).
Aug 11 '09 #3
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 Expert 256MB
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
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...
0
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...
2
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
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...
4
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
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...
4
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...
2
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.