Jump to content

montymintypie

Active Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by montymintypie

  1. Yes, it was simple... A better use of the search function.... http://www.autoitscript.com/forum/index.php?showtopic=104167
  2. Have you tried using the $WS_EX_TOOLWINDOW option?
  3. I'm trying to create a slider/editbox combo, but I'm running into issues... Moving the slider should change the value in the editbox (I managed to do this easily) but typing numbers into the editbox should adjust the slider position on the fly. It'd be even better if numbers outside the range of the slider did nothing and made the error beep. My current code is: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 633, 447, 192, 124) Global $Slider1 = GUICtrlCreateSlider(210, 88, 150, 45) Global $Input1 = GUICtrlCreateInput("0", 385, 96, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 GUICtrlSetData($Input1,GUICtrlRead($Slider1)) Sleep(10) WEnd Thanks in advance, I'm sure there's something simple I'm missing...
  4. BTW, here is the code I'm trying to use to do this... For $j = 0 to 298 Sleep(100) For $i = 0 to 398 DrawColour($Element[2],$i,$j,$Handle) Next Next In this section, the stuff I've commented out is the other approaches I've been trying. Func DrawColour($InputColour,$x,$y,$Handle) ;Takes an input colour and then clicks the mouse on the grid until it equals the colour. ; $InputColour: The hex colour of the element. Can be taken from $Element[2] ; $x,$y the co-ordinates of the pixel, in relation to the Powder Game box. ; $Handle: The window handle of the browser window. ;~ MouseMove($x+$CoOrdsX,$y+$CoOrdsY,0) ;~ MouseDown("primary") ;~ MouseUp("primary") ;~ Sleep(50) MouseClick("primary",$x+$CoOrdsX,$y+$CoOrdsY,1,0) ;~ $delay = 0 EndFunc If it doesn't make sense, I can explain the variables more...
  5. I couldn't think of a better description Basically, my problem is this... In human terms, this is what my program is doing: Move mouse to position 1 Loop here: Move and click (MouseClick function) at position 2 Move back to position 1 End Loop. In my program, position 2 is incrementing by one every iteration of the loop. In the applet I'm interfacing with, clicking draws a pixel on the screen. Because it's a little slow (i.e. sometimes clicks don't register) the mouse is moved back to position one to check if the pixel has been drawn. Basically, it should draw a line on the screen. Instead, it'll sometimes draw a line from position 1 to position 2, which is odd since the mouse is never moving whilst being clicked. I've tried MouseMove->MouseDown->MouseUp as well, but that still gives the weird behaviour. I've attached a screenshot of what it's doing. There should be a green line at the top, but there are diagonals that come from position 1 to whatever position 2 was at the time. Thanks in advance for any help.
  6. WOW! What a big update! One time when I tested with Gmod, it was loading, and didn't minimise until it was finished. Hope this fixes it. This excellent program just got better! I like the beep inclusion too. This is now a permanent startup item for me. P.S. Thanks for the PM, wouldn't have checked without it.
  7. I'm really liking how this is turning out! One feature request... Can you make it beep for every time you hit the hotkey? E.G. Different beeps/number of beeps for how many times the hotkey has been pressed? I was playing Gmod before and it froze, and I pressed once and heard nothing. After a while, I heard the high pitched beep. This made me wonder if for the other presses, when it doesn't beep, if I had actually pressed the hotkey for long enough. Hope that made sense
  8. I worked out a way to test it. Press twice, it minimises Firefox. Press again, it terminates. Works beautifully! It's good to know I can recover from a frozen game. Thanks! This is going in my startup items. Found window matching criteria, Maximized status=True, Alternative Full-Screen test result=False... Checking if window 'Full-Screen Crash Recovery - AutoIt Forums - Page 2 - Mozilla Firefox' (process ID #4012) is 'hung'... Window 'Full-Screen Crash Recovery - AutoIt Forums - Page 2 - Mozilla Firefox' not reporting 'hung' status Found window matching criteria, Maximized status=True, Alternative Full-Screen test result=False... Checking if window 'Full-Screen Crash Recovery - AutoIt Forums - Page 2 - Mozilla Firefox' (process ID #4012) is 'hung'... SendMessageTimeoutW (WM_GETTEXT msg) return succeeded, text return = 'Full-Screen Crash Recovery - AutoIt Forums - Page 2 - Mozilla Firefox' 2nd attempted Kill command received. Sent 'Minimize-window' command to window.. Found window matching criteria, Maximized status=True, Alternative Full-Screen test result=False... Checking if window 'Full-Screen Crash Recovery - AutoIt Forums - Page 2 - Mozilla Firefox' (process ID #4012) is 'hung'... Process ID #4012 not reporting hung status, but attempted kill count=3, so terminating.. Process terminated (or attempted to be). ---------------------------------------------------------------
  9. BootCamp basically means I boot in Windows instead of Mac. It's just like having a PC. Great for games! I used Audacity to replicate the beeps, then saved them as wavs and used the SoundPlay() function. It's good to know if the program is doing something! Still haven't crashed a game yet...
  10. I tried to test using the Gmod loading screen, as it seems frozen (but is just loading). Instead, it successfully minimised the window. Actually a good thing! Here's the console output: Found window matching criteria, Maximized status=False, Alternative Full-Screen test result=True... Checking if window 'Garry's Mod' (process ID #5792) is 'hung'... SendMessageTimeoutW (WM_GETTEXT msg) return succeeded, text return = 'Garry's Mod' 2nd attempted Kill command received. Sent 'Minimize-window' command to window.. Also, I'm using my Mac in BootCamp, and I don't hear a beep. Any other way to give me audio confirmation? This is the first time I've wanted a game to crash... Will
  11. That's weird... It's set to create the folder in the @ScriptDir Generate webpage should load a logfile, then write all the info into webpages. Did you move the folder by chance? And does it change any of the status labels before it does nothing? The way it gets the comics is by first getting the info for all of them. _InetGetSource (or whatever the function is called) and it then filters out the alt text, image name, image url, image filename etc. This is the equivalent of the 'Get Info' button on the GUI. It then downloads all of the comic images, using the URL from the 'Get Info' part. After it finishes downloading all the images, it then writes a logfile. I think you might have mistaken the 'Get Info' part for the downloading part. I'll change some of the labels so it's a little more informative. It also doesn't make the folder until it starts to download. Will
  12. It makes a new folder, 'XKCD Comics'. In this folder are all the images, a logfile (contains image filename/title/logfile etc) and a hash file (so you can't mess with the logfile and break something ) If you generate a webpage, it makes a folder for them too, and stick a few images in there (XKCD logo and favicon) as well. If search is working (which it isn't) it'll make a third folder for transcripts. Will
  13. I've been busy recently, haven't been playing many games, so I might not be able to give results too soon... I've set it so scripts open in SciTe by default, so it'll open in there anyway. If this thread is old enough to be 'dead' by the time a game crashes for me, I'll just PM you. Will
  14. Hey all, This is the first script I've decided to post, and I'm pretty happy with it. Its basic function is to download comics from xkcd.com, and save them for offline use. It can also update the ones you have, and create xkcd-ish websites to view the downloaded comics offline. The webpages also have the 'Random' function. The only thing I'm missing is a search function, which I am NOT happy with, so I disabled it. It loads a logfile, you type your search term, it loads the SAME file again, then you get your results, to generate a results page, it loads the logfile a third time and makes it. That's why I disabled the search feature. I'd much rather have a javascript search integrated into the webpage. Anyone here know a good way to do that? It downloads comics, alt-text and transcripts. Transcripts are in the search function currently, so they're disabled. Can't wait to hear feedback! I'm only posting source if someone is interested in it. Will T EDIT: If you 'Download All' before you 'Get Info' it will seem to download twice. This is normal. Wait for the second progress bar to finish. EDIT 2: I had a request for source, so I've attached it. WARNING: My code is mostly uncommented and quite messy. Browse at own risk... XKCD_Downloader_0.1a.zip XKCD_Downloader_0.1a_SOURCE.zip
  15. I'm in OS X at the moment, so I can't test this. Sometimes TF2 or Gmod will crash, and if I do Ctrl-Alt-Del the mouse cursor will change as I roll over parts of the Task Manager window, but I can still only see the crashed game window, with a freeze frame of the last rendered game frame. This helps with this, right? So, if I encounter this, I press the shortcut a few times until it quits? Because that sounds like a REALLY good idea. I'll download this and see how it goes next time I run a game. If it works, it's definitely going in my start-up items. :-D Will T
  16. Use regular expressions: $string = 'tv">113</td>' $array = StringRegExp($string, '(?i)tv">(.*?)</(?i)td>', 1) For $i = 0 to UBound($array) - 1 $result = $array[$i] Next MsgBox(0,"Result:","Result = " & $result) Read up on regular expressions in the help file, they are awesome.
  17. Hmmm... I swear it wasn't there the last time I checked...
  18. Damn that was quick! That works perfectly, thanks! Note to admins: I can't change subject, can you append 'Solved' to subject?
  19. I'm making a script that will automatically download every XKCD comic, save them in order, and add the mouse rollover text to the image 'Comments' section in the EXIF data. Everything is working fine so far (I loooove regular expressions) but I have no idea how to turn a string into a Windows filename compatible string. I'm not sure if any of the comic titles have special characters, but it's handy for future reference. For example, if the name is It won't be accepted as a valid Windows filename. Is there some sort of UDF that strips the special characters of replaces them? Is it easy to make one myself (if it is, point me in the right direction, I love learning how to do cool stuff). Thanks in advance, I hope my question makes sense also. Will T P.S. If anyone has some weird desire (like me) to download all of the comics, I'd be happy to post the source code.
  20. One more thing, I'm not allowed to edit my own original post for some reason, can a mod put [sOLVED] in the subject line?
  21. Thanks for the quick reply! I didn't really understand what you meant, but I think it only applies to pictures set as the background. Mine is just a normal Pic control... Never mind though, I fixed it by manually editing the code that Koda makes to create the pic control first (it was making the buttons first, then layering the picture on top of them). Thanks anyway for the quick reply! I only discovered AutoIt recently, and am amazed at the incredible versatility in it, and how easy it is to learn! Will T
  22. If this has been asked before, please forgive me. I searched but found nothing. I've got a GUI (made with Koda) that has an image with a few controls over the top of it. This is the code that Koda made to create the image: $Pic1 = GUICtrlCreatePic("F:\image.jpg", 16, 16, 276, 132, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) This just makes a black (or transparent, my background is black) rectangle the size of the image that has the other controls over the top of it. Removing the $WS_CLIPSIBLINGS part makes the image appear, but over the top of all the controls, making them unusable. Is there a way (with or without Koda) to make this work? I hope I'm describing it the right way. Thanks HEAPS in advance, Will T
×
×
  • Create New...