[QUESTION]Auto it doesn't find [Conquer2.0]...

08/12/2009 23:30 anerax#1
Hi !
I've a small problem ^^
Auto it 3 doesn't find [Conquer2.0]...
I give U my code :)

Code:
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)

;GUI
$Form1 = GUICreate("FC Leveler By anerax", 259, 92, 0, 0)
$Label1 = GUICtrlCreateLabel("Mode : Arręt", 104, 8, 62, 17)
$Button1 = GUICtrlCreateButton("START", 24, 32, 217, 49, 0)
GUISetState(@SW_SHOW)

;EVENTS
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GuiCtrlSetOnEvent($Button1, "CLICKButton")

While 1
  Sleep(1000)
WEnd

;FUNCTIONS
Func CLICKButton()
	$active=WinActivate("[Conquer2.0]")
	If $active <> 1 Then
		MsgBox(64,"Error","Veuillez allumer Conquete 2.0 !")
	Else

		While 1

			MouseDown("right")
			Sleep(3250)
		WEnd

	EndIf
EndFunc

Func CLOSEClicked()
	Exit
EndFunc
Thx :)
08/13/2009 00:06 deaconator#2
Lol copypasta'd from somewhere.

You do realise its Conquer Raiding Clans now right? Or don't you understand what your code does lol.
08/13/2009 00:27 Belth#3
Leave off the last bracket e.g "[Conquer". That's how I had to do it when I used AutoIt.
08/19/2009 01:41 daxik#4
use "[Conquer] Raiding Clans" instead or attach it to proces Conquer.exe instead
08/20/2009 10:33 ookamocka#5
Quote:
Originally Posted by anerax View Post
Hi !
I've a small problem ^^
Auto it 3 doesn't find [Conquer2.0]...
I give U my code :)

Code:
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)

;GUI
$Form1 = GUICreate("FC Leveler By anerax", 259, 92, 0, 0)
$Label1 = GUICtrlCreateLabel("Mode : Arręt", 104, 8, 62, 17)
$Button1 = GUICtrlCreateButton("START", 24, 32, 217, 49, 0)
GUISetState(@SW_SHOW)

;EVENTS
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GuiCtrlSetOnEvent($Button1, "CLICKButton")

While 1
  Sleep(1000)
WEnd

;FUNCTIONS
Func CLICKButton()
	$active=WinActivate("[Conquer2.0]")
	If $active <> 1 Then
		MsgBox(64,"Error","Veuillez allumer Conquete 2.0 !")
	Else

		While 1

			MouseDown("right")
			Sleep(3250)
		WEnd

	EndIf
EndFunc

Func CLOSEClicked()
	Exit
EndFunc
Thx :)
*sigh* cuz it's not just called "[Conquer]" :rolleyes:

ne way... if u wanna do it the easier way, add this line to ur code

Code:
Opt("WinTitleMatchMode", 2)
and change

Code:
$active=WinActivate("[Conquer2.0]")
to

Code:
$active=WinActivate("Conquer")
do a little bit of reading on how/why it works, don't just use the fix i gave u, understand it

[Only registered and activated users can see links. Click Here To Register...]

Quote:
WinTitleMatchMode

Alters the method that is used to match window titles during search operations.

1 = Match the title from the start (default)
2 = Match any substring in the title
3 = Exact title match
4 = Advanced mode, see [Only registered and activated users can see links. Click Here To Register...]
-1 to -4 = force lower case match according to other type of match.