Jump to content

Iklim

Members
  • Posts

    18
  • Joined

  • Last visited

Iklim's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. this ? http://www.autoitscript.com/forum/index.php?showtopic=53023
  2. Right, GuiCtrlSetData will change the text near the checkbox not the checkbox state. You need to use GuiCtrlSetState to achieve what you want to do. [ like this : GUICtrlSetState($printradio, $GUI_CHECKED ) ]
  3. Hi, I dont think that autoit appreciate when you try to do array based operation on an integer variable. $n_DirCount[$s_DirCount] here $n_DirCount is an integer. regards.
  4. you can also try some different compile option. like playing with /comp, /nodecompile and /nopack.
  5. I dont understand your needs. If you want the user to 'pick up a color' why not asking him at the start of your prog ? (like with an inputbox ?) hope it helps. regards. --EDIT Or add an inputbox in your gui (GUICtrlCreateEdit) ? so that the user can change it any time he wants.
  6. Hi, maybe with this : http://www.autoitscript.com/autoit3/docs/intro/au3spy.htm sorry my mistake, posted to fast
  7. Hi, Have a look at IE.au3 in the include directory of autoit.
  8. Hi, It s hard to help without any source to find why your script wont run. If you can provide some part of your code, i think we (forum members) could help you. Regards.
  9. Hi, To reduce CPU usage, you can increase the sleep delay. $Count = 0 While 1 _check() Sleep(100) WEnd I dont know if you need to have exactly 100 ms of sleep but if not you should increase it and choose a value that fit your needs (by testing for instance with 200,300,...,800, etc ).
  10. Please search the help before posting. http://www.autoitscript.com/autoit3/docs/f...ns/InputBox.htm After your input box, check @error to see if the user has clicked on Cancel. Regards.
  11. This post will surely help you : http://www.autoitscript.com/forum/index.php?showtopic=58012 Regards.
  12. Just in case, is your payment confirmation using frame / iframe ? Because i think it can stop BodyRead to work. [regarding some old thread i read some times ago]
  13. First of all, I think you only can be Archer or Warrior (at a given time) so you should use a radio button not checkboxes. [function is GUICtrlCreateRadio] Second, you should not bind a Key to two different functions, i mean you must use only one function. Third, for your info message ("type F5 to start/stop"), i think you should use a label because you are overwriting the text describing your checkboxes. So, here it is : Opt("GUIOnEventMode", 1) Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) #include <GUIConstants.au3> HotKeySet("{F5}", "On") HotKeySet("{ESC}", "Terminate") Dim $SearchMob=0 GUICreate("Test",150,100,100,100) GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate") $Label=GUICtrlCreateLabel("F5 to turn on bot.",10,5,130,15) $Radio1=GUICtrlCreateRadio("Warrior",10,35,130,15) $Radio2=GUICtrlCreateRadio("Archer",10,65,130,15) GUICtrlSetState ($Radio1, $GUI_CHECKED) GUISetState() While 1 If $SearchMob Then Attack() Sleep(1000) WEnd Func On() $SearchMob=NOT $SearchMob If $SearchMob Then GUICtrlSetData($Label,"F5 to turn off bot.") Else GUICtrlSetData($Label,"F5 to turn on bot.") EndIf EndFunc Func Jump() $x=Random(0,1024,1) $y=Random(0,690,1) MouseMove($x,$y,0) Send("{CTRLDOWN}") MouseClick("Left") Send("{CTRLUP}") Sleep(100) EndFunc Func Attack() $Coords=PixelSearch(200,100,825,600,12059395,5) If NOT @error Then if BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) = $GUI_CHECKED then MouseClick("left",$Coords[0],$Coords[1]+20,1,0) Sleep(2500) else MouseClick("right",$Coords[0],$Coords[1]+20,1,0) Sleep(2500) endif Else Jump() EndIf EndFunc Func Terminate() Exit EndFunc;==> Terminate()
  14. Just for information, your original error was simply a syntax error in _process_close. [by the way, you r not using _ProcessClose in the sample code that you ve pasted.] Func _ProcessClose() While 1 If FileRead($file_to_monitor) <> $on_start_value Then ProcessClose("iexplore.exe") EndIf Sleep(800) ; because it s an infinite loop you should add a timer to save CPU time. Wend EndFunc ;==>_ProcessClose When defining a Function, you can put variable in the brackets like this : Function _ProcessClose($my_var) or with a default value like this : Function _ProcessClose($my_var = "iexplore.exe") Hope it helps. Regards.
  15. You r welcome -- Iklim
×
×
  • Create New...