Jump to content

xCobra15x

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

xCobra15x's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I've tried the help file and followed it to the point that the program crashes. I assume the program crashes because it's not meant to be when a button is pressed, but I just wanted to verify this and see if there were ideas out there. No need to be rude.
  2. While I know seeing the rest of my code can be beneficial, it's a group effort and I don't want to share everyone's work. Everything works perfectly until the button press that in my mind is starting the timer. Is that correct? I have tested the functioning program that doesn't include the timer and it works fine. It is ONLY when the button for the timer is pressed that the program freezes. I have never used timers with autoit before, and am new to the whole timer process. I need a timer I can vary the amount of time for to countdown, when the countdown is complete, the timer will then activate a function. This was just a test timer to see if the idea would work. Can I get general help with trying to make a timer work?
  3. Hi all, I am looking for a quick tip on why my autoit script crashes when I run a timer. Currently I have this code: ....(more code above this).... Case $button2 function1() Case $butTimer _Timer_setTimer($hGUI, 3200, "_timedout") ...... Func _timedout() Msgbox(0, "Timed out", "Time is up!") Endfunc When the button is pressed, my timer starts, correct? It doesnt seem to matter if I have it on button activation or not, after the time goes by for a bit, it crashes. Seemingly when the time is up, my script crashes. Thanks for your help!
  4. Worked beautifully. Thanks :). Any tips to get the remainders to click? Ie if my input is 50, I divide by 4 and get a remainder of 2. Currently I lose those 2 clicks, where as I want them to start at beginning of loop, do one click, click the next button, do one more click so I get all 50 items and then stop.
  5. I will try this when I have access to my application again. And report back. Thanks
  6. Let me better explain what I'm doing. I have a front panel application that has several buttons that I need repeatedly clicked on based on user input. The front panel application adds items to a list when the button is clicked. If the button is clicked 10 times, it gives me 10 items, if the button is clicked less than that, it gives me less than that. My issue is coming from when I get more than 10 clicks needed. The user input is from a textbox. I am taking that input, dividing it by 4 and using the new answer to click for the first loop, the next loop, it moves to a new area and clicks the same amount of times again. It does this 4 times (hence the 4 steps in the for loop).
  7. I am using a for loop to make this happen 4 different times. The code purposely takes the input and divides by 4 and then puts 1/4 of the input into one control click, loops through 4 times to do all of the input. ControlClick("Application", "", "", "left", "1", "1", "12") ;;;not the issue Sleep(200) ControlClick("Application", "", "", "left", "1", "38", "575") ;;;not the issue Sleep(200) ControlClick("Application", "", "", "left", "1", "763", "339") ;;;not the issue Sleep(200) For $x = 1 To 4 Step 1 ControlClick($ccd[0], $ccd[1], $ccd[2], $ccd[3], $in1, $1Loc[0], $1sLoc[1]) Sleep(200) ControlClick($ccd[0], $ccd[1], $ccd[2], $ccd[3], $in2, $2Loc[0], $2Loc[1]) Sleep(200) ControlClick($ccd[0], $ccd[1], $ccd[2], $ccd[3], $in3, $3Loc[0], $3Loc[1]) Sleep(200) ControlClick("Application", "", "", "left", "1", "763", "339") Sleep(200) Next
  8. The interface I am using adds items each time it is clicked. I'm only getting 10 items added, thus 10 clicks. This makes sense. I figured it wasn't having time to register in my app. How would I incorporate MouseCilckDelays within my control click?
  9. Hi guys, I'm fairly new to AutoIt. I have taken it on as a final project for my associates degree. My first step is to take the user input from a textbox and divide that input by 4. Once the input is divided, I want to click that many times using control click. It appears like this: ControlClick($ccd[0], $ccd[1], $ccd[2], $ccd[3], $input, 220, 40) Sleep(200) The arrays are so I don't have to keep typing in the title, text, control id, and mouse button. $input is the variable amount of clicks based on user input which I'm getting from a variable function that looks like this: $input = Int(GUICtrlRead($hinputbox)) / 4 My issue is that if I input a number like 100, it only clicks 10 times even though it should click 25 times. I know my variable is giving me the correct numbers because I can use a message box to show my what the variable is each time. I'm just not sure why that number isn't translating into the control click correctly. Anything under 40 works correctly because it's supposed to be 10. Any insight would be awesome.
×
×
  • Create New...