Brigzzy
Members-
Posts
10 -
Joined
-
Last visited
Brigzzy's Achievements
Seeker (1/7)
0
Reputation
-
Thanks guys, but I couldn't find the option you mentioned in the tools menu. That's rather strange. Is is a sciTE plugin that I have to install? As for the second suggestion, Where is the main code file? Is that just my script, or is it some autoit config file somewhere? Thanks again Brigzzy
-
Hi All, I apologize if this is already posted somewhere else, I tried searching, but I don't think I was using the right words. Maybe someone here can help. What I would like is a way to view a printout in real time of my script as it's being executed, either through implementing something in my script, or a third party script/program. From what I understand, this can be done in autohotkey, I was wondering if there was something similar for autoit. I know that using the SciTE editor, if I try to launch my code and there is an error, it will tell me at the bottom what and where it was, but is there a way for it to tell me everything else? Thanks very much for your time Brigzzy
-
Hey all, I'm trying to make a script to automate some mouse clicks. However I want to be able to use this script on other computers, so I'm trying to use relative positions. I've used the autohotkey window spy program to get the in active window coords, but when I run the script, it's clicking in the wrong place. I'm hoping someone here can tell me what I've done wrong. while 1 Call ("actualwaterbuy") WEnd func actualwaterbuy() $nMsg = GUIGetMsg() Switch $stackstobuybutton Case $nMsg = $stackstobuybutton For $1 = 1 To GUICtrlRead($stackstobuyinput) Call ("buywater") Next Case $GUI_EVENT_CLOSE Exit EndSwitch EndFunc Func buywater() AutoItSetOption ( "MouseCoordMode", 0 ) Call ( "craftfocus" ) MouseClickDrag ( "left", 313, 542, 110, 223, 0 ) Sleep (250) MouseClick ( "left", 672, 498 ) Sleep (250) MouseClick ( "left", 672, 498 ) Sleep (250) MouseClick ( "left", 645, 497 ) Sleep (250) MouseClick ( "left", 615, 598) EndFunc Any help would be appreciated, I'm really at a loss here. Thanks
-
Hello all, I have a logitech G5 mouse, and it has a few extra buttons on it. I was wondering if there was any way I could use them as keys for HotKeySet. Is there some program I can use to maybe detect what button is being pressed and will autoit recognize it? Thanks for your time Brigzzy
-
Use new instructions once number is reached?
Brigzzy replied to Brigzzy's topic in AutoIt General Help and Support
Hmm, That didn't seem to work... Maybe I implemented it wrong... Here is a sample of my script: Global $mat1 = 0 While True If Not $mat1 = 2 then switch $maxhp Case $nMsg = $Button1 For $a = 1 To GUICtrlRead($maxhp) Next Case $GUI_EVENT_CLOSE EndSwitch Exit MouseClickDrag ( "left", 3289, 92, 2989, 99 ) sleep(1000) MouseClickDrag ( "left", 2989, 99, 3289, 92 ) $mat1 += 1 sleep(1000) Else switch $maxhp Case $nMsg = $Button1 For $a = 1 To GUICtrlRead($maxhp) Next Case $GUI_EVENT_CLOSE EndSwitch Exit MouseClickDrag ( "left", 3292, 167, 2910, 164 ) sleep(1000) MouseClickDrag ( "left", 2910, 164, 3292, 167 ) EndIf WEnd This is the part of the code that I tried adding the code Marlo posted into (Nice avatar btw Marlo, I love that song, or rather flash loop, haha). Below is an example of what my other sections look like. Switch $maxmp Case $nMsg = $Button1 For $b = 1 To GUICtrlRead($maxmp) MouseClickDrag ( "left", 3292, 167, 2910, 164 ) sleep(1000) MouseClickDrag ( "left", 2910, 164, 3292, 167 ) Next Case $GUI_EVENT_CLOSE Exit EndSwitch I should say that at the moment, neither of these code snippets generates any results at all Any help would be appreciated. -
Hello all, I'm trying to make a script that drags stuff around for me. My question is, is there a way to make the script start dragging from a different location after it's made a certain number of grabs from the first spot? I assume that I'll need to use a variable to determine when the number is reached, but I'm not sure how to make it switch when it hits that number. Any help would be appreciated
-
Stop code from running automaticly?
Brigzzy replied to Brigzzy's topic in AutoIt GUI Help and Support
Aah, thank you good sir Although it was running one more time than the value I gave it, but changing the $X = 0 to a 1 fixed that right up. -
Stop code from running automaticly?
Brigzzy replied to Brigzzy's topic in AutoIt GUI Help and Support
Never mind, I seem to have fixed it, but I'm not sure why. In the interest of learning, could someone please explain why this worked? On a whim, I replaced: Switch $nMsg With: Switch $Input2 Now when I type a value into the input box, the mouse moves and clicks that many times. Fantastic -
Stop code from running automaticly?
Brigzzy replied to Brigzzy's topic in AutoIt GUI Help and Support
Thank you for your help, but that didn't seem t do the trick. It still moves the mouse and starts clicking away. Here is another copy of what my script looks like now. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=E:\mydocs\Downloads\koda\Forms\Form1.kxf $Form1 = GUICreate("Form1", 222, 203, 316, 112) $Label1 = GUICtrlCreateLabel("Clean Dirty Stones", 56, 64, 99, 17) $Input2 = GUICtrlCreateInput("Input2", 56, 88, 97, 21) $Button2 = GUICtrlCreateButton("Clean", 80, 128, 57, 25, $WS_GROUP) $Group1 = GUICtrlCreateGroup("Auto Cleaner", 40, 32, 145, 129) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() #EndRegion ### END Koda GUI section ### Local $Button2, $Input2 HotKeySet("x", "MyExit") Local $c While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $nMsg = $Button2 Do MouseMove(728, 537) send("{F4}") sleep(1000) MouseClick("Left") sleep(1000) $c +=1 Until $c=GUICtrlRead($Input2) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func MyExit() Exit EndFunc I don't really know anything about coding (what I have here, I just pieced together from the help file, and from enaiman), but could it be executing because of the "Do" and "Until" lines? If the script is just running from to to bottom, and there isn't anything there to tell it not to run, maybe that's why it's looping like this? Any help would be appreciated -
Hello, I'm having some trouble with a script I've been working on, and I'm hoping someone here can help. I apologize if this is something really remedial, but I'm pretty new at this. I'm trying to write a script to automate some of the more tedious parts of a game that I play (clicking and key presses mostly), and I got my first script working nicely. My next revision (the one I'm having a problem with) has a GUI implemented, but I'm running into a problem. Instead of asking me how many times it should run, and doing so (like my last script did) the GUI pops up, it doesn't ask for any input but begins clicking and key pressing presumably forever. I'm hoping someone here can help me figure out where I went wrong. Code is below HotKeySet("x", "MyExit") Local $c #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=E:\mydocs\Downloads\koda\Forms\Form1.kxf $Form1 = GUICreate("Form1", 222, 203, 316, 112) $Label1 = GUICtrlCreateLabel("Clean Dirty Stones", 56, 64, 99, 17) $Input2 = GUICtrlCreateInput("Input2", 56, 88, 97, 21) $Button2 = GUICtrlCreateButton("Clean", 80, 128, 57, 25, $WS_GROUP) $Group1 = GUICtrlCreateGroup("Auto Cleaner", 40, 32, 145, 129) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() #EndRegion ### END Koda GUI section ### Local $Button2, $Input2 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $nMsg = $WS_GROUP Do MouseMove(728, 537) send("{F4}") sleep(1000) MouseClick("Left") sleep(1000) $c +=1 Until $c=$Input2 EndSwitch WEnd Func MyExit() Exit EndFunc