Jump to content

Kradon

Members
  • Posts

    16
  • Joined

  • Last visited

Kradon's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. wow, both scripts work thanks you two.
  2. JohnOne is right, i havent been able to think of a way to stop the function without closing the script.
  3. thanks, it works the only problem is when i will have to set $exitloop back to false in order to start the script again. i created a hotkey to make it go back to false but would it be possible to make it so ESC hotkey can set it to true to exit loop then back to false? EDIT: kylomas, your script works perfectly, and thanks for the tips will definitely keep this in mind. thanks everyone for helping!
  4. thanks johnone, that helped, but is there a way to stop a script, not pause because pausing would pause the script where it left off, i want the script to be stopped and resume at the beginning on a press of a hotkey since thats the only way around being stuck in the loop. thanks!
  5. thats what i thought it did, is there any way around it?
  6. Hi, heres the code I'm using.. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Forsaken #ce ---------------------------------------------------------------------------- #include <GUIConstantsEx.au3> GUICreate("Auto", 335, 100) GUISetState(@SW_SHOW) GUICtrlCreateLabel("Key", 8, 10) $key1 = GUICtrlCreateInput("", 35, 8, 120) GUICtrlCreateLabel("Time", 8, 44) $time1 = GUICtrlCreateInput("", 35, 40, 120) $startbutton = GUICtrlCreateButton("Start", 190, 8, 60) While 1 $msg = GUIGetMsg() Select Case $msg = $startbutton $send1 = GUICtrlRead($key1) $sleep1 = GUICtrlRead($time1) While 1 Send($send1) Sleep($sleep1) WEnd Case $msg = $GUI_EVENT_CLOSE GUIDelete() ExitLoop EndSelect WEnd when i press "start" which will run the code inside the selection and then press the "X" button which is supposed to exit the loop and close the GUI..but it does not. the "X" button only works when i didnt start the loop and just closed it right after opening it. i'm guessing the "sleep" function paused the script so that when i press the X button the program did not read it. is there any solution to this? also if possible, i would like a stop button so it'll only exit the loop and do nothing until "start" is pressed again and by doing that will start the script from the beginning. thanks.
  7. hmm its like my script gets stuck at a line randomly for the pixel functions such as ElseIf $test1 == 0xaddress and never moves on. dunno why this is happening.
  8. i was trying to send it to mozilla firefox
  9. hi guys i've been trying to learn how to use pixels to my advantage but i've come across something that i do not understand. Here is my script: AutoItSetOption("PixelCoordMode", "2") AutoItSetOption("MouseCoordMode", "2") While 1 $test = PixelGetColor(408, 453) $test1 = PixelGetColor(703, 264) If $test == 0x885544 Then sleep(3000) MouseClick("Left", 509, 298, 1) ElseIF $test1 == 0xFFCC11 Then Sleep(5000) Send("z") Sleep(2000) Send("{TAB}") Sleep(1000) Send("z") Sleep(1000) Send("{ENTER}") EndIf WEnd every works fine, the mouseclicks clicks where its intended BUT the Send Functions arent working...or shall i say only the send functions with "z" isn't working, the {TAB} and {ENTER} seems to be working fine. why?
  10. i used a "b" word? EDIT: oh you mean bot? i consider everything from autoit a bot. WinWaitActive worked fine thanks.
  11. um i'm not breaking any rules.. autospace is not a game its just a program i made separately called autosapce.au3 which was compiled to be autospace.exe. i know i can put the commands in one script but i rather use two separate for learning purposes.
  12. hi i've been trying to make an autoit script detect a window popping up before doing anything. I've tried one and it seems like the only one that sounds fit. i used this: While 1 WinWait("autospace") Send("{SPACE})" WEnd and yes it does detect the process but it doesn't do what i want it to do. what is does is it detects the process but the process comes before the window actually popping out. (the window's name is autospace) is there any way to make the bot wait til the window actually pops up with the name "autospace" and not the process "autospace.exe". i know there are commands like "ProcessExists" or something but seems to me that winwait does the same. if there is a way please teach me how to use it thanks a lot.
  13. nvm thanks for the tip, i've tried coding it and ended up understanding how to use set Opt.
  14. hi i learn better through examples, can u show me an example script with notepad? thanks.
  15. hello, been trying to find out how to make a script that focuses on a window with MouseClick() click on the same place despite the window's current location on the screen. EX: Notepad coords are 600,700 (only an example) for MouseClick but when i move the window notepad to lets say from left side of the screen to the right side of the screen, MouseClick would still move the mouse to the same place where it would've clicked when notepad was on the left side. I hope you guys know what i'm talking about, and i've tried ControlClick, i dont want to use ControlClick. And if this is possible can anyone tell me if it would be compatible with pixelsearch? thanks a lot.
×
×
  • Create New...