Jump to content

oozma

Active Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by oozma

  1. Thanks, I've seen that but I mean is there a way to automatically have this done without having to run the script after opening the program? Something like 'merging' I guess the script with the exe, or having the exe execute the script by itself?
  2. Hey guys, I have some pretty basic knowledge of writing scripts for autoit but I haven't done anything like this before. I'm looking to make something that will set a specific process to run off only 1 core and real-time priority whenever I open the program. Is it possible to somehow write a sript for this and link it to the program's .exe to automatically do this every time it's opened? If so, can anyone point me in the right direction to learn how? Thanks!
  3. Hi, I made a script up a long time ago but recently reformatted my computer. I saved the .exe but not the editable version doh. Is there a way I can get the code back? It's a very simple script and I didnt put any types of protection or anything in it. Just for personal use... I can upload it if needed =\ thanks!
  4. Hi, sorry to bump this up again but I have one more question. Currently with using the above, the script is working excellent. One slight problem... every 4 minutes or so (I lowered the time a bit) it is pressing the key "4" - at all times. I have a hotkey set to turn the script on or off on demand, but the timer and '4' seem to run nonstop even if it's off. Is there a way to only start the timer when I push the 'start' hotkey, and then stop the timer and the '4' from being sent when I push the 'stop' hotkey? I know WHY it's doing it, but when I attempt to fix it, I get a syntax check error WARNING: $timer: possibly used before declaration. Below is what I have... HotKeySet("!1","Start") HotKeySet("!3","Stop") Global $go = false Func start() $go = True EndFunc $timer = TimerInit() Func stop() $go = False EndFunc while 1 check() sleep(50) run() sleep(50) wend Func check() If TimerDiff($timer) >= 440000 Then $timer = TimerInit() _fire_timer() endif EndFunc Func _fire_timer() sleep(1000) send("4") sleep(2000) EndFunc Func run() if $go = true Then MouseDown("left") sleep(2500) MouseUp("Left") Send("2") Send("2") Send("2") Send("2") Send("2") Send("2") sleep(1000) Send("1") sleep(1000) EndIf EndFunc
  5. Thanks >_< That worked perfectly with a few mods from my stuff. Appreciate it.
  6. Hi all, I am looking for a way to perform an action every 14 minutes mid-script. I currently have one function being called in my script that performs a series of keypresses and clicks in a while 1=1 loop, but I want to throw in that it calls a different function every 14 minutes. I've looked through the timer options but it's a little confusing to me as I'm still a bit new to this. One option is looping the function X amount of times to equal 14 minutes, but that number is so high I can't even begin to count it. Any advice would be very much appreciated >_< thank you!
  7. Perfect thanks.
  8. This is the run function: Func run() Send("J") sleep(100) EndFunc I assumed that would only execute once every 100ms until 10 seconds was reached.(Used Melba's from above) Func type() Send("o") $iBegin = TimerInit() AdlibEnable("run", 100) While TimerDiff($iBegin) < 10000 Sleep(100) WEnd AdlibDisable() Send("C") EndFunc Func run() Send("J") sleep(100) EndFunc
  9. Unfortunately this didn't work, it still seems to loop the run function non-stop.
  10. TY very much Melba and Authenticity.
  11. Hi, I'm trying to use an Adlib in a Timerdiff fuction. See below. Global $set = 10000 Global $timer = TimerInit() Switch TimerDiff($timer) Case 1 To $set AdlibEnable ("run",100) EndSwitch This is calling the function 'run' every 100ms, but the problem is it never ends. Even after 10,000ms it keeps going and going Any way to stop this after 10 seconds and continue on with the rest of the script?
  12. Thanks! Knowing which control to use for this will be helpful. I'll try it out.
  13. Thanks, that's not exactly it but somewhat close. Sorry for not explaining better. Basically I want a standard GUI with input boxes for the user to type numbers or letters into. Something like... [Dropdown Box] [save Button] [Field 1:] [text here] [Field 2:] [text here] The first time using of course the drop down will be empty until something is saved. When I click save, I want another GUI to pop up asking the user for a name to save this as. I then want the GUI to remember what was typed in field 1 and 2, so that the next time the user runs the .exe the dropdown will be populate with, say "Please Select", and below that "Name1(what they named it the first time they hit save)" When you select Name1 from the drop down I want it to auto-populate the Field 1 and Field 2 boxes. Also hoping to save multiple names\values not just one I'm thinking a .ini file for saving, or like the list one you just posted. It's a really simple concept I don't think I'm explaining it well though sorry.
  14. Could anyone give me some tips on how to create a 'save' button and have it add a user-given name to a drop down menu, and after they close the program they can open it and load from the drop down? Just the commands in Help to view if anything. I've created normal GUIs, but never saved something like this. Example: Field 1: 17 Field 2: 34 Click Save -> Named 'Test1' Close Program. Open Program -> Select 'Test1' from Dropdown -> Field 1&2 automatically filled in with 17,34. Thanks for any help you can give...
  15. Thank you Quite a bit involved in that huh..
  16. Hi all, Is it possible for me to set a mouseclick as hotkey? for example... If I want to CTRL + ALT + Left Click for a hotkey, HotKeySet("^!{Left Click}","func") Something like that... thanks
  17. Thank you Problem solved.
  18. Hi all, I have a problem with my mouse dragging. I have a script that drags files automatically, and on my Laptop and work computer this works almost instantly. You can't even see the mouse move it's so fast. On my home computer, the drag seems to be very slow. It takes nearly a full second - almost 2 for the drag to complete. My home computer is much more powerful than work and laptop, and I use a wireless optical mouse on the home - does this make a difference? Any help would be greatly appreciated. This is very frustrating
  19. It's an object that appears in a small rectangle at a random location. The color of the rectangle's background is inconsistent and the actual location it appears is random on the screen. I'm trying to detect a single color on the object (who's color is also inconsistent) that appears and drag it outside of the rectangle. The problem is that it goes through each drag session slow - maybe 500~900ms each pull. The object sometimes disappears prior to the 'pull' grabbing it
  20. Alright, not to bump my own thread or anything but just an update... I managed to speed it up significantly by using the Opt mouse click drag delay option setting to 0, but this still takes a matter of seconds to go through a 5x5 click rectangle. I have seen some that go through more clicks in literally a second or less with drag and drop - tested in Paint. Anyone have any ideas to speed this up please? I have done a lot of troubleshooting and am not trying to leech
  21. Ok, I got the above to work. New problem, My mouse click & drag is very sluggish - any way I can speed this up to take a second or less instead of 10+ seconds? Global $StartX = 0 Global $StartY = 0 Global $Start = False HotKeySet ("!1","Start") HotKeySet ("!3","stop") FUnc stop() Exit EndFunc Func start() $start = true EndFunc while 1 sleep(800) if $start = True Then go() go2() EndIf WEnd Func go() $coord = PixelSearch(178,199,712,684,0x39221c) If Not @error Then $StartX = $coord[0] $StartY = $coord[1] ;MouseClick("{Left Down}",$coord[0],$coord[1]) ;MouseMove(314,249,0) ;MouseClick("{Left Up}") MouseClickDrag("Left",$startx,$starty,314,249,0) sleep(100) EndIf EndFunc Func go2() $x1 = 295 $y1 = 261 $x2 = 611 $y2 = 499 $d = 0 Do MouseClickDrag("left",$x1,$y1,845,397,0) $x1 = $x1 + 4 $y1 = $y1 + 4 Until $x1 >= $x2 and $y1 >= $y2 EndFunc
  22. Hi, I am using the below code to find a color, drag it and drop it to a location. I keep getting an error that says "Line -1 Subset used with non-array value". Oddly enough, it works sometimes. I don't get what I am doing wrong? Global $StartX = 0 Global $StartY = 0 Global $Start = False HotKeySet ("!1","Start") Func start() $start = true EndFunc while 1 if $start = True Then go() EndIf WEnd Func go() $coord = PixelSearch(178,199,712,684,0xBCCC88) $StartX = $coord[0] $StartY = $coord[1] MouseClickDrag("Left",$startx,$starty,314,249,0) $start = False EndFunc
  23. No ideas at all? Basically... say I have a pure black square. I want it to not do anything to the black, but if a white oval appeared it would click it. Is this possible with pixelsearch or should I be using a different type of command? It seems like pixel search will only look for a color, not a 'not' color
  24. Hi All, [rephrase] I'm looking to create a script that would run pixelsearch on a rectangle, and look for a color that is NOT $value and click on it. After clicking, say that pixel 'disappears'. I then want it to continue searching the rectangle and click again if another value other than $value is found and repeat until the entire box has been searched. Is this possible? :/ I haven't found anything like it in search or the help file.
  25. Thanks Admiral, I thought the GUI creator would put that command in there by itself, so I didnt think it needed one. All good to go. Ty guys!
×
×
  • Create New...