AutoHotkey Community

It is currently May 26th, 2012, 10:30 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: September 3rd, 2009, 8:07 pm 
I have a directory full of programs I want to run to completion. However, they all require someone to press "Ok" a few times. However, when I try to script it, the script finishes the first window fine, but then picks a random window and executes a script that now means nothing. :S

Here's the function I've got:
Code:
#i::
MsgBox Start!
Sleep 2000
done=1
CoordMode Mouse, Relative
SetTitleMatchMode, 2
loop
{   
      IfWinExist Supreme World
      {
      WinActivateBottom "Supreme World:"
      Click 366, 369
      Click 353, 369
      sleep 1000
      Click 375, 365
      }
      else
      {
      MsgBox "Done a loop!"
      break
      }
}
return

When I run it, it finishes the first window (which I started with it in focus), but then goes to Firefox and clicks repetedly. However, it goes to the proper window when I press Win-R. Once it's done all of the windows it's supposed to, I get the "Done a loop" message.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2009, 10:57 pm 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
do you have any other windows open at the time which start with the name Supreme World:?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 4:04 pm 
No. The only windows that start with that name (as far as I know) are ones the macro is supposed to work on.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 4:50 pm 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
ty changing the winactivatebottom line to this,
Code:
winactivatebottom


Also, the coordmode line is not needed, cordmode defaults to what you've set anyway


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 5:08 pm 
"WinActivateBottom requires at least one of its paramemters."


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 5:15 pm 
Offline

Joined: August 3rd, 2009, 4:44 pm
Posts: 69
Location: UK
then try
Code:
winactivate

Or
Code:
winactivatebottom, supreme world:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 5:27 pm 
I don't need help anymore. Changing the WinActivateBottom to just "WinActivate" worked perfectly.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2009, 5:28 pm 
And that post was supposed to go through before horntail's except I missed the second submit....


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, Bing [Bot], Google [Bot], JSLover, Leef_me, Miguel, patgenn123, rbrtryn and 66 guests


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