AutoHotkey Community

It is currently May 27th, 2012, 11:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [CMD]-util Automation!
PostPosted: January 13th, 2005, 4:22 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
I was surprised when I ran across this... it automates your automaters! In turn, it reads from a text file, so I guess you could say the file automates automating automaters... um... ok, I'll just give you the util now.

Quote:
What exactly does this program do?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

First, VCLiP reads a list of variables from a text file. Then it uses each item on the list in turn to run an application or command line utility. The current variable from the list is passed on the command line. Once the application is done, the next variable is used to call the application again. This is repeated for every variable in the list.

VCLiP takes a redundant procedure that would otherwise have to be done manually many, many times and automates it. Just think if you had to run a utility from inside each of 1000 user folders on a server. It would take you hours! Using VCLiP, you can automate the procedure in a matter of minutes, and it does the work while you do something else.

What are some real-world uses for VCLiP?

* Change permissions on a group of directories so that each user can only see and have access to his specified user directory. Under NT, use the VCLiP and the XCACLS.EXE program from the NT resource kit. For Novell, use VCLiP along with the FLAG.EXE utility.

* Need to execute a command line utility in each of 1500 different directories? No, you won't need to work late, or hire a temp to do the dirty work. Use VCLiP and the DIR command to complete the task in 5 minutes. Just do a DIR /ON /B /AD > Variable.txt to make a file that lists all the directories, then use VCLiP to issue the command in each directory.

* You have 3000 files on a server that you need renamed from 001.TXT, 002.TXT etc to ABC001.TXT, ABC002.TXT and so on. Need you spend days renaming files? Nope. Try about 10 minutes, with VCLiP and a simple batch file.

* You need to process a few hundred text files each day by executing GREP or a similar utility on each one. Unfortunately, the names of the files are always changing, so you can't even write a batch file to process them. Use VCLiP to solve the problem!


"Batch file", they say... little did they know that an infinitely more formidable power loomed in the background, waiting for the opportune moment... :lol:

:P


Last edited by jonny on January 13th, 2005, 4:28 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2005, 4:25 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Doh! Forgot the link. I couldn't find one that goes directly to a download site, or one to the developer's page... :?: But here's a freeware site listing of it:

VCLiP


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2005, 9:16 am 
If I'm not completly wrong the above mentioned app is something like that:

Code:
Loop, Read, MyInputFile.txt
   {
   Run, %A_LoopReadLine%,, Hide

   }


MyInputfile.txt

Code:
%COMSPEC% /C dir C:\*.txt > CDirStat.txt
iexplore http://www.autohotkey.com/download/
%COMSPEC% /C http://home.tampabay.rr.com/kodi/ahk/AutoHotkey1025.exe,, Hide


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2005, 9:44 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Yes, now that I think about it, this is one of those utilities which is so simple that AHK does a better job of it. In fact, many macro languages could probably do this. Although, your example was a bit off, the idea was to just store the variables in the file, and specify the target as the parameter when launching, but again, very easily implemented.

This gives me an idea; there are obviously tons of utilities out there that are simple enough to be completely rewritten and/or improved in AHK. We should start a thread remaking some such utilities! We could start with things for which there's a sickening number of utilities out there, like apps for transparency and always-on-top, or maybe a sys-tray launcher. I'm sure we could think of quite a few that have AHK equivalents, and it would certainly be a great opportunity to showcase the power of AHK. Interested?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 14th, 2005, 12:16 am 
Jonny wrote:
Quote:
This gives me an idea; there are obviously tons of utilities out there that are simple enough to be completely rewritten and/or improved in AHK


Yep, I thought about that as well. But, in some cases I doubt it makes sense. A five line AHK code needs about 120 K, while historic cmd line tools uses around 5-20 K cause they were written using asm (Gosh, I remember my first HD with a full capacity of 20 MB :shock: )

BTW: Still looking for a plain tiny command line screen capture tool !

ScreenCapture, OutFilename, XPos1, YPos1, XPos2, YPos2 [, IMGFormat, Delay]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2005, 2:43 am 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
Found it! :D

grab

Quote:
Capture of Windows to Image Files

The capture of displayed windows to image files can be done by any number of avaialble utility programs, including the use of the Alt-PrintScreen mechanism of Windows 9x itself. The grab.exe command line utility is still another capture program that is adapted for use with Tcl/Tk scripts.

Command format

The general format of the command line call to this application is:

grab -c -h -l -p -r -w -t title -f name -d value

where the options have the following uses:
-c Places the output on the clipboard
-h Displays a help message
-l Produces a list of the windows that can be captured
-r Specifies that child windows should be included
-w Specifies that both client and non client window regions should be captured
-t Specified the window title of the target window
-f Specifies a file name for the captured image
-d Specifies a color depth for the captured image (1,4,8 or 24)
-p Causes the target window to pop up to the top the display stack


8)

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2005, 5:53 pm 
Na wenn das immer so dauert ! :lol:
Thx mate. :wink:

May I introduce you to the successor of the famous BoBoBar. Theeeeee increeeeeeeeedible daonlyfreez-tooooy-toooool-baaaaaar :D:lol:
Whoopee! 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2005, 5:47 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
:P 8)

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 24th, 2005, 12:23 am 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
Quote:
BTW: Still looking for a plain tiny command line screen capture tool !


IrfanView is a famous free image processor that also works from the command line without a GUI:

http://www.irfanview.com/index.htm

i_view32.exe /capture=0 /convert=test.jpg

Captures the entire screen and converts the image to a JPG file called test.jpg.

Irfanview is about 100 times faster than GRAB and has possibly 100 times more options.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 24th, 2005, 12:44 am 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
Note that in Windows XP, the FOR batch file command provides batch file processing of lines taken from a text file, as mentioned above for VCLIP.

It does not seem wise to use VCLIP, since there is no author contact, and no source code.

Here is a test of the FOR command:

FOR /F "eol=; tokens=1,2* delims=, " %i in (myfile.txt) do @echo %i %j %k

This reads each line in myfile.txt and puts the parameters in the i, j, and k variables.

At the command line (DOS window) in Windows XP type
HELP FOR
to get information about using the FOR command.

To put the help information in a file, type
HELP FOR > For.txt


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: SKAN and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group