Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

#IfWinActive with long name



  • Please log in to reply
3 replies to this topic
rex4
  • Members
  • 13 posts
  • Last active: Jun 29 2015 12:15 PM
  • Joined: 26 Mar 2014
Hello, to spam click when holding left click I'm using this $LButton:: While GetKeyState("LButton","p"){ Click Sleep 100 } return which works fine, now I need it only with a game, that game being in alpha it has a really long name that changes every few days: is there an alternative to "#IfWinActive, name" or a way to copy paste the name without using ocr ? Thanks.

Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

Are you able to use SetTitleMatchMode, 2 and match it with any part of the name that is consistent?

 

What about simply using ahk_exe or other WinTitle manifestations?



rex4
  • Members
  • 13 posts
  • Last active: Jun 29 2015 12:15 PM
  • Joined: 26 Mar 2014

Oh nevermind I though I had to type whole name, the first word is working fine, but thanks I learned something.

 

But now I have another problem: for some reason now when I click normally nothing happens in the game, while it's working fine if I test on paint. Could it be related to the fact that the game runs at around 20 fps ?



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012
✓  Best Answer

Probably nothing to do with the FPS of the game; you were still doing 10 clicks per second, half the speed of 20 fps.

 

Check out this thread for gaming solutions for scripts: http://www.autohotke...mes-the-basics/