Sign in to follow this  
Followers 0
Guest bloodbird

simple script, need help!

3 posts in this topic

i have never used any script , can u help me to learn how to use the auto?

the only language i have used is pascl, so i describe it in pascl

begin
   run  progamA ( the progamA is in the same dir with the auto.exe)
   run notepad
   set notepad is the active window
   wait 1 min
   while (notpad is the active window) do
   begin
      wait 1 min
      if SearhTextFromAlist(AString)=True then
      begin
         send some keystroke to notepad 
         wait 1 min
         send others keystoke to notepad
         wait 1 min
      end  
   end


function SearchTextFromAlist(AString:TString):Boolean;
begin
  if (find AString from B.txt) then 
    result:=true 
  else result:=false;
end;

the content of b.txt

---------------------

Peter

Mike

Rockefeller

...

--------------------

thank you in advance!

Share this post


Link to post
Share on other sites

anyone could help me translate that into v3 script?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi Bloodbird, welcome to the forum.

It would have been better if you put this post in the support section, just something to keepin mind for future posts of this nature.

Autoit comes with a great help file, if you got to Start -> All Programs -> AutoIt v3 -> AutoIt Help File

Click the index button and enter keywords you are looking for like for example run

You will find

Run ( "filename" [, "workingdir" [, flag]] )

and a working example at the bottom of the page.

Look these up also

Run

Winactive

Sleep

While

If

Hope that helps you out, happy scripting :idiot:

Nova

Edited by Nova

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0